← marzneshin
/
dashboard/src/modules/admins/components/dialogs/mutation/fields/all-services-access.tsx
/
blame
https://dev.kronoz.win/r/marzneshin.git
dashboard/src/modules/admins/components/dialogs/mutation/fields/all-services-access.tsx
· v0.7.1
Source
| 1 | 4708fcb | Dawsh | 2y ago | import { |
| 2 | 4708fcb | Dawsh | 2y ago | FormField, |
| 3 | 4708fcb | Dawsh | 2y ago | FormItem, |
| 4 | 4708fcb | Dawsh | 2y ago | FormLabel, |
| 5 | 4708fcb | Dawsh | 2y ago | Checkbox, |
| 6 | 4708fcb | Dawsh | 2y ago | FormControl, |
| 7 | 7389ad0 | Mardin | 2y ago | } from "@marzneshin/common/components"; |
| 8 | 4708fcb | Dawsh | 2y ago | import { useFormContext } from "react-hook-form"; |
| 9 | 4708fcb | Dawsh | 2y ago | import { useTranslation } from "react-i18next"; |
| 10 | 4708fcb | Dawsh | 2y ago | |
| 11 | 4708fcb | Dawsh | 2y ago | export const AllServicesAccessField = () => { |
| 12 | 4708fcb | Dawsh | 2y ago | const { t } = useTranslation() |
| 13 | 4708fcb | Dawsh | 2y ago | const form = useFormContext(); |
| 14 | 4708fcb | Dawsh | 2y ago | return ( |
| 15 | 4708fcb | Dawsh | 2y ago | <FormField |
| 16 | 4708fcb | Dawsh | 2y ago | control={form.control} |
| 17 | 4708fcb | Dawsh | 2y ago | name="all_services_access" |
| 18 | 4708fcb | Dawsh | 2y ago | render={({ field }) => ( |
| 19 | 4708fcb | Dawsh | 2y ago | <FormItem className="flex flex-row items-start space-x-3 space-y-0 rounded-md"> |
| 20 | 4708fcb | Dawsh | 2y ago | <FormControl> |
| 21 | 4708fcb | Dawsh | 2y ago | <Checkbox |
| 22 | 4708fcb | Dawsh | 2y ago | checked={field.value} |
| 23 | 4708fcb | Dawsh | 2y ago | onCheckedChange={field.onChange} |
| 24 | 4708fcb | Dawsh | 2y ago | /> |
| 25 | 4708fcb | Dawsh | 2y ago | </FormControl> |
| 26 | 4708fcb | Dawsh | 2y ago | <div className="space-y-1 leading-none"> |
| 27 | 4708fcb | Dawsh | 2y ago | <FormLabel> |
| 28 | 4708fcb | Dawsh | 2y ago | {t("page.admins.all-services-access")} |
| 29 | 4708fcb | Dawsh | 2y ago | </FormLabel> |
| 30 | 4708fcb | Dawsh | 2y ago | </div> |
| 31 | 4708fcb | Dawsh | 2y ago | </FormItem> |
| 32 | 4708fcb | Dawsh | 2y ago | )} |
| 33 | 4708fcb | Dawsh | 2y ago | /> |
| 34 | 4708fcb | Dawsh | 2y ago | ) |
| 35 | 4708fcb | Dawsh | 2y ago | } |