mirror of
https://github.com/Buriburizaem0n/admin-frontend-domain.git
synced 2026-11-04 16:50:20 +00:00
feat(service): replace show-in-service with hide-for-guest toggle
Mirror the server HideForGuest flag on services: rename the enable_show_in_service field to hide_for_guest across the form, schema and generated types, reuse the existing HideForGuest label, and drop the now-orphaned ShowInService i18n keys. Services are now visible to guests by default and hidden only when the box is checked, matching servers.
This commit is contained in:
1 parent
66e20c3860
commit
005b4a0b3b
13 files changed
+6
-16
No files matched your search
@@ -56,8 +56,8 @@ const serviceFormSchema = z.object({
|
||||
cover: z.coerce.number().int().min(0),
|
||||
display_index: z.coerce.number().int(),
|
||||
duration: z.coerce.number().int().min(30),
|
||||
enable_show_in_service: asOptionalField(z.boolean()),
|
||||
enable_trigger_task: asOptionalField(z.boolean()),
|
||||
hide_for_guest: asOptionalField(z.boolean()),
|
||||
fail_trigger_tasks: z.array(z.number()),
|
||||
fail_trigger_tasks_raw: z.string(),
|
||||
latency_notify: asOptionalField(z.boolean()),
|
||||
@@ -235,7 +235,7 @@ export const ServiceCard: React.FC<ServiceCardProps> = ({ data, mutate }) => {
|
||||
/>
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="enable_show_in_service"
|
||||
name="hide_for_guest"
|
||||
render={({ field }) => (
|
||||
<FormItem className="flex items-center space-x-2">
|
||||
<FormControl>
|
||||
@@ -245,7 +245,7 @@ export const ServiceCard: React.FC<ServiceCardProps> = ({ data, mutate }) => {
|
||||
onCheckedChange={field.onChange}
|
||||
/>
|
||||
<Label className="text-sm">
|
||||
{t("ShowInService")}
|
||||
{t("HideForGuest")}
|
||||
</Label>
|
||||
</div>
|
||||
</FormControl>
|
||||
|
||||
Reference in new issue
Block a user