You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/routes/dashboard/admin/review/[id]/+page.server.ts
+16-15Lines changed: 16 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -136,43 +136,44 @@ export const actions = {
136
136
switch(action){
137
137
case'approve':
138
138
status='t1_approved';
139
-
statusMessage='approved';
139
+
statusMessage='approved! :woah-dino:';
140
140
break;
141
141
case'approve_no_print':
142
142
status='printed';
143
-
statusMessage='approved (no print)';
143
+
statusMessage='approved (no printing required)! :woah-dino:';
144
144
break;
145
145
case'reject':
146
146
status='rejected';
147
-
statusMessage='rejected';
147
+
statusMessage="rejected. :sad_pepe:\nYou can still re-ship this when you're ready.";
148
148
break;
149
149
case'reject_lock':
150
150
status='rejected_locked';
151
-
statusMessage='rejected (locked)';
151
+
statusMessage="rejected.\nYou can't re-ship this project.";
152
152
break;
153
153
}
154
154
155
-
if(status)
155
+
const[projectUser]=awaitdb
156
+
.select({
157
+
slackId: user.slackId
158
+
})
159
+
.from(user)
160
+
.where(eq(user.id,queriedProject.userId));
161
+
162
+
if(projectUser&&status){
156
163
awaitdb
157
164
.update(project)
158
165
.set({
159
166
status
160
167
})
161
168
.where(eq(project.id,id));
162
169
163
-
const[projectUser]=awaitdb
164
-
.select({
165
-
slackId: user.slackId
166
-
})
167
-
.from(user)
168
-
.where(eq(user.id,queriedProject.userId));
170
+
constfeedbackText=feedback
171
+
? `\n\nHere's what they said about your project:\n${feedback}`
172
+
: '';
169
173
170
-
if(projectUser){
171
-
constfeedbackText=feedback ? `\n\nFeedback from reviewer:\n${feedback}` : '';
172
-
constencouragement=statusMessage==='rejected' ? ' You can try again whenever you\'re ready.' : statusMessage==='rejected (locked)' ? ' Unfortunately, you can\'t resubmit this project. This decision is final. ' : ' Great work! :tada:';
173
174
awaitsendSlackDM(
174
175
projectUser.slackId,
175
-
`Hiya :wave: Your project <https://construct.hackclub.com/dashboard/projects/${queriedProject.id}|${queriedProject.name}> has been ${statusMessage}!${feedbackText}${encouragement}`
176
+
`Your project <https://construct.hackclub.com/dashboard/projects/${queriedProject.id}|${queriedProject.name}> has been ${statusMessage}${feedbackText}`
Copy file name to clipboardExpand all lines: src/routes/dashboard/projects/[id]/ship/+page.server.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -122,7 +122,7 @@ export const actions = {
122
122
123
123
awaitsendSlackDM(
124
124
locals.user.slackId,
125
-
`Hiya :wave: Your project <https://construct.hackclub.com/dashboard/projects/${queriedProject.id}|${queriedProject.name}> has been shipped and is now under review. We'll take a look and get back to you soon! :rocket:`
125
+
`Hii :hyper-dino-wave:\n Your project <https://construct.hackclub.com/dashboard/projects/${queriedProject.id}|${queriedProject.name}> has been shipped and is now under review, we'll take a look and get back to you soon! :woooo:`
0 commit comments