',
5 | }}
6 | />
7 | )
8 |
9 | export default AppLoading
10 |
--------------------------------------------------------------------------------
/src/layout/Footer/Footer.tsx:
--------------------------------------------------------------------------------
1 | import { useMemo } from 'react'
2 |
3 | interface IFooter {
4 | settings?: any
5 | }
6 |
7 | export default function Footer({ settings }: IFooter) {
8 | const footerLogo = useMemo(() => {
9 | return (
10 | settings &&
11 | typeof settings['footer-logo'] !== 'undefined' && (
12 |

17 | )
18 | )
19 | }, [settings])
20 |
21 | return (
22 |
39 | )
40 | }
41 |
--------------------------------------------------------------------------------
/src/layout/SideNav/sideNav.module.css:
--------------------------------------------------------------------------------
1 | .logo {
2 | display: flex;
3 | flex-direction: column;
4 | justify-content: center;
5 | align-items: center;
6 | gap: 0.5rem;
7 | margin-top: 0.5rem;
8 | margin-bottom: 1rem;
9 | }
10 |
11 | .logo:hover {
12 | color: #fff;
13 | opacity: 0.8;
14 | }
15 |
16 | .logoImage {
17 | max-width: 80%;
18 | max-height: 150px;
19 | }
20 |
--------------------------------------------------------------------------------
/src/react-app-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | //declare module 'react/jsx-runtime'
3 |
--------------------------------------------------------------------------------
/src/registry/ComponentRegistryProps.ts:
--------------------------------------------------------------------------------
1 | interface IComponentRegistry {
2 | [k: string]: {
3 | name?: string
4 | desc?: any
5 | component?: any
6 | components?: any
7 | category?: any
8 | settings?: any
9 | hidden?: boolean
10 | group?: boolean
11 | hideSettings?: boolean
12 | }
13 | }
14 |
15 | export default IComponentRegistry
16 |
--------------------------------------------------------------------------------
/src/registry/componentRegistry.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 | import componentGroupRegistry from './componentGroupRegistry'
3 |
4 | const components: { default?: any } = import.meta.glob([
5 | '../components/**/*.tsx',
6 | '!**.test.tsx',
7 | ])
8 |
9 | const match = /..\/components\/([^\/]+).*\/([\w]+)\.tsx$/
10 | const componentList = Object.fromEntries(
11 | Object.entries(components).map(([file, component]: any) => {
12 | const [category, key] = file.replace(match, '$1.$2').split('.')
13 | return [
14 | key,
15 | {
16 | category: category,
17 | component: lazy(component),
18 | settings: component,
19 | hidden: ['AddNew', 'PageEditButton'].includes(key),
20 | },
21 | ]
22 | }),
23 | )
24 |
25 | export const componentRegistry = {
26 | ...componentGroupRegistry,
27 | ...componentList,
28 | }
29 |
30 | export default componentRegistry
31 |
--------------------------------------------------------------------------------
/src/registry/componentSettingsRegistry.ts:
--------------------------------------------------------------------------------
1 | interface ISettings {
2 | name: string
3 | value: string | number | boolean
4 | }
5 |
6 | export const standardSizes: ISettings[] = [
7 | {
8 | name: 'Extra small',
9 | value: 'xs',
10 | },
11 | {
12 | name: 'Small',
13 | value: 'sm',
14 | },
15 | {
16 | name: 'Medium',
17 | value: 'md',
18 | },
19 | {
20 | name: 'Large',
21 | value: 'lg',
22 | },
23 | {
24 | name: 'Extra large',
25 | value: 'xl',
26 | },
27 | ]
28 |
29 | export const standardClasses: ISettings[] = [
30 | {
31 | name: 'Primary',
32 | value: 'primary',
33 | },
34 | {
35 | name: 'Success',
36 | value: 'success',
37 | },
38 | {
39 | name: 'Danger',
40 | value: 'danger',
41 | },
42 | {
43 | name: 'Info',
44 | value: 'info',
45 | },
46 | {
47 | name: 'Warning',
48 | value: 'warning',
49 | },
50 | ]
51 |
--------------------------------------------------------------------------------
/src/registry/emailRegistry.ts:
--------------------------------------------------------------------------------
1 | const modules: { default?: any } = import.meta.glob('./emails/**/*.ts', {
2 | eager: true,
3 | })
4 |
5 | const emailRegistry: any = Object.values(modules).map(
6 | (module) => module.default,
7 | )
8 |
9 | export default emailRegistry
10 |
--------------------------------------------------------------------------------
/src/registry/emails/allocation_approval.ts:
--------------------------------------------------------------------------------
1 | const email = {
2 | id: '98c9666a-47e3-44b4-a047-20a954adbaa6',
3 | body: 'Your club’s sportsground allocation application for the {{season}} season has been received and approved.\n\nGo to
{{website}} for more information or to request changes.',
4 | reference: 'allocation_approval',
5 | name: 'Allocation approval',
6 | subject: `{{hirer}} - Allocation application approved`,
7 | }
8 |
9 | export default email
10 |
--------------------------------------------------------------------------------
/src/registry/emails/booking_approval.ts:
--------------------------------------------------------------------------------
1 | const email = {
2 | id: 'e9b9357e-61a2-47a4-b18f-339bb09cd9d8',
3 | body: `A booking was approved on {{date}}.
4 |
5 | Booking details:
6 | {{details}}
7 |
8 | Go to
{{website}} for more information.`,
9 | name: 'Booking approval',
10 | reference: 'booking_approval',
11 | subject: 'Booking approved',
12 | }
13 |
14 | export default email
15 |
--------------------------------------------------------------------------------
/src/registry/emails/booking_completion.ts:
--------------------------------------------------------------------------------
1 | const email = {
2 | id: 'af84d608-eaea-468a-8e0e-d64cc5274f38',
3 | body: `A new booking was submitted on {{date}}.
4 |
5 | Booking details:
6 | {{details}}
7 |
8 | Go to
{{website}} for more information.`,
9 | name: 'Booking completion',
10 | reference: 'booking_completion',
11 | subject: 'New booking submitted',
12 | }
13 |
14 | export default email
15 |
--------------------------------------------------------------------------------
/src/registry/emails/booking_declined.ts:
--------------------------------------------------------------------------------
1 | const email = {
2 | id: '3060967d-5dac-4b6a-8ac2-f3ef140c21b7',
3 | body: `A booking was declined on {{date}}.
4 |
5 | Booking details:
6 | {{details}}
7 |
8 | Go to
{{website}} for more information.`,
9 | name: 'Booking declined',
10 | reference: 'booking_declined',
11 | subject: 'Booking declined',
12 | }
13 |
14 | export default email
15 |
--------------------------------------------------------------------------------
/src/registry/emails/inspection_completion.ts:
--------------------------------------------------------------------------------
1 | const email = {
2 | id: '581972ee-0b67-47e4-9c03-d985b2a1e06c',
3 | body: `An inspection at {{asset}} was conducted on {{date}}.
4 |
5 | Action is required by your Club to rectify issues found during the inspection.
6 |
7 | To view the issues requiring attention by your Club, log onto the Reserves Manager program and click on the outstanding issues tab.
8 |
9 | Issues that require attention by Council are also displayed for your information only.
10 |
11 | Once issues have been resolved please mark them as complete in the program and council will be advised.
12 |
13 | Go to
{{website}} for more information.`,
14 | name: 'Inspection completion - containing summary of issues found (sent to clubs) ',
15 | reference: 'inspection_completion',
16 | subject: 'Summary report for inspection of {{asset}}',
17 | }
18 |
19 | export default email
20 |
--------------------------------------------------------------------------------
/src/registry/emails/open_reminder.ts:
--------------------------------------------------------------------------------
1 | const email = {
2 | id: '7fd7cb9e-8c2b-46a2-95a6-b5fddca598c8',
3 | body: '{{client}} is currently taking applications for facilities to support your club in the coming sporting season. To request facilities, your organisation needs to complete the online allocation application in the IMS program.\n\nTo access the application please login to the program at {{website}} using the login details below.',
4 | reference: 'open_reminder',
5 | name: 'Open and reminder',
6 | subject: `{{client}} seasonal sportsground allocations application open`,
7 | }
8 |
9 | export default email
10 |
--------------------------------------------------------------------------------
/src/registry/emails/support.ts:
--------------------------------------------------------------------------------
1 | const email = {
2 | id: 'c0abd25f-4dd3-4c0d-82a5-689cc209d0c0',
3 | body: 'A support request has been logged, the details are below:\n\n{details}',
4 | reference: 'support',
5 | name: 'Support request',
6 | subject: `Client Request submitted - {client}`,
7 | }
8 |
9 | export default email
10 |
--------------------------------------------------------------------------------
/src/registry/emails/user.ts:
--------------------------------------------------------------------------------
1 | const email = {
2 | id: 'bc7213e5-417d-4264-b298-bc12933e7e02',
3 | body: 'Hi {{name}},\n\nThe following details will enable you to access the bookings program.\n\n
Email: {{email}}\n\nThis is an auto generated email - please do not reply to this email as the reply will not be received.',
4 | reference: 'user',
5 | name: 'User email',
6 | subject: 'Account activation',
7 | }
8 |
9 | export default email
10 |
--------------------------------------------------------------------------------
/src/registry/formRegistry.ts:
--------------------------------------------------------------------------------
1 | const modules: { default?: any } = import.meta.glob('./forms/**/*.ts', {
2 | eager: true,
3 | })
4 |
5 | const formRegistry: any = Object.values(modules).map((module) => module.default)
6 |
7 | export default formRegistry
8 |
--------------------------------------------------------------------------------
/src/registry/forms/activityType.ts:
--------------------------------------------------------------------------------
1 | const form = {
2 | id: '2df13529-d31b-4e8f-a870-2cf6dd502505',
3 | name: 'Activity type',
4 | reference: 'activity-type',
5 |
6 | description: 'Activity type form',
7 | endpoint: 'd/activity-type',
8 | questions: [{ text: 'Name', reference: 'name', component: 'Input' }],
9 | }
10 |
11 | export default form
12 |
--------------------------------------------------------------------------------
/src/registry/forms/application.ts:
--------------------------------------------------------------------------------
1 | const form = {
2 | id: 'b00833f6-6a09-43dc-96df-b48884a3afb4',
3 | name: 'Application form',
4 | reference: 'application',
5 | category: 'booking',
6 | description: 'Application form',
7 | endpoint: 'd/application',
8 | questions: [
9 | {
10 | text: 'User details',
11 | component: 'Input',
12 | },
13 | {
14 | text: 'Bookings',
15 | component: 'DataGrid',
16 | props: { endpoint: 'booking?parent_id=tmp123' },
17 | },
18 | {
19 | id: '123',
20 | text: 'Add booking',
21 | component: 'ModalButton',
22 | props: { text: 'Add new', icon: 'plus' },
23 | },
24 | {
25 | parent_id: '123',
26 | text: ' Form',
27 | component: 'Form',
28 | props: { formId: 'booking' },
29 | },
30 | ],
31 | }
32 |
33 | export default form
34 |
--------------------------------------------------------------------------------
/src/registry/forms/assetChecklist.ts:
--------------------------------------------------------------------------------
1 | const form = {
2 | id: '505958cb-043d-4ff3-a16b-7b7c52b51b10',
3 | name: 'Asset checklists',
4 | reference: 'asset-checklist',
5 |
6 | endpoint: 'd/asset-checklist',
7 | questions: [
8 | {
9 | text: 'Form',
10 | reference: 'form-id',
11 | component: 'Select',
12 | props: { endpoint: 'form' },
13 | },
14 | ],
15 | }
16 |
17 | export default form
18 |
--------------------------------------------------------------------------------
/src/registry/forms/assetQuestion.ts:
--------------------------------------------------------------------------------
1 | const form = {
2 | id: '434ad907-a64d-47ce-95a1-89e93bef48f3',
3 | name: 'Asset question form',
4 | reference: 'asset-question',
5 |
6 | description: 'Asset question form',
7 | endpoint: 'd/asset-question',
8 | questions: [
9 | { text: 'Question/text', reference: 'label', component: 'Input' },
10 | {
11 | text: 'Response type',
12 | reference: 'type',
13 | component: 'ComponentSelector',
14 | },
15 | { text: 'Reference', reference: 'reference', component: 'Input' },
16 | { text: 'Order', reference: 'question_order', component: 'Input' },
17 | { text: 'Props', reference: 'props', component: 'Json' },
18 | { text: 'Form props', reference: 'form_props', component: 'Json' },
19 | ],
20 | }
21 |
22 | export default form
23 |
--------------------------------------------------------------------------------
/src/registry/forms/assetType.ts:
--------------------------------------------------------------------------------
1 | const form = {
2 | id: 'f9ff6195-b58e-4c03-88a9-5d52a29fe648',
3 | name: 'Asset type',
4 | reference: 'asset-type',
5 |
6 | description: 'Asset type form',
7 | endpoint: 'd/asset-type',
8 | questions: [
9 | { text: 'Name', reference: 'name', component: 'Input' },
10 | { text: 'Sub type', reference: 'sub-type', component: 'Input' },
11 | { text: 'Has capacity', reference: 'has_capacity', component: 'Input' },
12 | {
13 | text: 'Default pricing',
14 | reference: 'pricing_id',
15 | component: 'MultiSelect',
16 | props: { endpoint: 'd/pricing?sort_by=name' },
17 | },
18 | ],
19 | }
20 |
21 | export default form
22 |
--------------------------------------------------------------------------------
/src/registry/forms/bondRefund.ts:
--------------------------------------------------------------------------------
1 | const form = {
2 | id: '0b6af9af-1912-4256-9779-321082045b24',
3 | name: 'Bond refunds',
4 | endpoint: 'd/bond-refund',
5 | reference: 'bond-refund',
6 | questions: [
7 | {
8 | text: 'Name',
9 | reference: 'name',
10 | component: 'Input',
11 | },
12 | {
13 | text: 'Total',
14 | reference: 'total',
15 | component: 'InputPrice',
16 | },
17 | {
18 | text: 'Completed',
19 | reference: 'completed',
20 | component: 'Checkbox',
21 | },
22 | ],
23 | }
24 |
25 | export default form
26 |
--------------------------------------------------------------------------------
/src/registry/forms/booking-document.ts:
--------------------------------------------------------------------------------
1 | const form = {
2 | id: '39aef5ff-9987-43eb-8d0d-d1c700156582',
3 | name: 'Booking document',
4 | reference: 'booking-document',
5 | description: 'Booking document form',
6 | endpoint: 'd/booking-document',
7 | questions: [
8 | { text: 'Name', reference: 'name', component: 'Input' },
9 | {
10 | text: 'Type',
11 | reference: 'type',
12 | component: 'Radios',
13 | props: {
14 | data: [
15 | { label: 'Seasonal T&Cs', value: 'seasonal_terms' },
16 | { label: 'Terms and conditions', value: 'terms' },
17 | ],
18 | },
19 | },
20 | { text: 'File', reference: 'file', component: 'FileDoc' },
21 | ],
22 | }
23 |
24 | export default form
25 |
--------------------------------------------------------------------------------
/src/registry/forms/bookingCategory.ts:
--------------------------------------------------------------------------------
1 | const form = {
2 | id: 'a6eaaf47-2367-4418-889d-6666b528a68c',
3 | name: 'Booking category',
4 | reference: 'booking-category',
5 | category: 'booking',
6 | description: 'Booking categories for hirers',
7 | endpoint: 'd/booking-category',
8 | questions: [{ text: 'Name', reference: 'name', component: 'Input' }],
9 | }
10 |
11 | export default form
12 |
--------------------------------------------------------------------------------
/src/registry/forms/casualUsagePublic.ts:
--------------------------------------------------------------------------------
1 | const form = {
2 | id: 'fc5b5648-858d-43cc-ba74-801f7f463d3c',
3 | name: 'Casual',
4 | reference: 'casualusage-public',
5 | workflow: ['validate.usage'],
6 | category: 'booking',
7 | description: 'Public Casual venue usage',
8 | endpoint: 'usage',
9 | questions: [
10 | {
11 | text: 'Booking description',
12 | reference: 'title',
13 | component: 'Input',
14 | form_props: { required: true },
15 | },
16 | {
17 | text: 'Number attending',
18 | reference: 'attending',
19 | component: 'Input',
20 | },
21 | {
22 | text: 'Date',
23 | component: 'Date',
24 | reference: 'date',
25 | props: { minDate: 'today' },
26 | form_props: { required: true },
27 | },
28 | {
29 | text: 'Start/End',
30 | component: 'TimeRange',
31 | },
32 | {
33 | text: 'Repeating',
34 | component: 'RepeatEvent',
35 | },
36 | ],
37 | }
38 |
39 | export default form
40 |
--------------------------------------------------------------------------------
/src/registry/forms/charts.ts:
--------------------------------------------------------------------------------
1 | const form = {
2 | id: '1f04683c-aa03-4328-97ca-a5e13acf1af8',
3 | name: 'Charts',
4 | reference: 'charts',
5 |
6 | endpoint: 'd/charts',
7 | questions: [
8 | { text: 'Chart type', reference: 'type', component: 'Input' },
9 | { text: 'Hidden', reference: 'hide', component: 'Switch' },
10 | { text: 'Heading', reference: 'name', component: 'Input' },
11 | {
12 | text: 'Dataset',
13 | reference: 'dataset',
14 | component: 'DatasetSelector',
15 | },
16 | ],
17 | }
18 |
19 | export default form
20 |
--------------------------------------------------------------------------------
/src/registry/forms/closure.ts:
--------------------------------------------------------------------------------
1 | const form = {
2 | id: '4a2882b2-8710-4368-a78e-7abc2e17c84b',
3 | name: 'Closure',
4 | reference: 'closure',
5 | description: 'Closure form',
6 | endpoint: 'calendar',
7 | questions: [
8 | {
9 | component: 'Heading',
10 | props: { text: 'Venue closure' },
11 | },
12 | {
13 | text: 'Venue',
14 | reference: 'asset_id',
15 | component: 'AssetSelector',
16 | form_props: { required: 'true' },
17 | },
18 | {
19 | text: 'All day',
20 | reference: 'allday',
21 | component: 'Switch',
22 | },
23 | {
24 | text: 'Starts',
25 | reference: 'start',
26 | component: 'DateTime',
27 | form_props: { required: 'true' },
28 | },
29 | {
30 | text: 'Ends',
31 | reference: 'end',
32 | component: 'DateTime',
33 | form_props: { required: 'true' },
34 | },
35 | {
36 | text: 'Reason',
37 | reference: 'title',
38 | component: 'Input',
39 | form_props: { required: 'true' },
40 | },
41 | ],
42 | }
43 |
44 | export default form
45 |
--------------------------------------------------------------------------------
/src/registry/forms/customerType.ts:
--------------------------------------------------------------------------------
1 | const form = {
2 | id: '51ee44a1-751b-4d90-9baf-7c5e31a8a76a',
3 | reference: 'customer-type',
4 | endpoint: 'd/customer-type',
5 | name: 'Customer type',
6 | questions: [
7 | {
8 | component: 'Input',
9 | text: 'Name',
10 | reference: 'name',
11 | },
12 | ],
13 | }
14 |
15 | export default form
16 |
--------------------------------------------------------------------------------
/src/registry/forms/daily.ts:
--------------------------------------------------------------------------------
1 | const form = {
2 | id: 'b66808e0-2f2b-11ed-91f6-b4a9fc5fdfa8',
3 | name: 'Daily',
4 | reference: 'daily',
5 |
6 | endpoint: 'd/daily',
7 | questions: [
8 | { text: 'Name', reference: 'name', component: 'Input' },
9 | { text: 'Break end', reference: 'break-end', component: 'Input' },
10 | {
11 | text: 'Have you done something else?',
12 | reference: 'something-else',
13 | component: 'Compliance',
14 | },
15 | { text: 'Shift end', reference: 'shift-end', component: 'Input' },
16 | {
17 | text: 'Have you locked the door?',
18 | reference: 'locked-door',
19 | component: 'Compliance',
20 | },
21 | { text: 'Shift start', reference: 'shift-start', component: 'Input' },
22 | {
23 | text: 'Are the lights on?',
24 | reference: 'lights-on',
25 | component: 'Compliance',
26 | },
27 | { text: 'Break start', reference: 'break-start', component: 'Input' },
28 | { text: 'Cover int', reference: 'cover-int', component: 'Input' },
29 | ],
30 | }
31 |
32 | export default form
33 |
--------------------------------------------------------------------------------
/src/registry/forms/datasets.ts:
--------------------------------------------------------------------------------
1 | const form = {
2 | id: '67d26fcd-9b9a-4ed9-baa8-5508d6c68615',
3 | name: 'Datasets',
4 | reference: 'dataset',
5 |
6 | description: 'Dataset form',
7 | endpoint: 'dataset',
8 | questions: [
9 | { text: 'Name', reference: 'name', component: 'Input' },
10 | { text: 'Data', reference: 'data', component: 'Json' },
11 | { text: 'Id', reference: 'id', component: 'ReadOnly' },
12 | { text: 'Reference', reference: 'slug', component: 'Input' },
13 | ],
14 | }
15 |
16 | export default form
17 |
--------------------------------------------------------------------------------
/src/registry/forms/emailTemplates.ts:
--------------------------------------------------------------------------------
1 | const form = {
2 | id: '1fb961d4-ffe8-4117-9509-33524cac07d1',
3 | name: 'Email templates',
4 | reference: 'email-template',
5 |
6 | description: 'Email templates to send to people',
7 | endpoint: 'd/email-template',
8 | questions: [
9 | { text: 'Reference', reference: 'reference', component: 'Input' },
10 | { text: 'Name', reference: 'name', component: 'Input' },
11 | { text: 'Subject', reference: 'subject', component: 'Input' },
12 | { text: 'Body', reference: 'body', component: 'Textarea' },
13 | {
14 | text: 'Has a signature',
15 | reference: 'has_signature',
16 | component: 'Checkbox',
17 | },
18 | {
19 | text: 'Signature',
20 | reference: 'signature',
21 | component: 'Textarea',
22 | form_props: { condition: { on: 'has_signature', type: '!empty' } },
23 | },
24 | ],
25 | }
26 |
27 | export default form
28 |
--------------------------------------------------------------------------------
/src/registry/forms/features.ts:
--------------------------------------------------------------------------------
1 | const form = {
2 | id: '13a1c641-180e-430b-bb66-0e5933f3c807',
3 | name: 'Features',
4 | reference: 'features',
5 |
6 | endpoint: 'd/features',
7 | questions: [{ text: 'Name', reference: 'name', component: 'Input' }],
8 | }
9 |
10 | export default form
11 |
--------------------------------------------------------------------------------
/src/registry/forms/fee.ts:
--------------------------------------------------------------------------------
1 | const form = {
2 | id: '6c308e23-c26c-4252-a2db-a28f743bb2a0',
3 | name: 'Fee',
4 | reference: 'fee',
5 | description: 'Fee form',
6 | endpoint: 'fee',
7 | questions: [
8 | {
9 | text: 'Name',
10 | reference: 'name',
11 | component: 'Input',
12 | form_props: { required: true },
13 | },
14 | {
15 | text: 'Rate',
16 | reference: 'rate',
17 | component: 'Input',
18 | form_props: { required: true },
19 | },
20 | {
21 | text: 'Unit',
22 | reference: 'unit',
23 | component: 'Input',
24 | form_props: { required: true },
25 | },
26 | ],
27 | }
28 |
29 | export default form
30 |
--------------------------------------------------------------------------------
/src/registry/forms/form.ts:
--------------------------------------------------------------------------------
1 | const form = {
2 | id: 'd24d86c7-2f1a-11ed-91f6-b4a9fc5fdfa8',
3 | name: 'Form form',
4 | reference: 'form',
5 | description: 'Form form',
6 | endpoint: 'form',
7 | questions: [
8 | { text: 'Name', reference: 'name', component: 'Input' },
9 | { text: 'Description', reference: 'description', component: 'Textarea' },
10 | { text: 'Reference', reference: 'reference', component: 'Input' },
11 | { text: 'Category', reference: 'category', component: 'Input' },
12 | { text: 'Endpoint', reference: 'endpoint', component: 'Input' },
13 | {
14 | text: 'Privacy',
15 | reference: 'privacy',
16 | component: 'Textarea',
17 | conditions: [{ on: '{category}', type: 'casual' }],
18 | },
19 | ],
20 | }
21 |
22 | export default form
23 |
--------------------------------------------------------------------------------
/src/registry/forms/hirerEquipment.ts:
--------------------------------------------------------------------------------
1 | const form = {
2 | id: 'eed2e394-8abd-46b2-8f81-28819924391e',
3 | name: 'Hirer equipment',
4 | reference: 'hirer-equipment',
5 | description: 'Hirer/equipment form',
6 | endpoint: 'd/equipment',
7 | questions: [
8 | {
9 | text: 'Equipment',
10 | reference: 'equipment_id',
11 | component: 'Select',
12 | props: {
13 | endpoint: 'd/equipment',
14 | },
15 | form_props: {
16 | conditions: [{ on: 'type', value: 'hirer' }],
17 | },
18 | },
19 | {
20 | text: 'Hirer',
21 | reference: 'hirer_id',
22 | component: 'Select',
23 | props: { endpoint: 'hirer?sort_by=name' },
24 | form_props: {
25 | conditions: [{ on: 'type', type: '!=', value: 'hirer' }],
26 | },
27 | },
28 | ],
29 | }
30 |
31 | export default form
32 |
--------------------------------------------------------------------------------
/src/registry/forms/hirerKey.ts:
--------------------------------------------------------------------------------
1 | const form = {
2 | id: 'dbe7bec1-a46d-442b-b4db-abc5468f48c8',
3 | name: 'Hirer key',
4 | reference: 'hirer-key',
5 | description: 'Hirer/key form',
6 | endpoint: 'd/key-register',
7 | questions: [
8 | // {
9 | // text: 'Key',
10 | // reference: 'key-register_id',
11 | // component: 'Select',
12 | // props: {
13 | // endpoint: 'd/key-register',
14 | // searchable: true,
15 | // },
16 | // form_props: {
17 | // conditions: [{ on: 'type', value: 'hirer' }],
18 | // },
19 | // },
20 | {
21 | text: 'Hirer',
22 | reference: 'hirer_id',
23 | component: 'Select',
24 | props: { endpoint: 'hirer?sort_by=name', searchable: true },
25 | form_props: {
26 | conditions: [{ on: 'type', type: '!=', value: 'hirer' }],
27 | },
28 | },
29 | ],
30 | }
31 |
32 | export default form
33 |
--------------------------------------------------------------------------------
/src/registry/forms/hirerStorage.ts:
--------------------------------------------------------------------------------
1 | const form = {
2 | id: 'c8e47173-0253-459f-bf96-aff3f7b8cc15',
3 | name: 'Hirer storage',
4 | reference: 'hirer-storage',
5 | description: 'Hirer/storage form',
6 | endpoint: 'd/storage',
7 | questions: [
8 | {
9 | text: 'Storage',
10 | reference: 'storage_id',
11 | component: 'Select',
12 | props: {
13 | endpoint: 'd/storage',
14 | },
15 | form_props: {
16 | conditions: [{ on: 'type', value: 'hirer' }],
17 | },
18 | },
19 | {
20 | text: 'Hirer',
21 | reference: 'hirer_id',
22 | component: 'Select',
23 | props: { endpoint: 'hirer?sort_by=name' },
24 | form_props: {
25 | conditions: [{ on: 'type', type: '!=', value: 'hirer' }],
26 | },
27 | },
28 | ],
29 | }
30 |
31 | export default form
32 |
--------------------------------------------------------------------------------
/src/registry/forms/hirerType.ts:
--------------------------------------------------------------------------------
1 | const form = {
2 | id: '8690d11e-e5ac-41c8-ab35-2091bf3f3ea6',
3 | name: 'Hirer type',
4 | reference: 'hirer-type',
5 |
6 | endpoint: 'd/hirer-type',
7 | questions: [{ text: 'Name', reference: 'name', component: 'Input' }],
8 | }
9 |
10 | export default form
11 |
--------------------------------------------------------------------------------
/src/registry/forms/holiday.ts:
--------------------------------------------------------------------------------
1 | const form = {
2 | id: '5cd3b823-5b95-4f4f-abca-c741f7e6febf',
3 | name: 'Holiday',
4 | reference: 'holiday',
5 | endpoint: 'calendar',
6 | questions: [
7 | {
8 | component: 'Heading',
9 | props: { text: 'Holiday' },
10 | },
11 | {
12 | text: 'Holiday',
13 | reference: 'title',
14 | component: 'Input',
15 | form_props: { required: 'true' },
16 | },
17 | {
18 | text: 'All day',
19 | reference: 'allday',
20 | component: 'Switch',
21 | },
22 | { text: 'Starts', reference: 'start', component: 'DateTime' },
23 | { text: 'Ends', reference: 'end', component: 'DateTime' },
24 | ],
25 | }
26 |
27 | export default form
28 |
--------------------------------------------------------------------------------
/src/registry/forms/internalNotes.ts:
--------------------------------------------------------------------------------
1 | const form = {
2 | id: 'ae45ade6-12f7-40ea-b46b-29a874281334',
3 | name: 'Internal note',
4 | reference: 'internal-notes',
5 |
6 | endpoint: 'd/internal-notes',
7 | questions: [{ text: 'Note', reference: 'note', component: 'Textarea' }],
8 | }
9 |
10 | export default form
11 |
--------------------------------------------------------------------------------
/src/registry/forms/invoice.ts:
--------------------------------------------------------------------------------
1 | const form = {
2 | id: '489f8eef-4d56-4ae1-ad3f-fea88b166e1a',
3 | name: 'Invoice',
4 | reference: 'invoice',
5 |
6 | endpoint: 'd/invoice',
7 | questions: [
8 | {
9 | text: 'Invoice number',
10 | reference: 'number',
11 | component: 'ReadOnly',
12 | form_props: { conditions: [{ on: 'id', type: '!empty' }] },
13 | },
14 | { text: 'Name', reference: 'name', component: 'Input' },
15 | { text: 'Date', reference: 'date', component: 'Date' },
16 | {
17 | text: 'Items',
18 | reference: 'items',
19 | component: 'CostItems',
20 | form_props: { questionWidth: 12, answerWidth: 12 },
21 | },
22 | { text: 'Total', reference: 'total', component: 'InputPrice' },
23 | ],
24 | }
25 |
26 | export default form
27 |
--------------------------------------------------------------------------------
/src/registry/forms/notes.ts:
--------------------------------------------------------------------------------
1 | const form = {
2 | id: '0b8f6007-b54b-4294-b54f-a16443d78eb3',
3 | name: 'Notes',
4 | reference: 'notes',
5 |
6 | endpoint: 'd/notes',
7 | questions: [{ text: 'Note', reference: 'note', component: 'Textarea' }],
8 | }
9 |
10 | export default form
11 |
--------------------------------------------------------------------------------
/src/registry/forms/payment.ts:
--------------------------------------------------------------------------------
1 | const form = {
2 | id: 'a518d27e-3c87-44e1-a2c4-4f32e0a73797',
3 | name: 'Payment form',
4 | reference: 'payment',
5 |
6 | description: 'Payment form',
7 | endpoint: 'collection',
8 | questions: [
9 | { text: 'Signature', reference: 'signature', component: 'Signature' },
10 | { text: 'Name', reference: 'name', component: 'Input' },
11 | { text: 'Email', reference: 'email', component: 'Input' },
12 | { text: 'Total amount', reference: 'total', component: 'Input' },
13 | {
14 | text: 'Payment details',
15 | reference: 'payment',
16 | component: 'CreditCard',
17 | },
18 | ],
19 | }
20 |
21 | export default form
22 |
--------------------------------------------------------------------------------
/src/registry/forms/permission.ts:
--------------------------------------------------------------------------------
1 | const form = {
2 | id: 'f904e959-6ed2-47fd-9603-2b020300f7af',
3 | name: 'Permission',
4 | reference: 'permission',
5 | category: 'admin',
6 |
7 | endpoint: 'permission',
8 | questions: [
9 | { text: 'Category', reference: 'category', component: 'Input' },
10 | { text: 'Enabled', reference: 'enabled', component: 'Switch' },
11 | { text: 'Name', reference: 'name', component: 'Input' },
12 | { text: 'Code', reference: 'code', component: 'Input' },
13 | ],
14 | }
15 |
16 | export default form
17 |
--------------------------------------------------------------------------------
/src/registry/forms/pricing.ts:
--------------------------------------------------------------------------------
1 | const form = {
2 | id: '8463903c-282b-485d-bb11-dfea82e9b483',
3 | name: 'Pricing',
4 | reference: 'pricing',
5 | description: 'Pricing to be applied to asset types or assets',
6 | endpoint: 'd/pricing',
7 | questions: [
8 | {
9 | text: 'Name',
10 | reference: 'name',
11 | component: 'Input',
12 | form_props: { required: true },
13 | },
14 | // { text: 'Once off amount', reference: 'fee', component: 'Input' },
15 | // { text: 'Condition', reference: 'condition', component: 'Input' },
16 | {
17 | text: 'Rates',
18 | reference: 'rates',
19 | component: 'PricingGrid',
20 | form_props: { questionWidth: 12, answerWidth: 12 },
21 | },
22 | ],
23 | }
24 |
25 | export default form
26 |
--------------------------------------------------------------------------------
/src/registry/forms/role.ts:
--------------------------------------------------------------------------------
1 | const form = {
2 | id: '5c68a758-c530-41f5-abfe-fd2a3f867a6c',
3 | name: 'Role',
4 | reference: 'role',
5 | category: 'admin',
6 |
7 | endpoint: 'role',
8 | questions: [
9 | { text: 'Name', reference: 'name', component: 'Input' },
10 | { text: 'Access level', reference: 'access_level', component: 'Input' },
11 | {
12 | text: 'Default page',
13 | reference: 'default_page_id',
14 | component: 'Input',
15 | },
16 | {
17 | text: 'Permissions',
18 | reference: 'permissions',
19 | component: 'Checkboxes',
20 | props: { endpoint: 'permission', value_key: 'code' },
21 | },
22 | { text: 'Enabled', reference: 'enabled', component: 'Switch' },
23 | ],
24 | }
25 |
26 | export default form
27 |
--------------------------------------------------------------------------------
/src/registry/forms/sport.ts:
--------------------------------------------------------------------------------
1 | const form = {
2 | id: 'ed92aa43-b8ac-46a9-87ed-10b13d601a49',
3 | name: 'Sport',
4 | reference: 'sport',
5 | description: 'Sport form',
6 | endpoint: 'd/sport',
7 | questions: [{ text: 'Name', reference: 'name', component: 'Input' }],
8 | }
9 |
10 | export default form
11 |
--------------------------------------------------------------------------------
/src/registry/forms/storage.ts:
--------------------------------------------------------------------------------
1 | const form = {
2 | id: '77127ff0-ad3f-4614-a3c0-11be4fa566f8',
3 | reference: 'storage',
4 | endpoint: 'd/storage',
5 | name: 'Storage',
6 | questions: [
7 | {
8 | component: 'Input',
9 | text: 'Name',
10 | reference: 'name',
11 | },
12 | {
13 | text: 'Venue',
14 | reference: 'asset_id',
15 | component: 'AssetSelector',
16 | props: { readOnly: false },
17 | },
18 | {
19 | component: 'Input',
20 | text: 'Type',
21 | reference: 'storage_type',
22 | },
23 | {
24 | component: 'Input',
25 | text: 'Size',
26 | reference: 'size',
27 | },
28 | {
29 | component: 'Input',
30 | text: 'Capacity',
31 | reference: 'capacity',
32 | },
33 | {
34 | component: 'Camera',
35 | text: 'Photo',
36 | reference: 'photo',
37 | },
38 | ],
39 | }
40 |
41 | export default form
42 |
--------------------------------------------------------------------------------
/src/registry/forms/taskNotes.ts:
--------------------------------------------------------------------------------
1 | const form = {
2 | id: 'ac90d428-c3b6-4e30-95d1-34edf26bc257',
3 | name: 'Task notes',
4 | reference: 'task-notes',
5 |
6 | endpoint: 'd/task-notes',
7 | questions: [
8 | {
9 | text: 'Task',
10 | reference: 'task_id',
11 | component: 'Select',
12 | props: { endpoint: 'd/task' },
13 | },
14 | { text: 'Note', reference: 'note', component: 'Textarea' },
15 | ],
16 | }
17 |
18 | export default form
19 |
--------------------------------------------------------------------------------
/src/registry/forms/taskTimes.ts:
--------------------------------------------------------------------------------
1 | const form = {
2 | id: '1427c1c0-8c9d-411d-8709-ccad18baf028',
3 | name: 'Task times',
4 | reference: 'task-times',
5 |
6 | endpoint: 'd/task',
7 | questions: [
8 | { text: 'Estimate', reference: 'estimate', component: 'Input' },
9 | { text: 'Actual', reference: 'actual', component: 'Input' },
10 | ],
11 | }
12 |
13 | export default form
14 |
--------------------------------------------------------------------------------
/src/registry/forms/user.ts:
--------------------------------------------------------------------------------
1 | const form = {
2 | id: '46f7805b-8d3e-46ec-928f-a6a187cc827e',
3 | name: 'User form',
4 | reference: 'user',
5 | description: 'User details form',
6 | endpoint: 'user',
7 | questions: [
8 | {
9 | text: 'Role',
10 | reference: 'role_id',
11 | component: 'Select',
12 | props: { endpoint: 'role' },
13 | form_props: { required: true },
14 | },
15 | {
16 | text: 'First name',
17 | reference: 'first_name',
18 | component: 'Input',
19 | form_props: { required: true },
20 | },
21 | { text: 'Last name', reference: 'last_name', component: 'Input' },
22 | { text: 'Phone number', reference: 'phone', component: 'Input' },
23 | {
24 | text: 'Email address',
25 | reference: 'email',
26 | component: 'Input',
27 | form_props: { required: true },
28 | },
29 | { text: 'Password', reference: 'password', component: 'InputPassword' },
30 | ],
31 | }
32 |
33 | export default form
34 |
--------------------------------------------------------------------------------
/src/registry/forms/userDetails.ts:
--------------------------------------------------------------------------------
1 | const form = {
2 | id: 'd8be9d42-30ea-49e0-ad45-395a6508457d',
3 | name: 'User details',
4 | reference: 'user-details',
5 | category: 'user',
6 | workflow: ['validate.email'],
7 | description: "User's own details form",
8 | endpoint: 'user',
9 | questions: [
10 | { text: 'First name', reference: 'first_name', component: 'Input' },
11 | { text: 'Last name', reference: 'last_name', component: 'Input' },
12 | { text: 'Phone number', reference: 'phone', component: 'Input' },
13 | { text: 'Email address', reference: 'email', component: 'Input' },
14 | { text: 'Password', reference: 'password', component: 'InputPassword' },
15 | ],
16 | }
17 |
18 | export default form
19 |
--------------------------------------------------------------------------------
/src/registry/forms/userVenue.ts:
--------------------------------------------------------------------------------
1 | const form = {
2 | id: '3b5fc85f-d62b-4d2d-8f96-132b17dc09d5',
3 | name: 'User venue',
4 | reference: 'user-asset',
5 |
6 | description: 'User venue form',
7 | endpoint: 'user-asset',
8 | questions: [
9 | {
10 | component: 'AssetSelector',
11 | reference: 'asset_id',
12 | },
13 | ],
14 | }
15 |
16 | export default form
17 |
--------------------------------------------------------------------------------
/src/registry/forms/weekly.ts:
--------------------------------------------------------------------------------
1 | const form = {
2 | id: 'e24361ee-6a69-4b7d-9c38-11a35742b993',
3 | name: 'Weekly',
4 | reference: 'weekly',
5 |
6 | endpoint: 'd/weekly',
7 | questions: [
8 | {
9 | text: 'Deep clean of floors',
10 | reference: 'floor-deep-clean',
11 | component: 'Compliance',
12 | },
13 | {
14 | text: 'Cleaned all areas',
15 | reference: 'all-areas',
16 | component: 'Compliance',
17 | },
18 | ],
19 | }
20 |
21 | export default form
22 |
--------------------------------------------------------------------------------
/src/registry/forms/workflow.ts:
--------------------------------------------------------------------------------
1 | const form = {
2 | id: '044d6cb6-7cfe-4d1c-9f46-06c9c09a12b4',
3 | name: 'Workflow',
4 | reference: 'workflow',
5 |
6 | endpoint: 'd/workflow',
7 | questions: [
8 | { text: 'Name', reference: 'name', component: 'Input' },
9 | {
10 | text: 'Steps',
11 | reference: '',
12 | component: 'DataGrid',
13 | props: { endpoint: 'd/workflow-step?parent_id={id}' },
14 | },
15 | {
16 | text: 'Form',
17 | reference: '',
18 | component: 'Form',
19 | props: { formId: 'workflow-step', parent_id: '{id}', itemId: '' },
20 | },
21 | ],
22 | }
23 |
24 | export default form
25 |
--------------------------------------------------------------------------------
/src/registry/forms/workflowStep.ts:
--------------------------------------------------------------------------------
1 | const form = {
2 | id: '5ce5085a-141a-40cd-9a9b-c431cf1d14f5',
3 | name: 'Workflow step',
4 | reference: 'workflow-step',
5 |
6 | endpoint: 'd/workflow-step',
7 | questions: [
8 | { text: 'Component', reference: 'component', component: 'Input' },
9 | { text: 'Properties', reference: 'props', component: 'Json' },
10 | { text: 'Name', reference: 'name', component: 'Input' },
11 | ],
12 | }
13 |
14 | export default form
15 |
--------------------------------------------------------------------------------
/src/registry/iconRegistry.ts:
--------------------------------------------------------------------------------
1 | const modules: { default?: any } = import.meta.glob(
2 | ['./icons/**/*.ts', './icons/**/*.tsx'],
3 | {
4 | eager: true,
5 | },
6 | )
7 |
8 | const match = /.*\/([\w]+)\.ts[x]?$/
9 | export const iconRegistry: any = Object.fromEntries(
10 | Object.entries(modules).map(([file, module]) => [
11 | file.replace(match, '$1'),
12 | module.default,
13 | ]),
14 | )
15 |
16 | export default iconRegistry
17 |
--------------------------------------------------------------------------------
/src/registry/icons/Accessibility.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/Accessibility')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Add.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/AddOutlined')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/ArrowRight.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/ArrowRight')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Attachment.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/AttachFile')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Back.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/ArrowBackIos')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Bandaid.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/Healing')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Bars.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/Menu')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Bolt.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/Bolt')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Build.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/Build')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Building.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/Business')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Calendar.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/CalendarToday')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Camera.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/CameraAlt')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Cancel.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/DoDisturb')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Cert.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/Verified')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Chart.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/BarChartOutlined')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Checklist.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/PlaylistAddCheck')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Clash.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/SportsMma')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Clock.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/AccessTime')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Close.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/Close')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Comment.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/ChatBubbleOutline')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Construction.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/Construction')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Copy.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/FileCopyOutlined')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Database.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/Storage')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Defect.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/FactCheck')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Delete.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/DeleteOutline')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Dollar.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/AttachMoney')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Done.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/DoneOutlined')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Down.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/ExpandMore')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Download.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/FileDownload')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Drag.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/DragHandle')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Drive.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/InsertDriveFileOutlined')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Edit.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/Edit')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Ellipsis.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/MoreHoriz')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/EllipsisVertical.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/MoreVert')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Email.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/MailOutline')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Equipment.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/HomeRepairService')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Event.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/Event')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/File.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/Description')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Filter.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/CandlestickChartOutlined')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Flow.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/AccountTree')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Folder.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/Folder')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Forward.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/ArrowForwardIos')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Gauge.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/Speed')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Gears.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/SettingsOutlined')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Home.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/Home')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Image.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/Image')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Images.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/Collections')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Info.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/InfoOutlined')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Invoice.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/Receipt')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Key.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/Key')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Left.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/ChevronLeft')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Link.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/Link')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/List.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/FormatListBulleted')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Lock.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/Lock')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Logout.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/Logout')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Mail.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/MailOutline')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Map.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/Place')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Medication.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/Medication')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Menu.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/Menu')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Mobile.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/PhoneIphone')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Move.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/MoveDown')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Notes.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/SpeakerNotes')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Notifications.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/NotificationsNone')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Page.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/Description')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Pdf.tsx:
--------------------------------------------------------------------------------
1 | const icon = {
2 | svg: () => (
3 |
10 | ),
11 | }
12 |
13 | export default icon
14 |
--------------------------------------------------------------------------------
/src/registry/icons/Phone.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/Phone')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Pie.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/PieChartOutlineOutlined')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Plus.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/Add')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Pool.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/Pool')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Power.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/PowerOutlined')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Question.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/Help')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Redo.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/Redo')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Report.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/ShowChartOutlined')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Right.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/ChevronRight')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Rowing.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/Rowing')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Save.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/Save')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Scales.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/BalanceOutlined')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Search.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/SearchOutlined')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Security.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/Security')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Send.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/Send')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/ShoppingCart.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/ShoppingCart')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Signature.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/HistoryEdu')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Stadium.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/Stadium')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Sub.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/Subscript')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Sun.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/WbSunny')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Support.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/Support')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Sweep.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/CleaningServices')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Table.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/TableChartOutlined')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Tick.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/DoneOutlined')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Tool.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/Build')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Trash.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/DeleteOutline')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Undo.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/Undo')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Up.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/ArrowUpward')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Upload.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/FileUpload')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/User.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/Person')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/UserOutline.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/PersonOutlineOutlined')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Users.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/Group')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Vaccines.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/Vaccines')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Video.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/Videocam')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/View.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/ManageSearch')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Warehouse.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/Warehouse')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/icons/Warning.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | const icon = {
4 | icon: lazy(() => import('@mui/icons-material/WarningAmber')),
5 | }
6 |
7 | export default icon
8 |
--------------------------------------------------------------------------------
/src/registry/moduleRegistry.ts:
--------------------------------------------------------------------------------
1 | const modules: { default?: any } = import.meta.glob('./modules/**/*.ts', {
2 | eager: true,
3 | })
4 |
5 | const match = /.*\/([\w]+)\.ts$/
6 | const moduleRegistry = Object.entries(modules).map(
7 | ([file, component]: any) => ({
8 | reference: file.replace(match, '$1'),
9 | ...component.default,
10 | }),
11 | )
12 |
13 | export default moduleRegistry
14 |
--------------------------------------------------------------------------------
/src/registry/modules/activity.ts:
--------------------------------------------------------------------------------
1 | const module = {
2 | name: 'Activties',
3 | icon: 'users',
4 | minor: true,
5 | }
6 |
7 | export default module
8 |
--------------------------------------------------------------------------------
/src/registry/modules/allocation.ts:
--------------------------------------------------------------------------------
1 | const module = {
2 | name: 'Allocations',
3 | icon: 'calendar',
4 | minor: true,
5 | }
6 |
7 | export default module
8 |
--------------------------------------------------------------------------------
/src/registry/modules/booking.ts:
--------------------------------------------------------------------------------
1 | const module = {
2 | name: 'Booking',
3 | icon: 'calendar',
4 | }
5 |
6 | export default module
7 |
--------------------------------------------------------------------------------
/src/registry/modules/calendar.ts:
--------------------------------------------------------------------------------
1 | const module = {
2 | name: 'Calendar',
3 | icon: 'calendar',
4 | }
5 |
6 | export default module
7 |
--------------------------------------------------------------------------------
/src/registry/modules/crm.ts:
--------------------------------------------------------------------------------
1 | const module = {
2 | name: 'CRM',
3 | icon: 'users',
4 | }
5 |
6 | export default module
7 |
--------------------------------------------------------------------------------
/src/registry/modules/email.ts:
--------------------------------------------------------------------------------
1 | const module = {
2 | name: 'Email',
3 | icon: 'mail',
4 | minor: true,
5 | }
6 |
7 | export default module
8 |
--------------------------------------------------------------------------------
/src/registry/modules/hirer.ts:
--------------------------------------------------------------------------------
1 | const module = {
2 | name: 'Hirer',
3 | icon: 'users',
4 | minor: true,
5 | }
6 |
7 | export default module
8 |
--------------------------------------------------------------------------------
/src/registry/modules/inspection.ts:
--------------------------------------------------------------------------------
1 | const module = {
2 | name: 'Inspection',
3 | icon: 'checklist',
4 | }
5 |
6 | export default module
7 |
--------------------------------------------------------------------------------
/src/registry/modules/lifeguard.ts:
--------------------------------------------------------------------------------
1 | const module = {
2 | name: 'Lifeguard',
3 | icon: 'support',
4 | }
5 |
6 | export default module
7 |
--------------------------------------------------------------------------------
/src/registry/modules/maintenance.ts:
--------------------------------------------------------------------------------
1 | const module = {
2 | name: 'Maintenance',
3 | icon: 'build',
4 | }
5 |
6 | export default module
7 |
--------------------------------------------------------------------------------
/src/registry/modules/pool.ts:
--------------------------------------------------------------------------------
1 | const module = {
2 | name: 'Pool',
3 | icon: 'pool',
4 | }
5 |
6 | export default module
7 |
--------------------------------------------------------------------------------
/src/registry/modules/schedule.ts:
--------------------------------------------------------------------------------
1 | const module = {
2 | name: 'Schedule',
3 | icon: 'calendar',
4 | }
5 |
6 | export default module
7 |
--------------------------------------------------------------------------------
/src/registry/modules/storage.ts:
--------------------------------------------------------------------------------
1 | const module = {
2 | name: 'Storage',
3 | icon: 'building',
4 | minor: true,
5 | }
6 |
7 | export default module
8 |
--------------------------------------------------------------------------------
/src/registry/modules/testing.ts:
--------------------------------------------------------------------------------
1 | const module = {
2 | name: 'Testing / Dev',
3 | icon: 'col:orange',
4 | }
5 |
6 | export default module
7 |
--------------------------------------------------------------------------------
/src/registry/pageRegistry.ts:
--------------------------------------------------------------------------------
1 | const modules: { default?: any } = import.meta.glob(
2 | ['../app/**/*.ts', '../app/**/*.tsx'],
3 | {
4 | eager: true,
5 | },
6 | )
7 |
8 | const pageRegistry: any = Object.values(modules).map((module) => module.default)
9 |
10 | export default pageRegistry
11 |
--------------------------------------------------------------------------------
/src/registry/permissionRegistry.ts:
--------------------------------------------------------------------------------
1 | const permissionRegistry = [
2 | {
3 | id: '122bd551-5ca8-11ed-9fe0-54cd06b88880',
4 | code: 'application',
5 | name: 'application',
6 | category: 'application',
7 | },
8 | {
9 | id: '35da9357-5ca4-11ed-9fe0-54cd06b88880',
10 | code: 'site_admin',
11 | name: 'site_admin',
12 | category: 'site_admin',
13 | },
14 | {
15 | id: '2d216672-5ca4-11ed-9fe0-54cd06b88880',
16 | code: 'dashboard',
17 | name: 'dashboard',
18 | category: 'dashboard',
19 | },
20 | {
21 | id: '2d2f9333-5ca4-11ed-9fe0-54cd06b88880',
22 | code: 'client-dashboard',
23 | name: 'client-dashboard',
24 | category: 'client-dashboard',
25 | },
26 | {
27 | id: 'ce8dfc17-5cb9-11ed-9fe0-54cd06b88880',
28 | code: 'calendar',
29 | name: 'calendar',
30 | category: 'calendar',
31 | },
32 | {
33 | id: 'd27a0877-5cb9-11ed-9fe0-54cd06b88880',
34 | code: 'admin',
35 | name: 'admin',
36 | category: 'admin',
37 | },
38 | ]
39 |
40 | export default permissionRegistry
41 |
--------------------------------------------------------------------------------
/src/setupTests.ts:
--------------------------------------------------------------------------------
1 | // jest-dom adds custom jest matchers for asserting on DOM nodes.
2 | // allows you to do things like:
3 | // expect(element).toHaveTextContent(/react/i)
4 | // learn more: https://github.com/testing-library/jest-dom
5 | import '@testing-library/jest-dom';
6 |
--------------------------------------------------------------------------------
/src/utilities/localStorage.ts:
--------------------------------------------------------------------------------
1 | export const siteName = window.location.pathname.split('/')[1].trim()
2 |
3 | // Get string from local storage based on key
4 | export const storageGet = (key: string) =>
5 | localStorage.getItem(siteName + '-' + key) || ''
6 |
7 | // Get array from local storage based on key
8 | export const storageGetArray = (key: string) =>
9 | JSON.parse(localStorage.getItem(siteName + '-' + key) || '[]')
10 |
11 | // Set local storage item
12 | export const storageSet = (key: string, value: string | object) =>
13 | localStorage.setItem(
14 | siteName + '-' + key,
15 | typeof value === 'string' ? value : JSON.stringify(value),
16 | )
17 |
18 | // Remove from local storage based on key
19 | export const storageRemove = (key: string) =>
20 | localStorage.removeItem(siteName + '-' + key)
21 |
--------------------------------------------------------------------------------
/src/vite-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es2017",
4 | "lib": ["dom", "dom.iterable", "esnext"],
5 | "allowJs": true,
6 | "skipLibCheck": true,
7 | "esModuleInterop": true,
8 | "strict": true,
9 | "forceConsistentCasingInFileNames": true,
10 | "module": "esnext",
11 | "moduleResolution": "node",
12 | "resolveJsonModule": true,
13 | "isolatedModules": true,
14 | "noEmit": true,
15 | "jsx": "preserve",
16 | "incremental": true,
17 | "baseUrl": "."
18 | // "paths": {
19 | // "app/*": ["../app/*"]
20 | // // "@components/*": ["src/components/*"],
21 | // // "@hooks/*": ["src/hooks/*"],
22 | // // "@context/*": ["src/context/*"]
23 | // }
24 | },
25 | "include": ["app", "src", "**/*.ts", "**/*.tsx"],
26 | "exclude": ["node_modules"],
27 | "references": [{ "path": "./tsconfig.node.json" }]
28 | }
29 |
--------------------------------------------------------------------------------
/tsconfig.node.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "composite": true,
4 | "module": "ESNext",
5 | "moduleResolution": "Node",
6 | "allowSyntheticDefaultImports": true
7 | },
8 | "include": ["vite.config.ts"]
9 | }
10 |
--------------------------------------------------------------------------------
/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import react from '@vitejs/plugin-react'
3 | import path from 'path'
4 |
5 | // https://vitejs.dev/config/
6 | export default defineConfig({
7 | plugins: [react()],
8 | base: './',
9 | build: {
10 | outDir: './build',
11 | },
12 | resolve: {
13 | alias: {
14 | src: path.resolve(__dirname, './src'),
15 | },
16 | },
17 | server: {
18 | watch: {
19 | usePolling: true,
20 | },
21 | },
22 | })
23 |
--------------------------------------------------------------------------------