File tree Expand file tree Collapse file tree 3 files changed +15
-10
lines changed
(activity-management)/points/_components
(question-management)/questions/_components Expand file tree Collapse file tree 3 files changed +15
-10
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ export const POINTS_TABLE_QUERY = graphql(`
3939 }
4040` ) ;
4141
42- const POINTS_TABLE_ROW_FRAGEMENT = graphql ( `
42+ const POINTS_TABLE_ROW_FRAGMENT = graphql ( `
4343 fragment PointsTableRow on Point {
4444 id
4545 user {
@@ -74,7 +74,7 @@ export function PointsDataTable({ query }: { query?: string }) {
7474 const node = edge ?. node ;
7575 if ( ! node ) return null ;
7676
77- const point = readFragment ( POINTS_TABLE_ROW_FRAGEMENT , node ) ;
77+ const point = readFragment ( POINTS_TABLE_ROW_FRAGMENT , node ) ;
7878
7979 if ( ! point ) return null ;
8080 return {
Original file line number Diff line number Diff line change @@ -93,11 +93,16 @@ export function UpdatePointsForm({
9393 < Input { ...field } placeholder = "請輸入使用者 ID" />
9494 </ FormControl >
9595 < FormDescription >
96- 選擇要發放點數的使用者。可以到使用者管理頁面確認對應代號。< br />
97- { loading ? < Spinner className = "mr-4 inline-block size-4" /> : null }
98- { userInfoData ?. user
99- ? `您正要發放給:${ userInfoData . user . name } (${ userInfoData . user . email } )`
100- : "您輸入的使用者 ID 不存在。" }
96+ < div >
97+ 選擇要發放點數的使用者。可以到使用者管理頁面確認對應代號。
98+ </ div >
99+
100+ < div className = "flex items-center gap-4" >
101+ { loading ? < Spinner className = "mr-4 inline-block size-4" /> : null }
102+ { userInfoData ?. user
103+ ? `您正要發放給:${ userInfoData . user . name } (${ userInfoData . user . email } )`
104+ : "您輸入的使用者 ID 不存在。" }
105+ </ div >
101106 </ FormDescription >
102107 < FormMessage />
103108 </ FormItem >
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ export interface UpdateQuestionFormData {
2929 databaseID ?: string ; // Changed to single databaseID for 1-N relationship
3030}
3131
32- const QUESTION_UPDATE_FORM_FRAGEMENT = graphql ( `
32+ const QUESTION_UPDATE_FORM_FRAGMENT = graphql ( `
3333 fragment QuestionUpdateForm on Query {
3434 databases {
3535 id
@@ -42,7 +42,7 @@ const QUESTION_UPDATE_FORM_FRAGEMENT = graphql(`
4242
4343export interface UpdateQuestionFormProps extends Omit < UpdateFormBaseProps < z . infer < typeof formSchema > > , "onSubmit" > {
4444 onSubmit : ( newValues : UpdateQuestionFormData ) => void ;
45- fragment : FragmentType < typeof QUESTION_UPDATE_FORM_FRAGEMENT > ;
45+ fragment : FragmentType < typeof QUESTION_UPDATE_FORM_FRAGMENT > ;
4646}
4747
4848const difficultyOptions = [
@@ -59,7 +59,7 @@ export function UpdateQuestionForm({
5959 onFormStateChange,
6060 fragment,
6161} : UpdateQuestionFormProps ) {
62- const { databases, questionCategories } = useFragment ( QUESTION_UPDATE_FORM_FRAGEMENT , fragment ) ;
62+ const { databases, questionCategories } = useFragment ( QUESTION_UPDATE_FORM_FRAGMENT , fragment ) ;
6363
6464 const form = useForm < z . infer < typeof formSchema > > ( {
6565 resolver : zodResolver ( formSchema ) ,
You can’t perform that action at this time.
0 commit comments