Current Path : /home/ncdcgo/admin.ncdc.go.ug/static/js/ |
Current File : /home/ncdcgo/admin.ncdc.go.ug/static/js/680.dfbd7361.chunk.js.map |
{"version":3,"file":"static/js/680.dfbd7361.chunk.js","mappings":"2IA+CA,IA3CoB,SAAC,GAAgB,IAAdA,EAAa,EAAbA,OACrB,OACE,gBACEC,UAAU,kEACV,aAAW,aAFb,UAIE,gBAAIA,UAAU,kDAAd,WACE,eAAIA,UAAU,yCAAd,UACE,UAAC,KAAD,CACEC,GAAG,OACHD,UAAU,kHAFZ,WAIE,gBACEA,UAAU,eACVE,KAAK,eACLC,QAAQ,YACRC,MAAM,6BAJR,UAME,iBAAMC,EAAE,uMAVZ,YAFJ,OAiBGN,QAjBH,IAiBGA,OAjBH,EAiBGA,EAAQO,KAAI,SAACC,EAAOC,GACnB,OACE,gBAAIR,UAAU,2BAAd,WACE,SAAC,IAAD,CAAcS,KAAM,GAAIT,UAAU,UAClC,SAAC,KAAD,CACEC,GAAIM,EAAMG,KACVV,UAAU,gIAFZ,SAIGO,EAAMI,SANmCH,EAUjD,QAIR,C,0JCpCYI,EAAS,SAAC,GAAuB,IAArBC,EAAoB,EAApBA,MAAOC,EAAa,EAAbA,OAC9B,OAAOC,EAAAA,EAAAA,WAAS,kBACXD,GADU,IAEbE,SAAU,CAAC,MAAOH,GAClBI,QAAS,kBARS,SAAC,GAAe,IAAbJ,EAAY,EAAZA,MACvB,OAAOK,EAAAA,EAAAA,IAAA,gBAAmBL,GAC3B,CAMkBM,CAAO,CAAEN,MAAAA,GAAf,IAEZ,E,kGCPYO,EAAY,SAAC,GAAqB,IAAnBC,EAAkB,EAAlBA,KAAMR,EAAY,EAAZA,MAChC,OAAOK,EAAAA,EAAAA,MAAA,gBAAqBL,GAASQ,EACtC,EAEDD,EAAUE,UAAY,CACpBD,KAAME,IAAAA,MAAgB,CACpBC,SAAUD,IAAAA,OAAAA,WACVE,OAAQF,IAAAA,OAAAA,WACRG,SAAUH,IAAAA,OAAAA,aACTI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B,OAAoBX,EAAAA,cAAoB,MAAO9B,OAAOC,OAAO,CAC3DjH,MAAO,6BACPF,KAAM,OACNC,QAAS,YACTmJ,YAAa,EACbD,OAAQ,eACR,cAAe,OACfR,IAAKgB,GACJD,GAAqBV,EAAAA,cAAoB,OAAQ,CAClDK,cAAe,QACfC,eAAgB,QAChBnJ,EAAG,mBAEN,IAGD,K,qCCLA,IAAMsJ,EAAaT,EAAAA,YAZnB,SAAoBU,EAAOC,GACzB,OAAoBX,EAAAA,cAAoB,MAAO9B,OAAOC,OAAO,CAC3DjH,MAAO,6BACPD,QAAS,YACTD,KAAM,eACN,cAAe,OACf2I,IAAKgB,GACJD,GAAqBV,EAAAA,cAAoB,OAAQ,CAClD7I,EAAG,4HAEN,IAGD,K","sources":["components/Layout/Breadcrumbs.jsx","features/faqs/api/getFaq.js","features/faqs/api/updateFaq.js","features/faqs/components/UpdateFaq.jsx","features/faqs/routes/Faq.jsx","features/faqs/api/createFaq.js","features/faqs/components/CreateFaq.jsx","features/faqs/api/getFaqs.js","features/faqs/api/deleteFaq.js","features/faqs/components/DeleteFaq.jsx","features/faqs/components/FaqsList.jsx","features/faqs/routes/Faqs.jsx","features/faqs/routes/index.jsx","../node_modules/react-feather/dist/icons/chevron-right.js","../node_modules/@heroicons/react/outline/esm/PlusIcon.js","../node_modules/@heroicons/react/solid/esm/PencilIcon.js"],"sourcesContent":["import React from \"react\";\nimport { Link } from \"react-router-dom\";\nimport { ChevronRight } from \"react-feather\";\n\nconst Breadcrumbs = ({ routes }) => {\n return (\n <nav\n className=\"flex bg-white border border-gray-200 p-2 rounded-full px-4 mt-4\"\n aria-label=\"Breadcrumb\"\n >\n <ol className=\"inline-flex items-center space-x-1 md:space-x-3\">\n <li className=\"inline-flex items-center text-gray-800\">\n <Link\n to=\"/app\"\n className=\"inline-flex items-center text-sm text-gray-800 hover:text-gray-900 dark:text-gray-800 dark:hover:text-gray-200\"\n >\n <svg\n className=\"w-4 h-4 mr-2\"\n fill=\"currentColor\"\n viewBox=\"0 0 20 20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M10.707 2.293a1 1 0 00-1.414 0l-7 7a1 1 0 001.414 1.414L4 10.414V17a1 1 0 001 1h2a1 1 0 001-1v-2a1 1 0 011-1h2a1 1 0 011 1v2a1 1 0 001 1h2a1 1 0 001-1v-6.586l.293.293a1 1 0 001.414-1.414l-7-7z\"></path>\n </svg>\n Home\n </Link>\n </li>\n {routes?.map((route, index) => {\n return (\n <li className=\"inline-flex items-center\" key={index}>\n <ChevronRight size={10} className=\"mr-4\" />\n <Link\n to={route.path}\n className=\"inline-flex items-center text-sm font-extrabold text-gray-700 hover:text-gray-900 dark:text-gray-800 dark:hover:text-gray-200\"\n >\n {route.name}\n </Link>\n </li>\n );\n })}\n </ol>\n </nav>\n );\n};\n\nBreadcrumbs.propTypes = {};\n\nexport default Breadcrumbs;\n","import { axios } from 'lib/axios';\nimport { useQuery } from 'react-query';\n\nexport const getFaq = ({ faqId }) => {\n return axios.get(`/faqs/${faqId}`);\n};\n\nexport const useFaq = ({ faqId, config }) => {\n return useQuery({\n ...config,\n queryKey: ['faq', faqId],\n queryFn: () => getFaq({ faqId }),\n });\n};\n","import { axios } from 'lib/axios';\nimport { queryClient } from 'lib/react-query';\nimport { useNotificationStore } from 'stores/notifications';\nimport PropTypes from 'prop-types';\nimport { useMutation } from 'react-query';\n\nexport const updateFaq = ({ data, faqId }) => {\n return axios.patch(`/faqs/${faqId}`, data);\n};\n\nupdateFaq.propTypes = {\n data: PropTypes.shape({\n question: PropTypes.string.isRequired,\n answer: PropTypes.string.isRequired,\n category: PropTypes.string.isRequired,\n }).isRequired,\n faqId: PropTypes.string.isRequired,\n};\n\nexport const useUpdateFaq = ({ config } = {}) => {\n const { addNotification } = useNotificationStore();\n\n return useMutation({\n onMutate: async (updatingFaq) => {\n await queryClient.cancelQueries(['faq', updatingFaq?.faqId]);\n\n const previousFaq = queryClient.getQueryData[('faq', updatingFaq?.faqId)];\n\n queryClient.setQueryData(['faq', updatingFaq?.faqId], {\n ...previousFaq,\n ...updatingFaq.data,\n id: updatingFaq.faqId,\n });\n\n return { previousFaq };\n },\n onError: (_, __, context) => {\n if (context?.previousFaq) {\n queryClient.setQueryData(['faq', context.previousFaq.id], context.previousFaq);\n }\n },\n onSuccess: (data) => {\n queryClient.refetchQueries(['faq', data.id]);\n addNotification({\n type: 'success',\n title: 'Faq Updated',\n });\n },\n ...config,\n mutationFn: updateFaq,\n });\n};\n","import { Button, Spinner } from \"components/Elements\";\nimport {\n Form,\n FormDrawer,\n InputField,\n SelectField,\n TextAreaField,\n} from \"components/Form\";\nimport { Authorization, ROLES } from \"lib/authorization\";\nimport { PencilIcon } from \"@heroicons/react/solid\";\nimport PropTypes from \"prop-types\";\nimport * as z from \"zod\";\n\nimport { useFaq } from \"../api/getFaq\";\nimport { useUpdateFaq } from \"../api/updateFaq\";\n\nconst schema = z.object({\n question: z.string().min(1, \"Required\"),\n answer: z.string().min(1, \"Required\"),\n category: z.string().min(1, \"Required\"),\n});\n\nexport const UpdateFaq = ({ faqId }) => {\n const faqQuery = useFaq({ faqId });\n const updateFaqMutation = useUpdateFaq();\n\n if (updateFaqMutation.isLoading) {\n return (\n <div\n id=\"loading-screen\"\n className=\"w-full h-full fixed block top-0 left-0 bg-black opacity-75 z-50\"\n >\n <span className=\"opacity-75 top-1/2 my-0 mx-auto block relative w-0 h-0\">\n <Spinner size=\"sm\" />\n </span>\n </div>\n );\n }\n\n const categoriesQuery = [\n { label: \"Secondary Education\", value: \"Secondary Education\" },\n { label: \"Primary Education\", value: \"Primary Education\" },\n { label: \"ECCE\", value: \"ECCE\" },\n { label: \"BTVET\", value: \"BTVET\" },\n ];\n\n return (\n <Authorization allowedRoles={[ROLES.ADMIN]}>\n <FormDrawer\n sie=\"sm\"\n isDone={updateFaqMutation.isSuccess}\n triggerButton={\n <Button\n variant=\"create\"\n startIcon={<PencilIcon className=\"h-4 w-4\" />}\n size=\"sm\"\n >\n Update Faq\n </Button>\n }\n title=\"Update Faq\"\n submitButton={\n <Button\n form=\"update-job\"\n type=\"submit\"\n size=\"sm\"\n isLoading={updateFaqMutation.isLoading}\n >\n Submit\n </Button>\n }\n >\n <Form\n id=\"update-job\"\n onSubmit={async (values) => {\n await updateFaqMutation.mutateAsync({ data: values, faqId });\n }}\n options={{\n defaultValues: {\n question: faqQuery.data?.question,\n answer: faqQuery.data?.answer,\n category: faqQuery.data?.category,\n },\n }}\n schema={schema}\n >\n {({ register, formState, watch, setValue }) => (\n <>\n <InputField\n label=\"Question\"\n error={formState.errors[\"question\"]}\n registration={register(\"question\")}\n />\n <TextAreaField\n label=\"Answer\"\n error={formState.errors[\"answer\"]}\n editorContent={watch(\"answer\")}\n setValue={setValue}\n value=\"answer\"\n />\n <SelectField\n label=\"Category\"\n error={formState.errors[\"category\"]}\n registration={register(\"category\")}\n options={categoriesQuery?.map((category) => ({\n label: category.label,\n value: category.value,\n }))}\n />\n </>\n )}\n </Form>\n </FormDrawer>\n </Authorization>\n );\n};\n\nUpdateFaq.propTypes = {\n faqId: PropTypes.string.isRequired,\n};\n","import { Spinner, MDPreview } from \"components/Elements\";\nimport { Head } from \"components/Head\";\nimport { ContentLayout } from \"components/Layout\";\nimport Breadcrumbs from \"components/Layout/Breadcrumbs\";\nimport { useParams } from \"react-router-dom\";\n\nimport { useFaq } from \"../api/getFaq\";\nimport { UpdateFaq } from \"../components/UpdateFaq\";\n \nexport const Faq = () => {\n const { faqId } = useParams();\n const faqQuery = useFaq({ faqId });\n\n if (faqQuery.isLoading) {\n return (\n <div className=\"w-full h-48 flex justify-center items-center\">\n <Spinner size=\"lg\" />\n </div>\n );\n }\n\n if (!faqQuery.data) return null;\n\n const routes = [\n {\n name: \"Faqs\",\n path: \"/app/faqs\",\n },\n {\n name: faqQuery.data.question,\n path: \".\",\n },\n ];\n\n return (\n <>\n <Head title={faqQuery.data.question} />\n <ContentLayout\n title={faqQuery.data.question}\n button={<UpdateFaq faqId={faqId} />}\n >\n <span className=\"text-xs font-bold bg-green-400 p-1 rounded text-white\">\n {faqQuery.data.category}\n </span>\n <Breadcrumbs routes={routes} />\n <div className=\"mt-6 flex flex-col space-y-16\">\n <div>\n <div className=\"bg-white dark:bg-gray-700 shadow overflow-hidden sm:rounded-lg\">\n <div className=\"px-4 py-5 sm:px-6\">\n <div className=\"mt-1 max-w-2xl text-sm text-gray-400 flex flex-wrap\">\n <MDPreview value={faqQuery.data.answer} />\n </div>\n </div>\n </div>\n </div>\n </div>\n </ContentLayout>\n </>\n );\n};\n","import { axios } from 'lib/axios';\nimport { queryClient } from 'lib/react-query';\nimport { useNotificationStore } from 'stores/notifications';\nimport PropTypes from 'prop-types';\nimport { useMutation } from 'react-query';\n\nexport const createFaq = ({ data }) => {\n return axios.post(`/faqs`, data);\n};\n\ncreateFaq.propTypes = {\n data: PropTypes.shape({\n question: PropTypes.string.isRequired,\n answer: PropTypes.string.isRequired,\n category: PropTypes.string.isRequired,\n }).isRequired,\n};\n\nexport const useCreateFaq = ({ config } = {}) => {\n const { addNotification } = useNotificationStore();\n return useMutation({\n onMutate: async (newFaq) => {\n await queryClient.cancelQueries('faqs');\n\n const previousFaqs = queryClient.getQueryData('faqs');\n\n queryClient.setQueryData('faqs', [...(previousFaqs || []), newFaq.data]);\n\n return { previousFaqs };\n },\n onError: (_, __, context) => {\n if (context?.previousFaqs) {\n queryClient.setQueryData('faqs', context.previousFaqs);\n }\n },\n onSuccess: () => {\n queryClient.invalidateQueries('faqs');\n addNotification({\n type: 'success',\n title: 'Faq has been added',\n });\n },\n ...config,\n mutationFn: createFaq,\n });\n};\n","import { Button, Spinner } from \"components/Elements\";\nimport {\n Form,\n FormDrawer,\n InputField,\n SelectField,\n TextAreaField,\n} from \"components/Form\";\nimport { Authorization, ROLES } from \"lib/authorization\";\nimport { PlusIcon } from \"@heroicons/react/outline\";\nimport * as z from \"zod\";\n\nimport { useCreateFaq } from \"../api/createFaq\";\n\nconst schema = z.object({\n question: z.string().min(1, \"Required\"),\n answer: z.string().min(1, \"Required\"),\n category: z.string().min(1, \"Required\"),\n});\n\nexport const CreateFaq = () => {\n const createFaqMutation = useCreateFaq();\n\n if (createFaqMutation.isLoading) {\n return (\n <div\n id=\"loading-screen\"\n className=\"w-full h-full fixed block top-0 left-0 bg-black opacity-75 z-50\"\n >\n <span className=\"opacity-75 top-1/2 my-0 mx-auto block relative w-0 h-0\">\n <Spinner size=\"sm\" />\n </span>\n </div>\n );\n }\n\n const categoriesQuery = [\n { label: \"ECCE\", value: \"ECCE\" },\n { label: \"Primary Education\", value: \"Primary Education\" },\n { label: \"Secondary Education\", value: \"Secondary Education\" },\n { label: \"BTVET\", value: \"BTVET\" },\n { label: \"Abridged\", value: \"Abridged\" },\n {\n label: \"Accelerated Education Programe\",\n value: \"Accelerated Education Programe\",\n },\n ];\n\n return (\n <Authorization allowedRoles={[ROLES.ADMIN]}>\n <FormDrawer\n size=\"sm\"\n isDone={createFaqMutation.isSuccess}\n triggerButton={\n <Button\n variant=\"create\"\n size=\"sm\"\n startIcon={<PlusIcon className=\"h-4 w-4\" />}\n >\n Create Faq\n </Button>\n }\n title=\"Create Faq\"\n submitButton={\n <Button\n form=\"create-faq\"\n type=\"submit\"\n size=\"sm\"\n isLoading={createFaqMutation.isLoading}\n >\n Submit\n </Button>\n }\n >\n <Form\n id=\"create-faq\"\n onSubmit={async (values) => {\n await createFaqMutation.mutateAsync({ data: values });\n }}\n schema={schema}\n >\n {({ register, formState, watch, setValue }) => (\n <>\n <InputField\n label=\"Question\"\n error={formState.errors[\"question\"]}\n registration={register(\"question\")}\n />\n <TextAreaField\n label=\"Answer\"\n error={formState.errors[\"answer\"]}\n editorContent={watch(\"answer\")}\n setValue={setValue}\n value=\"answer\"\n />\n <SelectField\n label=\"Category\"\n error={formState.errors[\"category\"]}\n registration={register(\"category\")}\n options={categoriesQuery?.map((category) => ({\n label: category.label,\n value: category.value,\n }))}\n />\n </>\n )}\n </Form>\n </FormDrawer>\n </Authorization>\n );\n};\n","import { axios } from 'lib/axios';\nimport { useQuery } from 'react-query';\n\nexport const getFaqs = () => {\n return axios.get('/faqs');\n};\n\nexport const useFaqs = ({ config } = {}) => {\n return useQuery({\n ...config,\n queryKey: ['faqs'],\n queryFn: () => getFaqs(),\n });\n};\n","import { axios } from 'lib/axios';\nimport { queryClient } from 'lib/react-query';\nimport { useNotificationStore } from 'stores/notifications';\nimport PropTypes from 'prop-types';\nimport { useMutation } from 'react-query';\n\nexport const deleteFaq = ({ faqId }) => {\n return axios.delete(`/faqs/${faqId}`);\n};\n\ndeleteFaq.propTypes = {\n faqId: PropTypes.string.isRequired,\n};\n\nexport const useDeleteFaq = ({ config } = {}) => {\n const { addNotification } = useNotificationStore();\n\n return useMutation({\n onMutate: async (deletedFaq) => {\n await queryClient.cancelQueries('faqs');\n\n const previousFaqs = queryClient.getQueryData('faqs');\n\n queryClient.setQueryData(\n 'faqs',\n previousFaqs?.filter((faq) => faq.id !== deletedFaq.faqId)\n );\n\n return { previousFaqs };\n },\n onError: (_, __, context) => {\n if (context?.previousFaqs) {\n queryClient.setQueryData('faqs', context.previousFaqs);\n }\n },\n onSuccess: () => {\n queryClient.invalidateQueries('faqs');\n addNotification({\n type: 'success',\n title: 'Faq Deleted',\n });\n },\n ...config,\n mutationFn: deleteFaq,\n });\n};\n","import { Button, ConfirmationDialog, Spinner } from \"components/Elements\";\nimport { Authorization, ROLES } from \"lib/authorization\";\nimport PropTypes from \"prop-types\";\n\nimport { useDeleteFaq } from \"../api/deleteFaq\";\n\nexport const DeleteFaq = ({ id }) => {\n const deleteFaqMutation = useDeleteFaq();\n\n if (deleteFaqMutation.isLoading) {\n return (\n <div\n id=\"loading-screen\"\n className=\"w-full h-full fixed block top-0 left-0 bg-black opacity-75 z-50\"\n >\n <span className=\"opacity-75 top-1/2 my-0 mx-auto block relative w-0 h-0\">\n <Spinner size=\"sm\" />\n </span>\n </div>\n );\n }\n\n return (\n <Authorization allowedRoles={[ROLES.ADMIN]}>\n <ConfirmationDialog\n icon=\"danger\"\n title=\"Delete Faq\"\n body=\"Are you sure you want to delete this Faq?\"\n triggerButton={<button>Remove</button>}\n confirmButton={\n <Button\n isLoading={deleteFaqMutation.isLoading}\n type=\"button\"\n className=\"bg-red-600\"\n onClick={async () =>\n await deleteFaqMutation.mutateAsync({ faqId: id })\n }\n >\n Delete Faq\n </Button>\n }\n />\n </Authorization>\n );\n};\n\nDeleteFaq.propTypes = {\n id: PropTypes.string.isRequired,\n};\n","import { Table, Spinner, Link } from \"components/Elements\";\n\nimport { useFaqs } from \"../api/getFaqs\";\n\nimport { DeleteFaq } from \"./DeleteFaq\";\n\nexport const FaqsList = () => {\n const faqsQuery = useFaqs();\n\n if (faqsQuery.isLoading) {\n return (\n <div className=\"w-full h-48 flex justify-center items-center\">\n <Spinner size=\"lg\" />\n </div>\n );\n }\n\n if (!faqsQuery.data) return null;\n\n return (\n <Table\n data={faqsQuery.data}\n columns={[\n {\n title: \"Questions\",\n field: \"question\",\n },\n {\n title: \"\",\n field: \"id\",\n Cell({ entry: { _id } }) {\n return (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<div className=\"flex flex-row justify-center items-center gap-5\">\n\t\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\t\tto={`./${_id}`}\n\t\t\t\t\t\t\t\t\t\tclassName=\"mr-2 text-black dark:text-gray-200 hover:text-green-400\">\n\t\t\t\t\t\t\t\t\t\tView\n\t\t\t\t\t\t\t\t\t</Link>{\" \"}\n\t\t\t\t\t\t\t\t\t<DeleteFaq id={_id} />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t);\n },\n },\n ]}\n />\n );\n};\n","import { ContentLayout } from \"components/Layout\";\nimport Breadcrumbs from \"components/Layout/Breadcrumbs\";\n\nimport { CreateFaq } from \"../components/CreateFaq\";\nimport { FaqsList } from \"../components/FaqsList\";\n\nexport const Faqs = () => {\n const routes = [\n {\n name: \"Faqs\",\n path: \".\",\n },\n ];\n return (\n <ContentLayout title=\"Faqs\" button={<CreateFaq />}>\n <Breadcrumbs routes={routes} />\n <div className=\"mt-4\">\n <FaqsList />\n </div>\n </ContentLayout>\n );\n};\n","import { Navigate, Route, Routes } from 'react-router-dom';\n\nimport { Faq } from './Faq';\nimport { Faqs } from './Faqs';\n\nexport const FaqsRoutes = () => {\n return (\n <Routes>\n <Route path=\"\" element={<Faqs />} />\n <Route path=\":faqId\" element={<Faq />} />\n <Route path=\"*\" element={<Navigate to=\".\" />} />\n </Routes>\n );\n};\n","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React, { forwardRef } from 'react';\nimport PropTypes from 'prop-types';\nvar ChevronRight = forwardRef(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 24 : _ref$size,\n rest = _objectWithoutProperties(_ref, [\"color\", \"size\"]);\n\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n xmlns: \"http://www.w3.org/2000/svg\",\n width: size,\n height: size,\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n stroke: color,\n strokeWidth: \"2\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }, rest), /*#__PURE__*/React.createElement(\"polyline\", {\n points: \"9 18 15 12 9 6\"\n }));\n});\nChevronRight.propTypes = {\n color: PropTypes.string,\n size: PropTypes.oneOfType([PropTypes.string, PropTypes.number])\n};\nChevronRight.displayName = 'ChevronRight';\nexport default ChevronRight;","import * as React from \"react\";\n\nfunction PlusIcon(props, svgRef) {\n return /*#__PURE__*/React.createElement(\"svg\", Object.assign({\n xmlns: \"http://www.w3.org/2000/svg\",\n fill: \"none\",\n viewBox: \"0 0 24 24\",\n strokeWidth: 2,\n stroke: \"currentColor\",\n \"aria-hidden\": \"true\",\n ref: svgRef\n }, props), /*#__PURE__*/React.createElement(\"path\", {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n d: \"M12 4v16m8-8H4\"\n }));\n}\n\nconst ForwardRef = React.forwardRef(PlusIcon);\nexport default ForwardRef;","import * as React from \"react\";\n\nfunction PencilIcon(props, svgRef) {\n return /*#__PURE__*/React.createElement(\"svg\", Object.assign({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 20 20\",\n fill: \"currentColor\",\n \"aria-hidden\": \"true\",\n ref: svgRef\n }, props), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M13.586 3.586a2 2 0 112.828 2.828l-.793.793-2.828-2.828.793-.793zM11.379 5.793L3 14.172V17h2.828l8.38-8.379-2.83-2.828z\"\n }));\n}\n\nconst ForwardRef = React.forwardRef(PencilIcon);\nexport default ForwardRef;"],"names":["routes","className","to","fill","viewBox","xmlns","d","map","route","index","size","path","name","useFaq","faqId","config","useQuery","queryKey","queryFn","axios","getFaq","updateFaq","data","propTypes","PropTypes","question","answer","category","isRequired","schema","z","min","UpdateFaq","faqQuery","updateFaqMutation","addNotification","useNotificationStore","useMutation","onMutate","updatingFaq","queryClient","previousFaq","id","onError","_","__","context","onSuccess","type","title","mutationFn","useUpdateFaq","isLoading","categoriesQuery","label","value","allowedRoles","ROLES","Form","sie","isDone","isSuccess","triggerButton","variant","startIcon","PencilIcon","submitButton","form","onSubmit","values","mutateAsync","options","defaultValues","register","formState","watch","setValue","error","errors","registration","editorContent","Faq","useParams","Head","button","Breadcrumbs","createFaq","CreateFaq","createFaqMutation","newFaq","previousFaqs","useCreateFaq","PlusIcon","getFaqs","deleteFaq","DeleteFaq","deleteFaqMutation","deletedFaq","filter","faq","useDeleteFaq","icon","body","confirmButton","onClick","FaqsList","faqsQuery","useFaqs","columns","field","Cell","_id","entry","Faqs","FaqsRoutes","element","_extends","Object","assign","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","this","_objectWithoutProperties","excluded","sourceKeys","keys","indexOf","_objectWithoutPropertiesLoose","getOwnPropertySymbols","sourceSymbolKeys","propertyIsEnumerable","ChevronRight","forwardRef","_ref","ref","_ref$color","color","_ref$size","rest","React","width","height","stroke","strokeWidth","strokeLinecap","strokeLinejoin","points","displayName","ForwardRef","props","svgRef"],"sourceRoot":""}