@simitgroup/simpleapp-generator 1.0.33 → 1.0.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.vscode/settings.json +3 -0
- package/README.md +185 -13
- package/buildinschemas copy/autoincreament.autoinc.jsonschema.json +39 -0
- package/buildinschemas copy/branch.branch.jsonschema.json +41 -0
- package/buildinschemas copy/docnoformat.docno.jsonschema.json +41 -0
- package/buildinschemas copy/organization.org.jsonschema.json +50 -0
- package/buildinschemas copy/permission.perm.jsonschema.json +23 -0
- package/buildinschemas copy/permission.perm.jsonschema.try.json +25 -0
- package/buildinschemas copy/tenant.tenant.jsonschema.json +21 -0
- package/buildinschemas copy/tenant.tenant.jsonschema.try.json +27 -0
- package/buildinschemas copy/user.user.jsonschema.json +31 -0
- package/dist/buildinschemas/autoincreament.d.ts +3 -0
- package/dist/buildinschemas/autoincreament.d.ts.map +1 -0
- package/dist/buildinschemas/autoincreament.js +36 -0
- package/dist/buildinschemas/autoincreament.js.map +1 -0
- package/dist/buildinschemas/branch.d.ts +3 -0
- package/dist/buildinschemas/branch.d.ts.map +1 -0
- package/dist/buildinschemas/branch.js +41 -0
- package/dist/buildinschemas/branch.js.map +1 -0
- package/dist/buildinschemas/docnoformat.d.ts +3 -0
- package/dist/buildinschemas/docnoformat.d.ts.map +1 -0
- package/dist/buildinschemas/docnoformat.js +60 -0
- package/dist/buildinschemas/docnoformat.js.map +1 -0
- package/dist/buildinschemas/index.d.ts +8 -0
- package/dist/buildinschemas/index.d.ts.map +1 -0
- package/dist/buildinschemas/index.js +18 -0
- package/dist/buildinschemas/index.js.map +1 -0
- package/dist/buildinschemas/organization.d.ts +3 -0
- package/dist/buildinschemas/organization.d.ts.map +1 -0
- package/dist/buildinschemas/organization.js +34 -0
- package/dist/buildinschemas/organization.js.map +1 -0
- package/dist/buildinschemas/permission.d.ts +3 -0
- package/dist/buildinschemas/permission.d.ts.map +1 -0
- package/dist/buildinschemas/permission.js +34 -0
- package/dist/buildinschemas/permission.js.map +1 -0
- package/dist/buildinschemas/tenant.d.ts +3 -0
- package/dist/buildinschemas/tenant.d.ts.map +1 -0
- package/dist/buildinschemas/tenant.js +41 -0
- package/dist/buildinschemas/tenant.js.map +1 -0
- package/dist/buildinschemas/user.d.ts +3 -0
- package/dist/buildinschemas/user.d.ts.map +1 -0
- package/dist/buildinschemas/user.js +31 -0
- package/dist/buildinschemas/user.js.map +1 -0
- package/dist/constant.d.ts +4 -0
- package/dist/constant.d.ts.map +1 -0
- package/dist/constant.js +2 -1
- package/dist/constant.js.map +1 -1
- package/dist/framework.d.ts +10 -0
- package/dist/framework.d.ts.map +1 -0
- package/dist/framework.js +119 -68
- package/dist/framework.js.map +1 -1
- package/dist/generate-allow-changebackend.js +305 -0
- package/dist/generate-allow-changebackend.js.map +1 -0
- package/dist/generate.d.ts +2 -0
- package/dist/generate.d.ts.map +1 -0
- package/dist/generate.js +307 -235
- package/dist/generate.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +83 -20
- package/dist/index.js.map +1 -1
- package/dist/libs.d.ts +2 -0
- package/dist/libs.d.ts.map +1 -0
- package/dist/processors/groupsbuilder.js +2 -0
- package/dist/processors/groupsbuilder.js.map +1 -0
- package/dist/processors/jsonschemabuilder.d.ts +4 -0
- package/dist/processors/jsonschemabuilder.d.ts.map +1 -0
- package/dist/processors/jsonschemabuilder.js +146 -172
- package/dist/processors/jsonschemabuilder.js.map +1 -1
- package/dist/schematype/baseschema.js +25 -0
- package/dist/schematype/baseschema.js.map +1 -0
- package/dist/schematype/default.js +2 -0
- package/dist/schematype/default.js.map +1 -0
- package/dist/schematype/index.js +12 -0
- package/dist/schematype/index.js.map +1 -0
- package/dist/schematype/primarymasterdata.js +38 -0
- package/dist/schematype/primarymasterdata.js.map +1 -0
- package/dist/schematype/simple.js +24 -0
- package/dist/schematype/simple.js.map +1 -0
- package/dist/schematype/simplemasterdata.js +31 -0
- package/dist/schematype/simplemasterdata.js.map +1 -0
- package/dist/schematype/transaction.js +74 -0
- package/dist/schematype/transaction.js.map +1 -0
- package/dist/storage.d.ts +3 -0
- package/dist/storage.d.ts.map +1 -0
- package/dist/storage.js +2 -2
- package/dist/storage.js.map +1 -1
- package/dist/type.d.ts +164 -0
- package/dist/type.d.ts.map +1 -0
- package/dist/type.js +16 -1
- package/dist/type.js.map +1 -1
- package/dist/validation.d.ts +1 -0
- package/dist/validation.d.ts.map +1 -0
- package/package.json +3 -1
- package/src/buildinschemas/autoincreament.ts +34 -0
- package/src/buildinschemas/branch.ts +39 -0
- package/src/buildinschemas/docnoformat.ts +58 -0
- package/src/buildinschemas/index.ts +7 -0
- package/src/buildinschemas/organization.ts +31 -0
- package/src/buildinschemas/permission.ts +31 -0
- package/src/buildinschemas/tenant.ts +38 -0
- package/src/buildinschemas/user.ts +28 -0
- package/src/constant.ts +2 -1
- package/src/framework.ts +125 -67
- package/src/generate.ts +323 -274
- package/src/generate.ts.backup +339 -0
- package/src/index.ts +92 -18
- package/src/processors/jsonschemabuilder.ts +199 -226
- package/src/processors/jsonschemabuilder.ts-old +383 -0
- package/src/storage.ts +1 -1
- package/src/type.ts +94 -27
- package/templates/basic/nest/controller.ts.eta +255 -0
- package/templates/basic/nest/default.ts.eta +42 -0
- package/templates/basic/{model.eta → nest/model.ts.eta} +18 -5
- package/templates/basic/nest/processor.ts.eta +129 -0
- package/templates/basic/nest/service.ts.eta +64 -0
- package/templates/basic/{type.eta → nest/type.ts.eta} +3 -3
- package/templates/basic/nuxt/default.ts.eta +42 -0
- package/templates/basic/{pageindex.vue.eta → nuxt/pages.crud.vue.eta} +82 -20
- package/templates/basic/nuxt/simpleapp.doc.ts.eta +11 -0
- package/templates/basic/nuxt/simpleapp.generate.client.ts.eta +212 -0
- package/templates/nest/.env.eta +31 -0
- package/templates/nest/.gitignore.eta +40 -0
- package/templates/nest/src/app.controller.ts.eta +19 -0
- package/templates/nest/src/app.module.ts.eta +77 -0
- package/templates/nest/src/app.service.ts.eta +9 -0
- package/templates/nest/src/main.ts.eta +58 -0
- package/templates/nest/src/simpleapp/generate/apischemas/index.ts.eta +16 -0
- package/templates/nest/src/simpleapp/generate/commons/decorators/appuser.decorator.ts.eta +8 -0
- package/templates/nest/src/simpleapp/generate/commons/dicts/foreignkeys.ts.eta +1 -0
- package/templates/nest/src/simpleapp/generate/commons/docnogenerator.service.ts.eta +101 -0
- package/templates/nest/src/simpleapp/generate/commons/exceptions/SimpleAppExceptionFilter.ts.eta +39 -0
- package/templates/nest/src/simpleapp/generate/commons/interceptors/response.interceptor.ts.eta +38 -0
- package/templates/nest/src/simpleapp/generate/commons/middlewares/tenant.middleware.ts.eta +88 -0
- package/templates/nest/{Workflow.eta → src/simpleapp/generate/commons/providers/workflow.provider.ts.etax} +20 -14
- package/templates/nest/src/simpleapp/generate/commons/roles/roles.decorator.ts.eta +6 -0
- package/templates/nest/src/simpleapp/generate/commons/roles/roles.enum.ts.eta +28 -0
- package/templates/nest/src/simpleapp/generate/commons/roles/roles.group.ts.eta +10 -0
- package/templates/nest/src/simpleapp/generate/commons/roles/roles.guard.ts.eta +34 -0
- package/templates/nest/src/simpleapp/generate/commons/user.context.ts.eta +391 -0
- package/templates/nest/src/simpleapp/generate/controllers/simpleapp.controller.ts.eta +71 -0
- package/templates/nest/src/simpleapp/generate/models/perm.model.ts.eta +53 -0
- package/templates/nest/src/simpleapp/generate/models/tenant.model.ts.eta +45 -0
- package/templates/nest/src/simpleapp/generate/models/user.model.ts.eta +57 -0
- package/templates/nest/src/simpleapp/generate/processors/simpleapp.processor.ts.eta +624 -0
- package/templates/nest/src/simpleapp/generate/types/index.ts.eta +19 -0
- package/templates/nest/src/simpleapp/profile/profile.apischema.ts.eta +74 -0
- package/templates/nest/src/simpleapp/profile/profile.controller.ts.eta +110 -0
- package/templates/nest/src/simpleapp/profile/profile.service.ts.eta +195 -0
- package/templates/nest/src/simpleapp/profile/profile.types.ts.eta +18 -0
- package/templates/nest/src/simpleapp/services/autoinc.service.ts.eta +89 -0
- package/templates/nest/src/simpleapp/services/branch.service.ts.eta +66 -0
- package/templates/nest/src/simpleapp/services/docno.service.ts.eta +93 -0
- package/templates/nest/src/simpleapp/services/org.service.ts.eta +67 -0
- package/templates/nest/src/simpleapp/services/perm.service.ts.eta +102 -0
- package/templates/nest/src/simpleapp/services/tenant.service.ts.eta +69 -0
- package/templates/nest/src/simpleapp/services/user.service.ts.eta +66 -0
- package/templates/nest/src/simpleapp/simpleapp.module.ts.eta +43 -0
- package/templates/nuxt/.env.eta +21 -0
- package/templates/nuxt/.gitignore.eta +28 -0
- package/templates/nuxt/app.vue.eta +5 -2
- package/templates/nuxt/assets/css/tailwind.css.eta +35 -0
- package/templates/nuxt/components/CrudNestedDoc.vue.eta +164 -0
- package/templates/nuxt/components/CrudSimple.vue.eta +179 -0
- package/templates/nuxt/{components.debugdocdata.vue.eta → components/DebugDocumentData.vue.eta} +4 -1
- package/templates/nuxt/{components.eventmonitor.vue.eta → components/EventMonitor.vue.eta} +27 -27
- package/templates/nuxt/components/Invitation.vue.eta +50 -0
- package/templates/nuxt/{components.menus.vue.eta → components/Menus.vue.eta} +17 -15
- package/templates/nuxt/components/PermissionInfo.vue.eta +92 -0
- package/templates/nuxt/components/SimpleAppAutocomplete.vue.eta +131 -0
- package/templates/nuxt/components/SimpleAppAutocompletemulti.vue.eta +73 -0
- package/templates/nuxt/components/SimpleAppCalendar.vue.eta +55 -0
- package/templates/nuxt/components/SimpleAppCheckbox.vue.eta +29 -0
- package/templates/nuxt/components/SimpleAppChip.vue.eta +28 -0
- package/templates/nuxt/components/SimpleAppColor.vue.eta +41 -0
- package/templates/nuxt/components/SimpleAppDatatable.vue.eta +20 -0
- package/templates/nuxt/components/SimpleAppDocumentNo.vue.eta +90 -0
- package/templates/nuxt/components/SimpleAppDynamicInput.vue.eta +29 -0
- package/templates/nuxt/components/SimpleAppEditor.vue.eta +31 -0
- package/templates/nuxt/components/SimpleAppForm.vue.eta +131 -0
- package/templates/nuxt/components/SimpleAppInputTable.vue.eta +104 -0
- package/templates/nuxt/components/SimpleAppList.vue.eta +38 -0
- package/templates/nuxt/components/SimpleAppListmulti.vue.eta +41 -0
- package/templates/nuxt/components/SimpleAppNumber.vue.eta +32 -0
- package/templates/nuxt/components/SimpleAppPassword.vue.eta +41 -0
- package/templates/nuxt/components/SimpleAppRadio.vue.eta +42 -0
- package/templates/nuxt/components/SimpleAppRating.vue.eta +41 -0
- package/templates/nuxt/components/SimpleAppSelect.vue.eta +38 -0
- package/templates/nuxt/components/SimpleAppSelectmulti.vue.eta +39 -0
- package/templates/nuxt/components/SimpleAppSlider.vue.eta +42 -0
- package/templates/nuxt/components/SimpleAppSwitch.vue.eta +30 -0
- package/templates/nuxt/components/SimpleAppText.vue.eta +50 -0
- package/templates/nuxt/components/SimpleAppTextarea.vue.eta +30 -0
- package/templates/nuxt/components/SimpleAppValue.vue.eta +86 -0
- package/templates/nuxt/components/SimpleFieldContainer.vue.eta +102 -0
- package/templates/nuxt/components/XorgPicker.vue.eta +66 -0
- package/templates/nuxt/components/helper.ts.eta +90 -0
- package/templates/nuxt/components/type.ts.eta +32 -0
- package/templates/nuxt/composables/docformat.generate.ts.eta +5 -0
- package/templates/nuxt/{composables.getautocomplete.ts.eta → composables/getAutocomplete.generate.ts.eta} +4 -5
- package/templates/nuxt/{composables.getmenus.ts.eta → composables/getMenus.generate.ts.eta} +22 -7
- package/templates/nuxt/composables/getOpenApi.generate.ts.eta +6 -0
- package/templates/nuxt/composables/getTenant.generate.ts.eta +4 -0
- package/templates/nuxt/composables/getUserStore.generate.ts.eta +22 -0
- package/templates/nuxt/composables/logout.generate.ts.eta +22 -0
- package/templates/nuxt/composables/roles.generate.ts.eta +48 -0
- package/templates/nuxt/{layouts.default.vue.eta → layouts/default.vue.eta} +2 -0
- package/templates/nuxt/middleware/10.acl.global.ts.eta +38 -0
- package/templates/nuxt/nuxt.config.ts.eta +11 -1
- package/templates/nuxt/pages/[xorg]/branch/index.vue.eta +102 -0
- package/templates/nuxt/pages/[xorg]/docnoformat/[id].vue.eta +17 -0
- package/templates/nuxt/pages/[xorg]/docnoformat/index.vue.eta +269 -0
- package/templates/nuxt/pages/[xorg]/index.vue.eta +36 -0
- package/templates/nuxt/pages/[xorg]/organization/index.vue.eta +148 -0
- package/templates/nuxt/pages/[xorg]/permission/index.vue.eta +280 -0
- package/templates/nuxt/pages/[xorg]/tenant/index.vue.eta +93 -0
- package/templates/nuxt/pages/[xorg]/user/index.vue.eta +468 -0
- package/templates/nuxt/pages/index.vue.eta +191 -0
- package/templates/nuxt/pages/login.vue.eta +21 -0
- package/templates/nuxt/plugins/10.simpleapp-event.ts.eta +53 -0
- package/templates/nuxt/plugins/20.simpleapp-userstore.ts.eta +155 -0
- package/templates/nuxt/plugins/50.simpleapp-client.ts.eta +23 -0
- package/templates/nuxt/{server.api.ts.eta → server/api/[xorg]/[...].ts.eta} +5 -2
- package/templates/nuxt/server/api/auth/[...].ts.eta +68 -0
- package/templates/nuxt/{server.api.auth.logout.ts.eta → server/api/auth/logout.ts.eta} +1 -3
- package/templates/nuxt/server/api/profile/[...].ts.eta +150 -0
- package/templates/nuxt/server/api/profile/index.ts.eta +103 -0
- package/templates/nuxt/simpleapp/generate/clients/SimpleAppClient.ts.eta +187 -0
- package/templates/nuxt/simpleapp/generate/commons/documents.ts.eta +6 -0
- package/templates/nuxt/simpleapp/generate/commons/events.ts.eta +5 -0
- package/templates/nuxt/simpleapp/generate/commons/groups.ts.eta +11 -0
- package/templates/nuxt/simpleapp/generate/commons/roles.ts.eta +21 -0
- package/templates/nuxt/types/index.ts.eta +65 -0
- package/templates/project/README.md +11 -0
- package/templates/project/build.sh.eta +19 -0
- package/templates/project/config.json.eta +2 -0
- package/templates/project/generate.ts.eta +10 -0
- package/templates/project/schemas/category.ts.eta +26 -0
- package/templates/project/schemas/index.ts.eta +5 -0
- package/templates/project/schemas/product.ts.eta +59 -0
- package/templates/project/shares/hello.ts.eta +1 -0
- package/templates/project/shares/index.ts.eta +2 -0
- package/tsconfig.json +9 -2
- package/tsconfig.tsbuildinfo +1 -0
- package/definations/category.cat.jsonschema.json +0 -55
- package/definations/level.lvl.jsonschema.json +0 -48
- package/definations/product.prd.jsonschema.json +0 -46
- package/templates/basic/controller.eta +0 -152
- package/templates/basic/module.eta +0 -22
- package/templates/basic/service.eta +0 -47
- package/templates/basic/simpleappclient.eta +0 -123
- package/templates/nest/SimpleAppController.eta +0 -69
- package/templates/nest/SimpleAppService.eta +0 -391
- package/templates/nest/TenantMiddleware.eta +0 -34
- package/templates/nest/UserProvider.eta +0 -127
- package/templates/nest/app.controller.eta +0 -12
- package/templates/nest/app.module.eta +0 -64
- package/templates/nest/app.service.eta +0 -8
- package/templates/nest/inputvalidation-exception.eta +0 -6
- package/templates/nest/nest.env.eta +0 -28
- package/templates/nest/nest.main.eta +0 -31
- package/templates/nuxt/components.crudsimple.vue.eta +0 -124
- package/templates/nuxt/env.eta +0 -17
- package/templates/nuxt/pages.[xorg].index.vue.eta +0 -23
- package/templates/nuxt/pages.index.vue.eta +0 -69
- package/templates/nuxt/pages.login.vue.eta +0 -20
- package/templates/nuxt/plugins.simpleapp.ts.eta +0 -97
- package/templates/nuxt/server.api.auth[...].ts.eta +0 -233
- package/templates/nuxt/tailwind.css.eta +0 -49
- /package/templates/basic/{apischema.eta → nest/apischema.ts.eta} +0 -0
- /package/templates/basic/{jsonschema.eta → nest/jsonschema.ts.eta} +0 -0
- /package/templates/basic/{pageindexwithid.vue.eta → nuxt/pages.[id].vue.eta} +0 -0
- /package/templates/nest/{oauth2-redirect.eta → public_html/oauth2-redirect.html.eta} +0 -0
- /package/templates/nuxt/{composables.stringHelper.ts.eta → composables/stringHelper.generate.ts.eta} +0 -0
package/README.md
CHANGED
|
@@ -1,3 +1,47 @@
|
|
|
1
|
+
todo:
|
|
2
|
+
## high priority Job
|
|
3
|
+
|
|
4
|
+
[ ] add special search like isolate by user for autocomplete (add property of)
|
|
5
|
+
choose org then branch
|
|
6
|
+
[ ] create invoice and receipt
|
|
7
|
+
[x] fix error reporting and success reporting at frontend
|
|
8
|
+
[x] define some allow override and some not
|
|
9
|
+
[ ] json schema can set generate what page type, no define = no generate page
|
|
10
|
+
[ ] create tenant/org/branch auto increament
|
|
11
|
+
[ ] focus on functions customer, product, invoice and receipt
|
|
12
|
+
[~] repeat same typscript formula at frontend and backend
|
|
13
|
+
[ ] frontend search
|
|
14
|
+
[ ] new transaction CRUD ui
|
|
15
|
+
[ ] student UI
|
|
16
|
+
[ ] structure of save into another document
|
|
17
|
+
|
|
18
|
+
Permission and Authorization
|
|
19
|
+
[x] hide no permission window
|
|
20
|
+
[ ] hide no permission buttons
|
|
21
|
+
[x] permission user/group (pick hard coded group from some place)
|
|
22
|
+
[ ] figure how to get enum list from permission list for user schema
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
1. copy group-to-role to both frontend and backend
|
|
27
|
+
2. loop backend role code, and define into user role
|
|
28
|
+
3. loop frontend role code, and
|
|
29
|
+
1 update to getMenus,
|
|
30
|
+
2. existing all menus store as permission list
|
|
31
|
+
3. crud and etc page need verify existing user can go in this menu or not. if can't will render no permission
|
|
32
|
+
4. use directive to control show or not show button (new, save, delete)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
Custom Document Status and API
|
|
37
|
+
[ ] document status control
|
|
38
|
+
[ ] document api touch up
|
|
39
|
+
1. auto add document status column
|
|
40
|
+
2. change document status when change status
|
|
41
|
+
3. enum document status, but UI dont show the field
|
|
42
|
+
4. have document action, then show document button
|
|
43
|
+
|
|
44
|
+
|
|
1
45
|
# Quick start
|
|
2
46
|
** You need to have mongodb installed **
|
|
3
47
|
1. git clone from simpleapp-generator
|
|
@@ -25,13 +69,13 @@ pnpm dev
|
|
|
25
69
|
```sh
|
|
26
70
|
code ~/mydoc
|
|
27
71
|
```
|
|
28
|
-
|
|
29
|
-
* myapp/backend/src/class/docs/*, especially `controller,service,apischema`
|
|
72
|
+
you can change your project at:
|
|
30
73
|
* myapp/backend/.env
|
|
31
|
-
* myapp/backend/
|
|
32
|
-
|
|
33
|
-
* myapp/frontend/simpleapps/docs
|
|
74
|
+
* myapp/backend/src/hooks/*
|
|
75
|
+
|
|
34
76
|
* myapp/frontend/.env
|
|
77
|
+
* myapp/frontend/pages/*
|
|
78
|
+
|
|
35
79
|
|
|
36
80
|
|
|
37
81
|
# Special Properties:
|
|
@@ -108,10 +152,9 @@ Special Field Level property
|
|
|
108
152
|
all format recognize by ajv plus below:
|
|
109
153
|
|
|
110
154
|
1. tel: only digit, auto generate input tel
|
|
111
|
-
2.
|
|
112
|
-
3.
|
|
113
|
-
4.
|
|
114
|
-
5. x-text: do nothing, will auto generate textarea
|
|
155
|
+
2. documentno : will use documentno generator for auto generate document no
|
|
156
|
+
3. text: do nothing, will auto generate textarea
|
|
157
|
+
4. html editor: do nothing, will auto generate html editor
|
|
115
158
|
|
|
116
159
|
|
|
117
160
|
|
|
@@ -132,15 +175,36 @@ workflow ideal
|
|
|
132
175
|
3. bind hook to workflow?
|
|
133
176
|
|
|
134
177
|
|
|
135
|
-
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
1. try possibility of no backend modifications
|
|
182
|
+
3. completely hide all generated codes of frontend and backend, except allow change items
|
|
183
|
+
1. define hidden control infra of admin tenant, user api+ui (like need special role system-admin from keycloak)
|
|
184
|
+
add lodash plugin at both side
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
autocomplete can have more dependency filter like setting in jsonschema
|
|
188
|
+
2. way in jsonschema to use share source code for frontend/backend like
|
|
189
|
+
calculate tax
|
|
190
|
+
calculate subtotal
|
|
191
|
+
|
|
192
|
+
5. new transaction crud
|
|
193
|
+
d. windows
|
|
194
|
+
new user no tenant record how to do?
|
|
195
|
+
8. way to handle :id/api
|
|
196
|
+
9. service class which not using source code
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
|
|
136
200
|
1. create follow data
|
|
137
201
|
a. users
|
|
138
202
|
b. tenant / users
|
|
139
203
|
c. org
|
|
140
204
|
branch/user
|
|
141
205
|
group
|
|
142
|
-
|
|
143
|
-
|
|
206
|
+
|
|
207
|
+
|
|
144
208
|
3. json schema setting can define isolation type
|
|
145
209
|
2. page/index first login can pick tenant
|
|
146
210
|
3. create all window as xorg/index
|
|
@@ -215,6 +279,25 @@ x6. fill in data for tenant/org/branch created,updated,createdby,updatedby
|
|
|
215
279
|
1. Openapi some schema like primarykey/more not generated, cause error in ide
|
|
216
280
|
|
|
217
281
|
|
|
282
|
+
Document Numbering System
|
|
283
|
+
1. generate prepare list of document no for generate.
|
|
284
|
+
x-document-no + document-format
|
|
285
|
+
2. if x-document-no, will auto add docformat={}
|
|
286
|
+
3. button can pick document-no format
|
|
287
|
+
4. have add new function
|
|
288
|
+
5. if type manually wont create new
|
|
289
|
+
6. preview next no api
|
|
290
|
+
7. generate next no api
|
|
291
|
+
8. if _id = '', will auto preview next no
|
|
292
|
+
9. after change default format, will preview another next no
|
|
293
|
+
10. have list to pick format
|
|
294
|
+
11. support transactions
|
|
295
|
+
12. only list current branch document no options
|
|
296
|
+
11. master data
|
|
297
|
+
a. add list for document type
|
|
298
|
+
b. click doctype then can available document settings
|
|
299
|
+
c. document will set by branch
|
|
300
|
+
|
|
218
301
|
|
|
219
302
|
SimpleApp-Vue-Component Fix:
|
|
220
303
|
1. table
|
|
@@ -222,4 +305,93 @@ SimpleApp-Vue-Component Fix:
|
|
|
222
305
|
b. nested column data, like primarykey label
|
|
223
306
|
c. search and functions like filters, pagination, large datas
|
|
224
307
|
1. single/multi select
|
|
225
|
-
4. search at frontend
|
|
308
|
+
4. search at frontend
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
Coding Rules
|
|
312
|
+
1. create type and codes in 'shares'
|
|
313
|
+
2. service class and doc class
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
JSON Properties
|
|
319
|
+
document level property
|
|
320
|
+
{
|
|
321
|
+
"type":"object"
|
|
322
|
+
"x-simpleapp-config":{
|
|
323
|
+
//isolation type, none/tenant/org/branch
|
|
324
|
+
"isolationType":"none",
|
|
325
|
+
|
|
326
|
+
//what special allow access it, undefine mean only super admin, and resource+action role can go in
|
|
327
|
+
"requiredRoles":["SuperAdmin"],
|
|
328
|
+
|
|
329
|
+
// page type (example: crud), undefine will not generate page in frontend
|
|
330
|
+
"pageType":"crud",
|
|
331
|
+
|
|
332
|
+
//unique key for document, it build compound index depends on isolationtype
|
|
333
|
+
"uniqueKey":"invoiceNo",
|
|
334
|
+
|
|
335
|
+
//use as display name in autocomplete, also add into textsearch
|
|
336
|
+
"documentTitle":"InvoiceTitle", //no define this will not have auto complete and text search for this field
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
//frontend uniqueKey field become special input field which can generate doc number, once activated auto create new field `docNoFormat`
|
|
340
|
+
"generateDocumentNumber":true,
|
|
341
|
+
|
|
342
|
+
//frontend use this field to show current month document, docNumberFormat generator will have monthly document number setting
|
|
343
|
+
"documentDate":"invoiceDate",
|
|
344
|
+
|
|
345
|
+
//manage document status and accessibility, it auto add field `documentStatus` when define
|
|
346
|
+
"allStatus":[
|
|
347
|
+
{"status":"CO","readOnly":true,"actions":["revert","void","close"]},
|
|
348
|
+
{"status":"V","readOnly":true,"actions":["revert"]},
|
|
349
|
+
],
|
|
350
|
+
|
|
351
|
+
//all custom api, response, paras, operation put here. variable define at entrypoint or querypara
|
|
352
|
+
"allApi":[{
|
|
353
|
+
"action":"confirm",
|
|
354
|
+
"entrypoint":":id/confirm",
|
|
355
|
+
"requiredrole":["SuperUser"],
|
|
356
|
+
"method":"post",
|
|
357
|
+
"execute":"ping",
|
|
358
|
+
"description":"confirm document and change status to CO"
|
|
359
|
+
},{
|
|
360
|
+
"action":"void",
|
|
361
|
+
"entrypoint":":id/void",
|
|
362
|
+
"querypara":["reason"],
|
|
363
|
+
"requiredrole":["SuperUser"],
|
|
364
|
+
"method":"post",
|
|
365
|
+
"execute":"ping",
|
|
366
|
+
"description":"confirm document and change status to CO"
|
|
367
|
+
}],
|
|
368
|
+
|
|
369
|
+
// simple => pure model and service(no page,api),
|
|
370
|
+
// default => force masterdata property,
|
|
371
|
+
// transaction => force masterdata property
|
|
372
|
+
"schemaType": "default",
|
|
373
|
+
|
|
374
|
+
//frontend(client) and backend (processor) typescript class auto import this lib, helper for `formula`
|
|
375
|
+
"libs":[{"lib":"lodash","as":"_"}], // both process class and frontend client class will import same lib
|
|
376
|
+
|
|
377
|
+
// frontend apply recalculation everytime current document change
|
|
378
|
+
// backend auto apply formula during create and update
|
|
379
|
+
"formula": [ //apply both frontend and backend, it different with concept on change, sequence of formula important
|
|
380
|
+
{"jsonpath":"$.subtotal","formula":"jslib.getDocumentSubTotal(@F{$.details})"}, //apply formula into single field
|
|
381
|
+
{"jsonpath":"$.tags","formula":"$F{$.tags}.map(item=>item.toUppeCase())"}, //apply upper case to all item in string array
|
|
382
|
+
{"jsonpath":"$.details","loop":"jslib.calculateLineTotal(item)"}, //apply multiple calculation of subtotal, tax, amtaftertax and etc, using loop
|
|
383
|
+
{"jsonpath":"$.total","formula":"@F{$.subtotal} + @F{$.taxamt}"}, //apply simple formula here
|
|
384
|
+
],
|
|
385
|
+
|
|
386
|
+
// auto generate fields
|
|
387
|
+
documentType: 'SI',
|
|
388
|
+
documentName: 'Sales Invoice',
|
|
389
|
+
|
|
390
|
+
//auto generated foreign keys catalogue
|
|
391
|
+
"foreignKeys":{ "customer":["$.customer._id"], "user":[{"$.preparedby._id"},{$.approveby._id"}]}
|
|
392
|
+
},
|
|
393
|
+
"properties":{
|
|
394
|
+
"invoiceDate":{"type":"string"},
|
|
395
|
+
//and others field
|
|
396
|
+
}
|
|
397
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "object",
|
|
3
|
+
"x-page-type":"crud",
|
|
4
|
+
"x-document-api":[{
|
|
5
|
+
"action":"genNextNumber",
|
|
6
|
+
"entrypoint":"gennextno/:collection/:field",
|
|
7
|
+
"requiredrole":["User"],
|
|
8
|
+
"method":"get",
|
|
9
|
+
"execute":"generateNextNo",
|
|
10
|
+
"bpmn":"",
|
|
11
|
+
"description":"Get next no and trigger increase nextno"
|
|
12
|
+
}],
|
|
13
|
+
"x-ignore-autocomplete":true,
|
|
14
|
+
"required":["nextno","collectionName","fieldName"],
|
|
15
|
+
"properties": {
|
|
16
|
+
|
|
17
|
+
"collectionName": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"minLength":1,
|
|
20
|
+
"examples": [
|
|
21
|
+
"branch"
|
|
22
|
+
]
|
|
23
|
+
},
|
|
24
|
+
"fieldName": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"minLength":1,
|
|
27
|
+
"examples": [
|
|
28
|
+
"orgId"
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
"nextno": {
|
|
32
|
+
"type": "integer",
|
|
33
|
+
"minimum":1,
|
|
34
|
+
"examples": [
|
|
35
|
+
1
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "object",
|
|
3
|
+
"x-isolation-type":"tenant",
|
|
4
|
+
"properties": {
|
|
5
|
+
"branchId": {
|
|
6
|
+
"type": "integer",
|
|
7
|
+
"default": 1,
|
|
8
|
+
"minimum":1,
|
|
9
|
+
"x-autocomplete-field":true
|
|
10
|
+
},
|
|
11
|
+
"organization":{
|
|
12
|
+
"type":"object",
|
|
13
|
+
"x-foreignkey":"organization",
|
|
14
|
+
"properties":{
|
|
15
|
+
"_id":{"type":"string"},
|
|
16
|
+
"code":{"type":"string"},
|
|
17
|
+
"label":{"type":"string"},
|
|
18
|
+
"orgId":{"type":"integer"}
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"branchCode": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"x-document-no":true
|
|
24
|
+
|
|
25
|
+
},
|
|
26
|
+
"branchName": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"x-document-label":true
|
|
29
|
+
},
|
|
30
|
+
"active": {
|
|
31
|
+
"type": "boolean",
|
|
32
|
+
"default":true
|
|
33
|
+
},
|
|
34
|
+
"description": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"examples": [
|
|
37
|
+
""
|
|
38
|
+
]
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "object",
|
|
3
|
+
"x-page-type":"crud",
|
|
4
|
+
"x-document-api":[{
|
|
5
|
+
"action":"listDocFormats",
|
|
6
|
+
"entrypoint":"/listdocformats/:doctype",
|
|
7
|
+
"requiredrole":["User"],
|
|
8
|
+
"method":"get",
|
|
9
|
+
"execute":"listDocFormats",
|
|
10
|
+
"bpmn":"",
|
|
11
|
+
"description":"get list of document format for 1 doctype"
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"properties": {
|
|
15
|
+
"docNoFormatNo": {"type": "string","x-document-no":true,"examples": ["INV"]},
|
|
16
|
+
"docNoFormatName": { "type": "string", "x-document-label":true, "examples": ["Invoice Default Format"]},
|
|
17
|
+
"active": {"type": "boolean","examples": [true],"default":true},
|
|
18
|
+
"default":{"type": "boolean","examples": [true],"default":true},
|
|
19
|
+
"docNoType": {"type": "string","examples": ["SI","PI"]},
|
|
20
|
+
"docNoPattern": {"type": "string","examples": ["SI{YYMM}-<000>","PI-2023-<0000>"],"description":"{date} format as ISO8601 symbol"},
|
|
21
|
+
"isMonthly": {"type": "boolean","examples": [false]},
|
|
22
|
+
"nextNumber":{"type":"integer","examples":[1],"default":1},
|
|
23
|
+
"monthlySetting": {
|
|
24
|
+
"type": "object",
|
|
25
|
+
"properties": {
|
|
26
|
+
"jan": {"type": "integer","default":1},
|
|
27
|
+
"feb": {"type": "integer","default":1},
|
|
28
|
+
"mar": {"type": "integer","default":1},
|
|
29
|
+
"apr": {"type": "integer","default":1},
|
|
30
|
+
"may": {"type": "integer","default":1},
|
|
31
|
+
"jun": {"type": "integer","default":1},
|
|
32
|
+
"jul": {"type": "integer","default":1},
|
|
33
|
+
"aug": {"type": "integer","default":1},
|
|
34
|
+
"sep": {"type": "integer","default":1},
|
|
35
|
+
"oct": {"type": "integer","default":1},
|
|
36
|
+
"nov": {"type": "integer","default":1},
|
|
37
|
+
"dec": {"type": "integer","default":1}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "object",
|
|
3
|
+
"x-isolation-type":"tenant",
|
|
4
|
+
"x-page-type":"crud",
|
|
5
|
+
"required":["orgId","orgCode","orgName"],
|
|
6
|
+
"properties": {
|
|
7
|
+
"orgId": {
|
|
8
|
+
"type": "integer",
|
|
9
|
+
"default": 1,
|
|
10
|
+
"minimum":1,
|
|
11
|
+
"x-autocomplete-field":true
|
|
12
|
+
},
|
|
13
|
+
"orgCode": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"x-document-no":true,
|
|
16
|
+
"minLength":1,
|
|
17
|
+
"examples": [
|
|
18
|
+
"org1"
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
"orgName": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"x-document-label":true,
|
|
24
|
+
"examples": [
|
|
25
|
+
"Organization 1"
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
"active": {
|
|
29
|
+
"type": "boolean",
|
|
30
|
+
"default":true,
|
|
31
|
+
"examples": [
|
|
32
|
+
true
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
"description": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"format":"text",
|
|
38
|
+
"examples": [
|
|
39
|
+
"desc 1"
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
"timezone": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"examples": [
|
|
45
|
+
"Asia/Kuala_Lumpur"
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "object",
|
|
3
|
+
"required": ["tenantId","orgId","branchId","group","uid"],
|
|
4
|
+
"x-isolation-type":"tenant",
|
|
5
|
+
"x-ignore-autocomplete":true,
|
|
6
|
+
"x-document-api":[{
|
|
7
|
+
"action":"listUser",
|
|
8
|
+
"entrypoint":"listuser",
|
|
9
|
+
"requiredrole":["SuperAdmin"],
|
|
10
|
+
"method":"get",
|
|
11
|
+
"execute":"listUser",
|
|
12
|
+
"bpmn":"",
|
|
13
|
+
"description":"Get current permissionlist lookup user info"
|
|
14
|
+
}],
|
|
15
|
+
"properties": {
|
|
16
|
+
"tenantId": {"type": "integer"},
|
|
17
|
+
"orgId": {"type": "integer"},
|
|
18
|
+
"branchId": {"type": "integer"},
|
|
19
|
+
"group": {"type": "string"},
|
|
20
|
+
"uid": {"type": "string","x-foreignkey":"user"},
|
|
21
|
+
"user_id" : {"type":"string"}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "object",
|
|
3
|
+
"required": ["tenantId","orgId","branchId","group","uid"],
|
|
4
|
+
"x-simpleapp-config":{
|
|
5
|
+
"isolationType":"tenant",
|
|
6
|
+
"documentApi":[{
|
|
7
|
+
"action":"listUser",
|
|
8
|
+
"entrypoint":"listuser",
|
|
9
|
+
"requiredrole":["SuperAdmin"],
|
|
10
|
+
"method":"get",
|
|
11
|
+
"execute":"listUser",
|
|
12
|
+
"bpmn":"",
|
|
13
|
+
"description":"Get current permissionlist lookup user info"
|
|
14
|
+
}]
|
|
15
|
+
},
|
|
16
|
+
|
|
17
|
+
"properties": {
|
|
18
|
+
"tenantId": {"type": "integer"},
|
|
19
|
+
"orgId": {"type": "integer"},
|
|
20
|
+
"branchId": {"type": "integer"},
|
|
21
|
+
"group": {"type": "string"},
|
|
22
|
+
"uid": {"type": "string","x-foreignkey":"user"},
|
|
23
|
+
"user_id" : {"type":"string"}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "object",
|
|
3
|
+
"x-isolation-type":"none",
|
|
4
|
+
"x-required-role":["SuperAdmin"],
|
|
5
|
+
"x-page-type":"crud",
|
|
6
|
+
"required":["tenantId","tenantName","owner"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"tenantId": {"type": "integer","x-document-no":true,"minimum":1,"default": 1,"examples": [1]},
|
|
9
|
+
"tenantName": {"type": "string","x-document-label":true,"examples": ["tenant1"]},
|
|
10
|
+
"active": {"type": "boolean","examples": [true],"default":true},
|
|
11
|
+
"description": {"type": "string","examples": ["sample desc"]},
|
|
12
|
+
"owner": {"type": "object","x-foreignkey":"user", "required" :["_id","label","uid"],
|
|
13
|
+
"properties": {
|
|
14
|
+
"_id": {"type": "string","examples": ["aa"]},
|
|
15
|
+
"label": {"type": "string","examples": ["aaaa"]},
|
|
16
|
+
"uid":{"type":"string","examples":["xxxx-yyyy-wwww-zz"],"minLength":16}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "object",
|
|
3
|
+
"x-simpleapp-config":{
|
|
4
|
+
"isolationType":"none",
|
|
5
|
+
"requiredRoles":["SuperAdmin"],
|
|
6
|
+
"pageType":"crud",
|
|
7
|
+
"uniqueKey":"tenantId",
|
|
8
|
+
"label":"tenantName",
|
|
9
|
+
"foreignKeys":[]
|
|
10
|
+
},
|
|
11
|
+
|
|
12
|
+
"required":["tenantId","tenantName","owner"],
|
|
13
|
+
"properties": {
|
|
14
|
+
"tenantId": {"type": "integer","minimum":1,"default": 1,"examples": [1]},
|
|
15
|
+
"tenantName": {"type": "string","examples": ["tenant1"]},
|
|
16
|
+
"active": {"type": "boolean","examples": [true],"default":true},
|
|
17
|
+
"description": {"type": "string","examples": ["sample desc"]},
|
|
18
|
+
"owner": {"type": "object","x-foreignkey":"user", "required" :["_id","label","uid"],
|
|
19
|
+
"properties": {
|
|
20
|
+
"_id": {"type": "string","examples": ["aa"]},
|
|
21
|
+
"label": {"type": "string","examples": ["aaaa"]},
|
|
22
|
+
"uid":{"type":"string","examples":["xxxx-yyyy-wwww-zz"],"minLength":16}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "object",
|
|
3
|
+
"x-isolation-type":"tenant",
|
|
4
|
+
"x-required-role":["SuperAdmin"],
|
|
5
|
+
"x-page-type":"crud",
|
|
6
|
+
"properties": {
|
|
7
|
+
"uid": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"x-autocomplete-field":true,
|
|
10
|
+
"examples": [
|
|
11
|
+
"xxxxx-yyyyy-zzzzz-aaa"
|
|
12
|
+
]
|
|
13
|
+
},
|
|
14
|
+
"fullname": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"x-document-label":true,
|
|
17
|
+
"examples": [
|
|
18
|
+
"user 1"
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
"email": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"x-document-no":true,
|
|
24
|
+
"examples": [
|
|
25
|
+
"myemail@abc.com"
|
|
26
|
+
],
|
|
27
|
+
"format": "email"
|
|
28
|
+
},
|
|
29
|
+
"active": {"type": "boolean","default":true}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"autoincreament.d.ts","sourceRoot":"","sources":["../../src/buildinschemas/autoincreament.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAA2B,MAAM,SAAS,CAAA;AAE5D,eAAO,MAAM,cAAc,EAAC,UA8B3B,CAAA"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.autoincreament = void 0;
|
|
4
|
+
const type_1 = require("../type");
|
|
5
|
+
exports.autoincreament = {
|
|
6
|
+
type: "object",
|
|
7
|
+
"x-simpleapp-config": {
|
|
8
|
+
documentType: 'autoinc',
|
|
9
|
+
documentName: 'autoincreament',
|
|
10
|
+
isolationType: type_1.IsolationType.tenant,
|
|
11
|
+
pageType: "crud",
|
|
12
|
+
additionalApis: [{
|
|
13
|
+
action: "genNextNumber",
|
|
14
|
+
entrypoint: "gennextno/:collection/:field",
|
|
15
|
+
requiredrole: ["User"],
|
|
16
|
+
method: type_1.RESTMethods.get,
|
|
17
|
+
execute: "generateNextNo",
|
|
18
|
+
description: "Get next no and trigger increase nextno"
|
|
19
|
+
}],
|
|
20
|
+
},
|
|
21
|
+
required: ["nextno", "collectionName", "fieldName"],
|
|
22
|
+
properties: {
|
|
23
|
+
_id: { type: 'string' },
|
|
24
|
+
created: { type: 'string' },
|
|
25
|
+
updated: { type: 'string' },
|
|
26
|
+
createdby: { type: 'string' },
|
|
27
|
+
updatedby: { type: 'string' },
|
|
28
|
+
tenantId: { type: 'integer', default: 1, minimum: 1 },
|
|
29
|
+
orgId: { type: 'integer', default: 1, minimum: 1 },
|
|
30
|
+
branchId: { type: 'integer', default: 1, minimum: 1 },
|
|
31
|
+
collectionName: { type: "string", minLength: 1, },
|
|
32
|
+
fieldName: { type: "string", minLength: 1, },
|
|
33
|
+
nextno: { type: "integer", "minimum": 1 }
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=autoincreament.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"autoincreament.js","sourceRoot":"","sources":["../../src/buildinschemas/autoincreament.ts"],"names":[],"mappings":";;;AAAA,kCAA4D;AAE/C,QAAA,cAAc,GAAc;IACrC,IAAI,EAAE,QAAQ;IACd,oBAAoB,EAAC;QACnB,YAAY,EAAC,SAAS;QACtB,YAAY,EAAC,gBAAgB;QAC7B,aAAa,EAAC,oBAAa,CAAC,MAAM;QAClC,QAAQ,EAAC,MAAM;QACf,cAAc,EAAC,CAAC;gBACd,MAAM,EAAC,eAAe;gBACtB,UAAU,EAAC,8BAA8B;gBACzC,YAAY,EAAC,CAAC,MAAM,CAAC;gBACrB,MAAM,EAAC,kBAAW,CAAC,GAAG;gBACtB,OAAO,EAAC,gBAAgB;gBACxB,WAAW,EAAC,yCAAyC;aACtD,CAAC;KACH;IACD,QAAQ,EAAC,CAAC,QAAQ,EAAC,gBAAgB,EAAC,WAAW,CAAC;IAChD,UAAU,EAAE;QACV,GAAG,EAAC,EAAC,IAAI,EAAC,QAAQ,EAAC;QACnB,OAAO,EAAC,EAAC,IAAI,EAAC,QAAQ,EAAC;QACvB,OAAO,EAAC,EAAC,IAAI,EAAC,QAAQ,EAAC;QACvB,SAAS,EAAC,EAAC,IAAI,EAAC,QAAQ,EAAC;QACzB,SAAS,EAAC,EAAC,IAAI,EAAC,QAAQ,EAAC;QACzB,QAAQ,EAAE,EAAC,IAAI,EAAC,SAAS,EAAC,OAAO,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAE;QAC/C,KAAK,EAAE,EAAC,IAAI,EAAC,SAAS,EAAC,OAAO,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAE;QAC5C,QAAQ,EAAE,EAAC,IAAI,EAAC,SAAS,EAAC,OAAO,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAE;QAC/C,cAAc,EAAE,EAAC,IAAI,EAAE,QAAQ,EAAC,SAAS,EAAC,CAAC,GAAE;QAC7C,SAAS,EAAE,EAAC,IAAI,EAAE,QAAQ,EAAC,SAAS,EAAC,CAAC,GAAE;QACxC,MAAM,EAAC,EAAC,IAAI,EAAE,SAAS,EAAC,SAAS,EAAC,CAAC,EAAC;KACrC;CACJ,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"branch.d.ts","sourceRoot":"","sources":["../../src/buildinschemas/branch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAA2B,MAAM,SAAS,CAAA;AAE5D,eAAO,MAAM,MAAM,EAAC,UAoCnB,CAAA"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.branch = void 0;
|
|
4
|
+
const type_1 = require("../type");
|
|
5
|
+
exports.branch = {
|
|
6
|
+
type: "object",
|
|
7
|
+
"x-simpleapp-config": {
|
|
8
|
+
isolationType: type_1.IsolationType.tenant,
|
|
9
|
+
documentType: 'branch',
|
|
10
|
+
documentName: 'branch',
|
|
11
|
+
pageType: "crud",
|
|
12
|
+
uniqueKey: 'branchCode',
|
|
13
|
+
documentTitle: 'branchName',
|
|
14
|
+
additionalAutoCompleteFields: ['branchId']
|
|
15
|
+
},
|
|
16
|
+
"properties": {
|
|
17
|
+
_id: { type: 'string' },
|
|
18
|
+
created: { type: 'string' },
|
|
19
|
+
updated: { type: 'string' },
|
|
20
|
+
createdby: { type: 'string' },
|
|
21
|
+
updatedby: { type: 'string' },
|
|
22
|
+
tenantId: { type: 'integer', default: 1, minimum: 1 },
|
|
23
|
+
orgId: { type: 'integer', default: 1, minimum: 1 },
|
|
24
|
+
branchId: { type: 'integer', default: 1, minimum: 1 },
|
|
25
|
+
organization: {
|
|
26
|
+
type: "object",
|
|
27
|
+
"x-foreignkey": "organization",
|
|
28
|
+
properties: {
|
|
29
|
+
"_id": { "type": "string" },
|
|
30
|
+
"code": { "type": "string" },
|
|
31
|
+
"label": { "type": "string" },
|
|
32
|
+
"orgId": { "type": "integer" }
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
branchCode: { type: "string", minLength: 1 },
|
|
36
|
+
branchName: { type: "string", minLength: 1 },
|
|
37
|
+
active: { type: "boolean", default: true },
|
|
38
|
+
description: { type: "string", }
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=branch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"branch.js","sourceRoot":"","sources":["../../src/buildinschemas/branch.ts"],"names":[],"mappings":";;;AAAA,kCAA4D;AAE/C,QAAA,MAAM,GAAa;IAC5B,IAAI,EAAE,QAAQ;IACd,oBAAoB,EAAC;QACjB,aAAa,EAAC,oBAAa,CAAC,MAAM;QAClC,YAAY,EAAC,QAAQ;QACrB,YAAY,EAAC,QAAQ;QACrB,QAAQ,EAAC,MAAM;QACf,SAAS,EAAC,YAAY;QACtB,aAAa,EAAC,YAAY;QAC1B,4BAA4B,EAAE,CAAC,UAAU,CAAC;KAC7C;IACD,YAAY,EAAE;QACV,GAAG,EAAC,EAAC,IAAI,EAAC,QAAQ,EAAC;QACnB,OAAO,EAAC,EAAC,IAAI,EAAC,QAAQ,EAAC;QACvB,OAAO,EAAC,EAAC,IAAI,EAAC,QAAQ,EAAC;QACvB,SAAS,EAAC,EAAC,IAAI,EAAC,QAAQ,EAAC;QACzB,SAAS,EAAC,EAAC,IAAI,EAAC,QAAQ,EAAC;QACzB,QAAQ,EAAE,EAAC,IAAI,EAAC,SAAS,EAAC,OAAO,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAE;QAC/C,KAAK,EAAE,EAAC,IAAI,EAAC,SAAS,EAAC,OAAO,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAE;QAC5C,QAAQ,EAAE,EAAC,IAAI,EAAC,SAAS,EAAC,OAAO,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAE;QAC/C,YAAY,EAAC;YACX,IAAI,EAAC,QAAQ;YACb,cAAc,EAAC,cAAc;YAC7B,UAAU,EAAC;gBACP,KAAK,EAAC,EAAC,MAAM,EAAC,QAAQ,EAAC;gBACvB,MAAM,EAAC,EAAC,MAAM,EAAC,QAAQ,EAAC;gBACxB,OAAO,EAAC,EAAC,MAAM,EAAC,QAAQ,EAAC;gBACzB,OAAO,EAAC,EAAC,MAAM,EAAC,SAAS,EAAC;aAC7B;SACF;QACD,UAAU,EAAE,EAAC,IAAI,EAAE,QAAQ,EAAC,SAAS,EAAC,CAAC,EAAC;QACxC,UAAU,EAAE,EAAC,IAAI,EAAE,QAAQ,EAAC,SAAS,EAAC,CAAC,EAAC;QACxC,MAAM,EAAE,EAAC,IAAI,EAAE,SAAS,EAAC,OAAO,EAAC,IAAI,EAAC;QACtC,WAAW,EAAE,EAAC,IAAI,EAAE,QAAQ,GAAE;KAC/B;CAEN,CAAA"}
|