File tree 6 files changed +20
-3
lines changed
src/modules/classes/pages
packages/trpc/server/routers
6 files changed +20
-3
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @quenti/next" ,
3
- "version" : " 1.3.0 " ,
3
+ "version" : " 1.3.1 " ,
4
4
"private" : true ,
5
5
"scripts" : {
6
6
"build" : " next build" ,
Original file line number Diff line number Diff line change @@ -59,7 +59,6 @@ export const AssignmentCollab = () => {
59
59
< Skeleton isLoaded = { isLoaded } rounded = "lg" fitContent alignSelf = "end" >
60
60
< Button
61
61
w = "max"
62
- size = "sm"
63
62
rightIcon = { < IconArrowRight size = { 18 } /> }
64
63
isLoading = { editCollab . isLoading }
65
64
onClick = { ( ) => {
Original file line number Diff line number Diff line change @@ -138,7 +138,7 @@ export const AssignmentPublish = () => {
138
138
</ HStack >
139
139
</ Stack >
140
140
{ isLoaded ? (
141
- < EditorContent editor = { editor } />
141
+ assignment ?. description && < EditorContent editor = { editor } />
142
142
) : (
143
143
< SkeletonText noOfLines = { 3 } skeletonHeight = { 4 } spacing = "3" />
144
144
) }
Original file line number Diff line number Diff line change @@ -98,6 +98,7 @@ const getStudent = async (
98
98
classId,
99
99
sectionId,
100
100
published : true ,
101
+ availableAt : { lte : new Date ( ) } ,
101
102
...( query ? { title : { contains : query } } : { } ) ,
102
103
} ,
103
104
select : {
Original file line number Diff line number Diff line change @@ -157,6 +157,7 @@ const getStudent = async (
157
157
classId,
158
158
} ,
159
159
AND : {
160
+ availableAt : { lte : new Date ( ) } ,
160
161
published : true ,
161
162
} ,
162
163
} ,
Original file line number Diff line number Diff line change @@ -50,6 +50,22 @@ export const collabSelect = (userId?: string) =>
50
50
export const assignmentArgs = ( userId : string ) =>
51
51
Prisma . validator < Prisma . StudySet$assignmentArgs > ( ) ( {
52
52
where : {
53
+ OR : [
54
+ {
55
+ availableAt : { lte : new Date ( ) } ,
56
+ } ,
57
+ {
58
+ class : {
59
+ members : {
60
+ some : {
61
+ userId,
62
+ deletedAt : null ,
63
+ type : "Teacher" ,
64
+ } ,
65
+ } ,
66
+ } ,
67
+ } ,
68
+ ] ,
53
69
class : {
54
70
members : {
55
71
some : {
You can’t perform that action at this time.
0 commit comments