File tree Expand file tree Collapse file tree 4 files changed +18
-0
lines changed
apps/web/app/components/admin Expand file tree Collapse file tree 4 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ const newStaff = ref({
22
22
github_id: props .staff ?.github_id ?? ' ' ,
23
23
is_open: props .staff ?.is_open ?? true ,
24
24
display_order: props .staff ?.display_order ?? null ,
25
+ is_volunteer: props .staff ?.is_volunteer ?? false ,
25
26
})
26
27
27
28
const updateName = (e : any ) => {
@@ -121,6 +122,16 @@ const onSubmit = () => {
121
122
label =" 表示順"
122
123
@input =" updateDisplayOrder"
123
124
/>
125
+ <VFDropdownField
126
+ id =" is_volunteer"
127
+ v-model =" newStaff.is_volunteer"
128
+ name =" is_volunteer"
129
+ label =" ボランティアスタッフか否か"
130
+ :items =" [
131
+ { value: 'false', text: 'コアスタッフ' },
132
+ { value: 'true', text: 'ボランティアスタッフ' },
133
+ ]"
134
+ />
124
135
<div class =" form-button" >
125
136
<VFSubmitButton >Save</VFSubmitButton >
126
137
<VFLinkButton
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ const handleDialog = (id?: string) => {
27
27
<th >x_id</th >
28
28
<th >github_id</th >
29
29
<th >is_open</th >
30
+ <th >is_volunteer</th >
30
31
<th style =" min-width : 80px " >action</th >
31
32
</tr >
32
33
<tr v-for =" staff in staffs" :key =" staff.id" >
@@ -50,6 +51,9 @@ const handleDialog = (id?: string) => {
50
51
<p >{{ staff.is_open ? '表示' : '非表示' }}</p >
51
52
<p v-if =" staff.display_order" >{{ `(${staff.display_order})` }}</p >
52
53
</td >
54
+ <td >
55
+ <p >{{ staff.is_volunteer ? 'ボランティアスタッフ' : 'コアスタッフ' }}</p >
56
+ </td >
53
57
<td >
54
58
<VFLinkButton
55
59
is =" button"
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ export type Staff = {
7
7
github_id ?: string
8
8
is_open : boolean
9
9
display_order ?: number
10
+ is_volunteer : boolean
10
11
created_at : string
11
12
updated_at : string
12
13
}
Original file line number Diff line number Diff line change @@ -157,6 +157,8 @@ create table if not exists public.staffs (
157
157
158
158
ALTER TABLE public .staffs ADD COLUMN detail_page_id varchar (40 );
159
159
160
+ ALTER TABLE public .staffs ADD COLUMN is_volunteer bool not null default false;
161
+
160
162
alter table
161
163
public .staffs enable row level security;
162
164
You can’t perform that action at this time.
0 commit comments