11< c-base >
22 < c-slot name ="head ">
3- < script type =" text/javascript " src ="https://www.gstatic.com/charts/loader.js "> </ script >
3+ < script src ="https://www.gstatic.com/charts/loader.js "> </ script >
44 </ c-slot >
55 < c-ui .card class ="bg-zinc-900 mb-4 ">
66 < h3 class ="text-lg font-semibold mb-2 "> Welcome back, {{ user.profile.slack_username }}!</ h3 >
77 < p class ="text-ink-400 ">
8- < c-ui .button onclick ="alert('weh, you are looking at them right now >:(') "> See statistics</ c-ui .button>
8+ < c-ui .button onclick ="alert('weh, you are looking at them right now >:(') ">
9+ See statistics
10+ </ c-ui .button>
911 < a href ="{% url 'admin.users' %} ">
10- < c-ui .button > Manage Users</ c-ui .button>
12+ < c-ui .button >
13+ Manage Users
14+ </ c-ui .button>
1115 </ a >
12- < c-ui .button > Edit Pathways</ c-ui .button>
13- < c-ui .button > Fulfill orders</ c-ui .button>
14- < c-ui .button > Edit shop</ c-ui .button>
15- < c-ui .button > Review projects</ c-ui .button>
16- < c-ui .button > Announce stuff</ c-ui .button>
16+ < c-ui .button >
17+ Edit Pathways
18+ </ c-ui .button>
19+ < c-ui .button >
20+ Fulfill orders
21+ </ c-ui .button>
22+ < c-ui .button >
23+ Edit shop
24+ </ c-ui .button>
25+ < c-ui .button >
26+ Review projects
27+ </ c-ui .button>
28+ < c-ui .button >
29+ Announce stuff
30+ </ c-ui .button>
1731 </ p >
1832 </ c-ui .card>
1933 < c-ui .tabs variant ="segmented ">
@@ -22,29 +36,32 @@ <h3 class="text-lg font-semibold mb-2">Welcome back, {{ user.profile.slack_usern
2236 < div class ="flex flex-col md:flex-row text-center md:text-left gap-4 ">
2337 < div class ="md:w-fit ">
2438 < div >
25- < div class ="text-center ">
26- Hours logged
27- </ div >
28- < div class ="text-center text-lg font-bold ">
29- {{ hours_logged }}h
30- </ div >
39+ < div class ="text-center "> Hours logged</ div >
40+ < div class ="text-center text-lg font-bold "> {{ hours_logged }}h</ div >
3141 < div id ="hours_logged_chart " class ="mx-auto md:mx-0 ">
32- < div class ="text-center py-4 ">
33- Loading chart...
34- </ div >
42+ < div class ="text-center py-4 "> Loading chart...</ div >
3543 </ div >
3644 </ div >
37- < script type ="text/javascript ">
38- google . charts . load ( 'current' , { 'packages' :[ 'corechart' ] } ) ;
45+ < script >
46+ google . charts . load ( 'current' , {
47+ 'packages' : [ 'corechart' ]
48+ } ) ;
3949 google . charts . setOnLoadCallback ( drawChart ) ;
4050
4151 function drawChart ( ) {
4252 var data = google . visualization . arrayToDataTable ( { { hours_logged_chart | safe } } ) ;
4353
4454 var options = {
45- vAxis : { minValue : 0 } ,
46- animation : { duration : 250 , startup : true } ,
47- backgroundColor : { fill : 'transparent' } ,
55+ vAxis : {
56+ minValue : 0
57+ } ,
58+ animation : {
59+ duration : 250 ,
60+ startup : true
61+ } ,
62+ backgroundColor : {
63+ fill : 'transparent'
64+ } ,
4865 theme : "maximized" ,
4966 width : 240 ,
5067 height : 160
@@ -57,26 +74,31 @@ <h3 class="text-lg font-semibold mb-2">Welcome back, {{ user.profile.slack_usern
5774 </ div >
5875 < div class ="md:w-fit flex flex-row ">
5976 < div >
60- < div class ="text-center ">
61- Project type
62- </ div >
77+ < div class ="text-center "> Project type</ div >
6378 < div id ="logged_project_type " class ="mx-auto md:mx-0 mt-6 ">
64- < div class ="text-center py-4 ">
65- Loading chart...
66- </ div >
79+ < div class ="text-center py-4 "> Loading chart...</ div >
6780 </ div >
6881 </ div >
69- < script type ="text/javascript ">
70- google . charts . load ( 'current' , { 'packages' :[ 'corechart' ] } ) ;
82+ < script >
83+ google . charts . load ( 'current' , {
84+ 'packages' : [ 'corechart' ]
85+ } ) ;
7186 google . charts . setOnLoadCallback ( drawChart ) ;
7287
7388 function drawChart ( ) {
7489 var data = google . visualization . arrayToDataTable ( { { logged_project_type | safe } } ) ;
7590
7691 var options = {
77- vAxis : { minValue : 0 } ,
78- animation : { duration : 250 , startup : true } ,
79- backgroundColor : { fill : 'transparent' } ,
92+ vAxis : {
93+ minValue : 0
94+ } ,
95+ animation : {
96+ duration : 250 ,
97+ startup : true
98+ } ,
99+ backgroundColor : {
100+ fill : 'transparent'
101+ } ,
80102 theme : "maximized" ,
81103 width : 240 ,
82104 height : 160
@@ -94,60 +116,68 @@ <h3 class="text-lg font-semibold mb-2">Welcome back, {{ user.profile.slack_usern
94116 < c-ui .card class ="bg-zinc-900 ">
95117 < div class ="flex flex-col md:flex-row text-center md:text-left gap-4 ">
96118 < div class ="md:w-fit ">
97- < div class ="text-center ">
98- Hours shipped
99- </ div >
100- < div class ="text-center text-lg font-bold ">
101- {{ hours_shipped }}h
102- </ div >
119+ < div class ="text-center "> Hours shipped</ div >
120+ < div class ="text-center text-lg font-bold "> {{ hours_shipped }}h</ div >
103121 < div id ="hours_shipped_chart " class ="mx-auto md:mx-0 ">
104- < div class ="text-center py-4 ">
105- Loading chart...
106- </ div >
122+ < div class ="text-center py-4 "> Loading chart...</ div >
107123 </ div >
108- < script type ="text/javascript ">
109- google . charts . load ( 'current' , { 'packages' :[ 'corechart' ] } ) ;
124+ < script >
125+ google . charts . load ( 'current' , {
126+ 'packages' : [ 'corechart' ]
127+ } ) ;
110128 google . charts . setOnLoadCallback ( drawChart ) ;
111-
129+
112130 function drawChart ( ) {
113131 var data = google . visualization . arrayToDataTable ( { { hours_shipped_chart | safe } } ) ;
114-
132+
115133 var options = {
116- vAxis : { minValue : 0 } ,
117- animation : { duration : 250 , startup : true } ,
118- backgroundColor : { fill : 'transparent' } ,
134+ vAxis : {
135+ minValue : 0
136+ } ,
137+ animation : {
138+ duration : 250 ,
139+ startup : true
140+ } ,
141+ backgroundColor : {
142+ fill : 'transparent'
143+ } ,
119144 theme : "maximized" ,
120145 width : 240 ,
121146 height : 160
122147 } ;
123-
148+
124149 var chart = new google . visualization . AreaChart ( document . getElementById ( 'hours_shipped_chart' ) ) ;
125150 chart . draw ( data , options ) ;
126151 }
127152 </ script >
128153 </ div >
129154 < div class ="md:w-fit flex flex-row ">
130155 < div >
131- < div class ="text-center ">
132- Project type
133- </ div >
156+ < div class ="text-center "> Project type</ div >
134157 < div id ="shipped_project_type " class ="mx-auto md:mx-0 mt-6 ">
135- < div class ="text-center py-4 ">
136- Loading chart...
137- </ div >
158+ < div class ="text-center py-4 "> Loading chart...</ div >
138159 </ div >
139160 </ div >
140- < script type ="text/javascript ">
141- google . charts . load ( 'current' , { 'packages' :[ 'corechart' ] } ) ;
161+ < script >
162+ google . charts . load ( 'current' , {
163+ 'packages' : [ 'corechart' ]
164+ } ) ;
142165 google . charts . setOnLoadCallback ( drawChart ) ;
143166
144167 function drawChart ( ) {
145168 var data = google . visualization . arrayToDataTable ( { { shipped_project_type | safe } } ) ;
146169
147170 var options = {
148- vAxis : { minValue : 0 } ,
149- animation : { duration : 250 , startup : true } ,
150- backgroundColor : { fill : 'transparent' } ,
171+ vAxis : {
172+ minValue : 0
173+ } ,
174+ animation : {
175+ duration : 250 ,
176+ startup : true
177+ } ,
178+ backgroundColor : {
179+ fill : 'transparent'
180+ } ,
151181 theme : "maximized" ,
152182 width : 240 ,
153183 height : 160
@@ -165,4 +195,4 @@ <h3 class="text-lg font-semibold mb-2">Welcome back, {{ user.profile.slack_usern
165195 This is still WIP! (annoy @kavyansh. to fix if you see this after the YSWS has started!)
166196 </ c-ui .tabs.tab>
167197 </ c-ui .tabs>
168- </ c-base >
198+ </ c-base >
0 commit comments