@simitgroup/simpleapp-generator 1.6.7-m-alpha → 2.0.0-a-alpha
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/ReleaseNote.md +7 -0
- package/dist/buildinschemas/autoincreament.js +1 -1
- package/dist/buildinschemas/branch.d.ts.map +1 -1
- package/dist/buildinschemas/branch.js +2 -0
- package/dist/buildinschemas/branch.js.map +1 -1
- package/dist/buildinschemas/docnoformat.js +1 -1
- package/dist/buildinschemas/docnoformat.js.map +1 -1
- package/dist/buildinschemas/documentevent.js +1 -1
- package/dist/buildinschemas/documentnoformat.d.ts +3 -0
- package/dist/buildinschemas/documentnoformat.d.ts.map +1 -0
- package/dist/buildinschemas/documentnoformat.js +58 -0
- package/dist/buildinschemas/documentnoformat.js.map +1 -0
- package/dist/buildinschemas/index.d.ts +0 -5
- package/dist/buildinschemas/index.d.ts.map +1 -1
- package/dist/buildinschemas/index.js +5 -11
- package/dist/buildinschemas/index.js.map +1 -1
- package/dist/buildinschemas/organization.d.ts.map +1 -1
- package/dist/buildinschemas/organization.js +3 -19
- package/dist/buildinschemas/organization.js.map +1 -1
- package/dist/buildinschemas/user.d.ts.map +1 -1
- package/dist/buildinschemas/user.js +5 -2
- package/dist/buildinschemas/user.js.map +1 -1
- package/dist/generate.d.ts.map +1 -1
- package/dist/generate.js +118 -23
- package/dist/generate.js.map +1 -1
- package/dist/type.d.ts +6 -0
- package/dist/type.d.ts.map +1 -1
- package/dist/type.js.map +1 -1
- package/package.json +1 -1
- package/src/buildinschemas/{autoincreament.ts → autoincreament.ts.backup} +1 -1
- package/src/buildinschemas/branch.ts +2 -0
- package/src/buildinschemas/{documentevent.ts → documentevent.ts.backup} +1 -1
- package/src/buildinschemas/{docnoformat.ts → documentnoformat.ts.backup} +3 -3
- package/src/buildinschemas/index.ts +4 -5
- package/src/buildinschemas/organization.ts +3 -19
- package/src/buildinschemas/user.ts +5 -2
- package/src/generate.ts +128 -28
- package/src/type.ts +6 -1
- package/templates/basic/nest/api.controller.ts.eta +153 -0
- package/templates/basic/nest/api.module.ts.eta +32 -0
- package/templates/basic/nest/api.resolver.ts.eta +94 -0
- package/templates/basic/nest/api.schema.ts.eta +20 -0
- package/templates/basic/nest/api.service.ts.eta +85 -0
- package/templates/basic/nest/controller.ts.eta +18 -119
- package/templates/basic/nest/default.ts.eta +16 -10
- package/templates/basic/nest/enum.ts.eta +16 -0
- package/templates/basic/nest/model.ts.eta +6 -28
- package/templates/basic/nest/module.ts.eta +25 -0
- package/templates/basic/nest/resolver.ts.eta +12 -56
- package/templates/basic/nest/schema.ts.eta +133 -0
- package/templates/basic/nest/service.ts.eta +82 -73
- package/templates/basic/nest/service.ts.eta-backup +50 -0
- package/templates/basic/nuxt/default.ts.eta +10 -8
- package/templates/basic/nuxt/pages.[id].vue.eta +2 -2
- package/templates/basic/nuxt/pages.form.vue.eta +2 -2
- package/templates/basic/nuxt/pages.viewer.vue.eta +2 -2
- package/templates/basic/nuxt/simpleapp.doc.ts.eta +1 -1
- package/templates/basic/nuxt/simpleapp.generate.client.ts.eta +7 -5
- package/templates/nest/src/app.module.ts._eta +53 -67
- package/templates/nest/src/main.ts._eta +1 -1
- package/templates/nest/src/simple-app/.core/features/auth/api-key/api-key.service.ts.eta +29 -0
- package/templates/nest/src/simple-app/.core/features/auth/api-key/api-key.type.ts.eta +5 -0
- package/templates/nest/src/simple-app/.core/features/auth/api-key/validators/interface.ts.eta +7 -0
- package/templates/nest/src/simple-app/.core/features/auth/api-key/validators/mini-api-key.validator.ts.eta +30 -0
- package/templates/nest/src/simple-app/.core/features/auth/api-key/validators/static-api-key.validator.ts.eta +27 -0
- package/templates/nest/src/simple-app/.core/features/auth/auth.module.ts.eta +9 -0
- package/templates/nest/src/{simpleapp/generate/commons/roles → simple-app/.core/features/auth/role-guard}/roles.enum.ts.eta +7 -7
- package/templates/nest/src/{simpleapp/generate/commons/roles → simple-app/.core/features/auth/role-guard}/roles.guard.ts.eta +1 -1
- package/templates/nest/src/simple-app/.core/features/auto-increament/auto-increament.model.ts.eta +10 -0
- package/templates/nest/src/simple-app/.core/features/auto-increament/auto-increament.module.ts.eta +18 -0
- package/templates/nest/src/simple-app/.core/features/auto-increament/auto-increament.schema.ts.eta +119 -0
- package/templates/nest/src/simple-app/.core/features/auto-increament/auto-increament.service.ts.eta +65 -0
- package/templates/nest/src/simple-app/.core/features/cron/base/cron.base.ts.eta +13 -0
- package/templates/nest/src/simple-app/.core/features/cron/cron-system/cron-system.module.ts.eta +17 -0
- package/templates/nest/src/simple-app/.core/features/cron/cron-system/cron-system.service.ts.eta +37 -0
- package/templates/nest/src/simple-app/.core/features/cron/cron-system/schemas/index.ts.eta +2 -0
- package/templates/nest/src/simple-app/.core/features/cron/cron.module.ts.eta +10 -0
- package/templates/nest/src/simple-app/.core/features/document-no-format/document-no-format.controller.ts.eta +31 -0
- package/templates/nest/src/simple-app/.core/features/document-no-format/document-no-format.model.ts.eta +15 -0
- package/templates/nest/src/simple-app/.core/features/document-no-format/document-no-format.module.ts.eta +12 -0
- package/templates/nest/src/simple-app/.core/features/document-no-format/document-no-format.schema.ts.eta +162 -0
- package/templates/nest/src/simple-app/.core/features/document-no-format/document-no-format.service.ts.eta +189 -0
- package/templates/nest/src/simple-app/.core/features/event/event.module.ts.eta +9 -0
- package/templates/nest/src/simple-app/.core/features/event/event.type.ts.eta +23 -0
- package/templates/nest/src/simple-app/.core/features/event/interface/event-after-create.interface.ts.eta +5 -0
- package/templates/nest/src/simple-app/.core/features/event/interface/event-after-delete.interface.ts.eta +5 -0
- package/templates/nest/src/simple-app/.core/features/event/interface/event-after-set-status.interface.ts.eta +5 -0
- package/templates/nest/src/simple-app/.core/features/event/interface/event-after-update.interface.ts.eta +5 -0
- package/templates/nest/src/simple-app/.core/features/event/interface/event-before-create.interface.ts.eta +5 -0
- package/templates/nest/src/simple-app/.core/features/event/interface/event-before-delete.interface.ts.eta +5 -0
- package/templates/nest/src/simple-app/.core/features/event/interface/event-before-set-status.interface.ts.eta +5 -0
- package/templates/nest/src/simple-app/.core/features/event/interface/event-before-update.interface.ts.eta +5 -0
- package/templates/nest/src/simple-app/.core/features/event/interface/index.ts.eta +8 -0
- package/templates/nest/src/simple-app/.core/features/foreign-key/foreign-key.module.ts.eta +16 -0
- package/templates/nest/src/simple-app/.core/features/log/log.module.ts.eta +20 -0
- package/templates/nest/src/simple-app/.core/features/log/log.service.ts.eta +68 -0
- package/templates/nest/src/simple-app/.core/features/log/schemas/api-event.schema.ts.eta +57 -0
- package/templates/nest/src/simple-app/.core/features/log/schemas/document-event.schema.ts.eta +87 -0
- package/templates/nest/src/simple-app/.core/features/log/schemas/index.ts.eta +2 -0
- package/templates/nest/src/simple-app/.core/features/maintenance/db-update/1.00.00/index.ts._eta +39 -0
- package/templates/nest/src/simple-app/.core/features/maintenance/db-update/index.ts._eta +8 -0
- package/templates/nest/src/simple-app/.core/features/maintenance/maintenance.controller.ts.eta +84 -0
- package/templates/nest/src/simple-app/.core/features/maintenance/maintenance.module.ts.eta +19 -0
- package/templates/nest/src/simple-app/.core/features/maintenance/maintenance.service.ts.eta +86 -0
- package/templates/nest/src/simple-app/.core/features/maintenance/schemas/db-update.ts.eta +17 -0
- package/templates/nest/src/simple-app/.core/features/maintenance/schemas/environment.ts.eta +23 -0
- package/templates/nest/src/{simpleapp/generate/workflow/formschema → simple-app/.core/features/maintenance/schemas}/index.ts.eta +3 -2
- package/templates/nest/src/simple-app/.core/features/mini-app/developer-portal/developer-portal-bridge.service.ts.eta.eta +31 -0
- package/templates/nest/src/simple-app/.core/features/mini-app/developer-portal/developer-portal-env-development.service.ts.eta +124 -0
- package/templates/nest/src/simple-app/.core/features/mini-app/developer-portal/developer-portal-env-production.service.ts.eta +50 -0
- package/templates/nest/src/simple-app/.core/features/mini-app/developer-portal/developer-portal.controller.ts.eta +41 -0
- package/templates/nest/src/simple-app/.core/features/mini-app/developer-portal/developer-portal.schema.ts.eta +18 -0
- package/templates/nest/src/simple-app/.core/features/mini-app/developer-portal/developer-portal.service.ts.eta +94 -0
- package/templates/nest/src/simple-app/.core/features/mini-app/developer-portal/dto/developer-portal-create-app.dto.ts.eta +22 -0
- package/templates/nest/src/simple-app/.core/features/mini-app/developer-portal/dto/developer-portal-publish-app.dto.ts.eta +0 -0
- package/templates/nest/src/simple-app/.core/features/mini-app/dto/imports.ts.eta +2 -0
- package/templates/nest/src/simple-app/.core/features/mini-app/dto/index.ts.eta +2 -0
- package/templates/nest/src/simple-app/.core/features/mini-app/dto/mini-app.ts.eta +55 -0
- package/templates/nest/src/simple-app/.core/features/mini-app/mini-app-manager/mini-app-manager-bridge.service.ts.eta +162 -0
- package/templates/nest/src/simple-app/.core/features/mini-app/mini-app-manager/mini-app-manager-env-development.service.ts.eta +140 -0
- package/templates/nest/src/simple-app/.core/features/mini-app/mini-app-manager/mini-app-manager-env-production.service.ts.eta +125 -0
- package/templates/nest/src/simple-app/.core/features/mini-app/mini-app-manager/mini-app-manager-policy.service.ts.eta +43 -0
- package/templates/nest/src/simple-app/.core/features/mini-app/mini-app-manager/mini-app-manager.controller.ts.eta +81 -0
- package/templates/nest/src/simple-app/.core/features/mini-app/mini-app-manager/mini-app-manager.enum.ts.eta +5 -0
- package/templates/nest/src/simple-app/.core/features/mini-app/mini-app-manager/mini-app-manager.error.ts.eta +24 -0
- package/templates/nest/src/simple-app/.core/features/mini-app/mini-app-manager/mini-app-manager.processor.ts.eta +309 -0
- package/templates/nest/src/simple-app/.core/features/mini-app/mini-app-manager/mini-app-manager.service.ts.eta +346 -0
- package/templates/nest/src/simple-app/.core/features/mini-app/mini-app-scope/mini-app-scope.decorator.ts.eta +5 -0
- package/templates/nest/src/simple-app/.core/features/mini-app/mini-app-scope/mini-app-scope.guard.ts.eta +43 -0
- package/templates/nest/src/simple-app/.core/features/mini-app/mini-app-scope/mini-app-scope.service.ts.eta +101 -0
- package/templates/nest/src/simple-app/.core/features/mini-app/mini-app.module.ts.eta +24 -0
- package/templates/nest/src/simple-app/.core/features/mini-app/types/miniApp.ts.eta +23 -0
- package/templates/nest/src/simple-app/.core/features/mini-app/utils/mini-app.util.ts.eta +26 -0
- package/templates/nest/src/simple-app/.core/features/policy/policy.module.ts.eta +12 -0
- package/templates/nest/src/simple-app/.core/features/policy/policy.service.ts.eta +45 -0
- package/templates/nest/src/{simpleapp/profile/profile.controller.ts._eta → simple-app/.core/features/profile/profile.controller.ts.eta} +37 -83
- package/templates/nest/src/simple-app/.core/features/profile/profile.module.ts.eta +22 -0
- package/templates/nest/src/simple-app/.core/features/profile/profile.schema.ts.eta +165 -0
- package/templates/nest/src/{simpleapp/profile/profile.service.ts._eta → simple-app/.core/features/profile/profile.service.ts.eta} +36 -48
- package/templates/nest/src/simple-app/.core/features/queue/queue-base/queue-base.consumer.ts.eta +196 -0
- package/templates/nest/src/simple-app/.core/features/queue/queue-base/queue-base.producer.ts.eta +147 -0
- package/templates/nest/src/simple-app/.core/features/queue/queue-user-context/queue-user-context.service.ts.eta +35 -0
- package/templates/nest/src/simple-app/.core/features/queue/queue.module.ts.eta +24 -0
- package/templates/nest/src/simple-app/.core/features/queue/queue.type.ts.eta +75 -0
- package/templates/nest/src/simple-app/.core/features/simple-app-core-features.module.ts.eta +51 -0
- package/templates/nest/src/{simpleapp/generate/commons/robotuser.service.ts.eta → simple-app/.core/features/user-context/robot-user.service.ts.eta} +27 -16
- package/templates/nest/src/simple-app/.core/features/user-context/user-context.module.ts.eta +24 -0
- package/templates/nest/src/simple-app/.core/features/user-context/user-context.type.ts.eta +15 -0
- package/templates/nest/src/{simpleapp/generate/commons → simple-app/.core/features/user-context}/user.context.ts.eta +469 -449
- package/templates/nest/src/{simpleapp/generate/commons/runwebhook.service.ts.eta → simple-app/.core/features/webhook/run-webhook.service.ts.eta} +7 -11
- package/templates/nest/src/simple-app/.core/features/webhook/schemas/index.ts.eta +2 -0
- package/templates/nest/src/simple-app/.core/features/webhook/schemas/webhook-log.schema.ts.eta +116 -0
- package/templates/nest/src/simple-app/.core/features/webhook/schemas/webhook.schema.ts.eta +177 -0
- package/templates/nest/src/simple-app/.core/features/webhook/webhook.module.ts.eta +20 -0
- package/templates/nest/src/{simpleapp/generate/controllers/simpleapp.controller.ts.eta → simple-app/.core/framework/base/simple-app.controller.ts.eta} +13 -35
- package/templates/nest/src/{simpleapp/generate/processors/simpleapp.processor.ts.eta → simple-app/.core/framework/base/simple-app.service.ts.eta} +242 -139
- package/templates/nest/src/simple-app/.core/framework/custom-exception.ts.eta +26 -0
- package/templates/nest/src/simple-app/.core/framework/framework.module.ts.eta +12 -0
- package/templates/nest/src/simple-app/.core/framework/schemas/index.ts.eta +3 -0
- package/templates/nest/src/simple-app/.core/framework/schemas/others.schema.ts.eta +153 -0
- package/templates/nest/src/simple-app/.core/framework/schemas/simple-app.schema.ts.eta +172 -0
- package/templates/nest/src/{simpleapp/generate/commons/interceptors/response.interceptor.ts.eta → simple-app/.core/framework/simple-app.interceptor.ts.eta} +12 -22
- package/templates/nest/src/{simpleapp/generate/commons/middlewares/tenant.middleware.ts.eta → simple-app/.core/framework/simple-app.middleware.ts.eta} +39 -15
- package/templates/nest/src/simple-app/.core/readme.md.eta +3 -0
- package/templates/nest/src/simple-app/.core/resources/core-resources.module.ts.eta +38 -0
- package/templates/nest/src/simple-app/.core/simple-app-core.module.ts.eta +18 -0
- package/templates/nest/src/simple-app/.core/utils/dayjs.ts.eta +47 -0
- package/templates/nest/src/simple-app/.core/utils/locale-tool.ts.eta +11 -0
- package/templates/nest/src/simple-app/.core/utils/string-utils.ts.eta +1 -0
- package/templates/nest/src/simple-app/.resources/readme.md.eta +3 -0
- package/templates/nest/src/simple-app/.resources/resources.module.ts.eta +36 -0
- package/templates/nest/src/simple-app/apis/readme.md.eta +9 -0
- package/templates/nest/src/simple-app/apis/resource-api.module.ts.eta +37 -0
- package/templates/nest/src/simple-app/events/branch-event/branch-event.module.ts._eta +20 -0
- package/templates/nest/src/simple-app/events/branch-event/branch-event.service.ts._eta +43 -0
- package/templates/nest/src/simple-app/events/branch-event/branch-event.type.ts._eta +7 -0
- package/templates/nest/src/simple-app/events/events.module.ts._eta +17 -0
- package/templates/nest/src/simple-app/events/organization-event/organization-event.module.ts._eta +13 -0
- package/templates/nest/src/simple-app/events/organization-event/organization-event.service.ts._eta +52 -0
- package/templates/nest/src/simple-app/events/organization-event/organization-event.type.ts._eta +1 -0
- package/templates/nest/src/simple-app/events/permission-event/permission-event.module.ts.eta +11 -0
- package/templates/nest/src/simple-app/events/permission-event/permission-event.service.ts.eta +33 -0
- package/templates/nest/src/simple-app/events/permission-event/permission-event.type.ts.eta +1 -0
- package/templates/nest/src/simple-app/events/readme.md.eta +76 -0
- package/templates/nest/src/simple-app/events/tenant-event/tenant-event.module.ts_eta +12 -0
- package/templates/nest/src/simple-app/events/tenant-event/tenant-event.service.ts_eta +30 -0
- package/templates/nest/src/simple-app/events/tenant-event/tenant-event.type.ts_eta +1 -0
- package/templates/nest/src/{simpleapp/additional.module.ts._eta → simple-app/features/features.module.ts._eta} +8 -7
- package/templates/nest/src/{printapi/printapi.module.ts.eta → simple-app/features/print/print.module.ts.eta} +4 -4
- package/templates/nest/src/{printapi/printapi.service.ts.eta → simple-app/features/print/print.service.ts.eta} +7 -7
- package/templates/nest/src/simple-app/features/readme.md._eta +6 -0
- package/templates/nest/src/simple-app/simple-app.module.ts.eta +32 -0
- package/templates/nuxt/.env._eta +2 -0
- package/templates/nuxt/app.vue.eta +15 -7
- package/templates/nuxt/components/header/HeaderSelectBranch.vue.eta +2 -1
- package/templates/nuxt/components/image/ImageAvatar.vue._eta +63 -0
- package/templates/nuxt/components/image/ImageOrganization.vue._eta +77 -0
- package/templates/nuxt/components/simpleApp/SimpleAppForm.vue.eta +1 -1
- package/templates/nuxt/components/simpleApp/SimpleAppFormToolBar.vue._eta +95 -20
- package/templates/nuxt/components/user/UserButtonCreateTenant.vue._eta +20 -21
- package/templates/nuxt/components/user/UserTenantPicker.vue._eta +1 -1
- package/templates/nuxt/composables/docformat.generate.ts.eta +4 -2
- package/templates/nuxt/enums/enums.generate.ts.eta +1 -1
- package/templates/nuxt/middleware/30.acl.global.ts.eta +6 -6
- package/templates/nuxt/nuxt.config.ts._eta +1 -0
- package/templates/nuxt/pages/login.vue._eta +21 -15
- package/templates/nuxt/pages/profile.vue._eta +24 -32
- package/templates/nuxt/plugins/20.simpleapp-userstore.ts.eta +31 -24
- package/templates/nuxt/plugins/50.simpleapp-client.ts.eta +2 -2
- package/templates/nuxt/providers/my-provider.ts.eta +5 -6
- package/templates/nuxt/simpleapp/generate/clients/SimpleAppClient.ts.eta +1 -0
- package/templates/nuxt/simpleapp/generate/defaults/index.ts.eta +1 -1
- package/templates/nuxt/simpleapp/generate/types/index.ts.eta +1 -1
- package/templates/nuxt/types/schema.ts.eta +1 -0
- package/templates/nuxt/types/user.ts.eta +39 -38
- package/templates/project/build.sh.eta +2 -2
- package/templates/basic/nest/apischema.ts.eta +0 -96
- package/templates/basic/nest/processor.ts.eta +0 -86
- package/templates/nest/src/cloudapi/cloudapi.module.ts._eta +0 -15
- package/templates/nest/src/cloudapi/cloudapi.service.ts._eta +0 -15
- package/templates/nest/src/enums/enums.generate.ts.eta +0 -23
- package/templates/nest/src/simpleapp/apischemas/index.ts._eta +0 -85
- package/templates/nest/src/simpleapp/generate/apischemas/index.ts.eta +0 -15
- package/templates/nest/src/simpleapp/generate/apischemas/simpleapp.apischema.ts.eta +0 -62
- package/templates/nest/src/simpleapp/generate/commons/audittrail.service.ts.eta +0 -52
- package/templates/nest/src/simpleapp/generate/commons/customkeycloa.guard.ts.eta +0 -45
- package/templates/nest/src/simpleapp/generate/commons/docnogenerator.service.ts.eta +0 -129
- package/templates/nest/src/simpleapp/generate/commons/providers/workflow.provider.ts.etax +0 -87
- package/templates/nest/src/simpleapp/generate/jsonschemas/index.ts.eta +0 -11
- package/templates/nest/src/simpleapp/generate/models/apievent.model.ts.eta +0 -27
- package/templates/nest/src/simpleapp/generate/processors/autoinc.processor.ts.eta +0 -88
- package/templates/nest/src/simpleapp/generate/processors/branch.processor.ts.eta +0 -110
- package/templates/nest/src/simpleapp/generate/processors/docno.processor.ts.eta +0 -77
- package/templates/nest/src/simpleapp/generate/processors/org.processor.ts.eta +0 -110
- package/templates/nest/src/simpleapp/generate/processors/perm.processor.ts.eta +0 -71
- package/templates/nest/src/simpleapp/generate/processors/sysmsg.processor.ts.eta +0 -49
- package/templates/nest/src/simpleapp/generate/processors/tenant.processor.ts.eta +0 -52
- package/templates/nest/src/simpleapp/generate/processors/webhooklog.processor.ts.eta +0 -45
- package/templates/nest/src/simpleapp/generate/types/index.ts.eta +0 -7
- package/templates/nest/src/simpleapp/generate/types/schema.type.ts.eta +0 -193
- package/templates/nest/src/simpleapp/generate/types/simpleapp.type.ts.eta +0 -299
- package/templates/nest/src/simpleapp/generate/types/workflow.type.ts.eta +0 -15
- package/templates/nest/src/simpleapp/generate/workflow/formschema/SimpleApproveReject.ts.eta +0 -8
- package/templates/nest/src/simpleapp/generate/workflow/workflow.apischema.ts.eta +0 -136
- package/templates/nest/src/simpleapp/generate/workflow/workflow.config.ts.eta +0 -79
- package/templates/nest/src/simpleapp/generate/workflow/workflow.controller.ts.eta +0 -414
- package/templates/nest/src/simpleapp/generate/workflow/workflow.delegate.ts.eta +0 -201
- package/templates/nest/src/simpleapp/generate/workflow/workflow.service.ts.eta +0 -641
- package/templates/nest/src/simpleapp/generate/workflow/workflow.type.ts.eta +0 -98
- package/templates/nest/src/simpleapp/generate/workflow/workflow.userservice.ts.eta +0 -83
- package/templates/nest/src/simpleapp/profile/profile.apischema.ts._eta +0 -95
- package/templates/nest/src/simpleapp/resolvers/readme.md.eta +0 -1
- package/templates/nest/src/simpleapp/services/autoinc.service.ts.etaxx +0 -59
- package/templates/nest/src/simpleapp/services/branch.service.ts.etaxxx +0 -83
- package/templates/nest/src/simpleapp/services/docno.service.ts.etaxxx +0 -59
- package/templates/nest/src/simpleapp/services/org.service.ts.etaxxx +0 -37
- package/templates/nest/src/simpleapp/services/perm.service.ts.etaxxx +0 -56
- package/templates/nest/src/simpleapp/services/sysmsg.service.ts._etaxxx +0 -43
- package/templates/nest/src/simpleapp/services/tenant.service.ts.etaxxx +0 -38
- package/templates/nest/src/simpleapp/services/user.service.ts.eta.old +0 -118
- package/templates/nest/src/simpleapp/services/userresolver.service.ts._eta +0 -67
- package/templates/nest/src/simpleapp/services/webhook.service.ts._eta +0 -37
- package/templates/nest/src/simpleapp/simpleapp.module.ts.eta +0 -80
- package/templates/nest/src/simpleapp/types/index.ts._eta +0 -45
- package/templates/nest/src/simpleapp/webhooks/branch.ts._eta +0 -44
- package/templates/nest/src/simpleapp/webhooks/index.ts._eta +0 -21
- package/templates/nest/src/simpleapp/workflows/bpmn/readme.md._eta +0 -1
- package/templates/nest/src/simpleapp/workflows/listeners/simpleapp.listener.ts.eta +0 -31
- package/templates/nest/src/simpleapp/workflows/readme.md._eta +0 -1
- package/templates/nuxt/components/image/ImageAvatar.vue.eta +0 -56
- package/templates/nuxt/components/image/ImageOrganization.vue.eta +0 -66
- /package/src/buildinschemas/{webhook.ts → webhook.ts.backup} +0 -0
- /package/src/buildinschemas/{webhooklog.ts → webhooklog.ts.backup} +0 -0
- /package/templates/basic/nest/{type.ts.eta → type.ts.eta-backup} +0 -0
- /package/templates/nest/src/{simpleapp/generate/commons/customkeycloak.guard.ts.eta → simple-app/.core/features/auth/keycloak/keycloak.guard.ts.eta} +0 -0
- /package/templates/nest/src/{simpleapp/generate/commons/roles → simple-app/.core/features/auth/role-guard}/roles.decorator.ts.eta +0 -0
- /package/templates/nest/src/{simpleapp/generate/commons/roles → simple-app/.core/features/auth/role-guard}/roles.group.ts.eta +0 -0
- /package/templates/nest/src/{simpleapp/generate/commons/dicts/documents.ts.eta → simple-app/.core/features/document-no-format/document.dict.ts.eta} +0 -0
- /package/templates/nest/src/{simpleapp/generate/commons/dicts/foreignkeys.ts.eta → simple-app/.core/features/foreign-key/foreignkeys.dict.ts.eta} +0 -0
- /package/templates/nest/src/{simpleapp/profile/profile.types.ts.eta → simple-app/.core/features/profile/profile.types.ts.eta-backup} +0 -0
- /package/templates/nest/src/{simpleapp/generate/commons/decorators → simple-app/.core/features/user-context}/appuser.decorator.ts.eta +0 -0
- /package/templates/nest/src/{simpleapp/generate/commons/exceptions/SimpleAppExceptionFilter.ts.eta → simple-app/.core/framework/exception-filter.ts.eta} +0 -0
- /package/templates/nest/src/{simpleapp/generate/commons → simple-app/.core/utils}/encryption.static.ts.eta +0 -0
- /package/templates/nest/src/{simpleapp → simple-app}/.gitignore.eta +0 -0
- /package/templates/nest/src/{printapi → simple-app/features/print}/api/.gitignore.eta +0 -0
- /package/templates/nest/src/{printapi → simple-app/features/print}/api/.npmignore.eta +0 -0
- /package/templates/nest/src/{printapi → simple-app/features/print}/api/.openapi-generator/FILES.eta +0 -0
- /package/templates/nest/src/{printapi → simple-app/features/print}/api/.openapi-generator/VERSION.eta +0 -0
- /package/templates/nest/src/{printapi → simple-app/features/print}/api/.openapi-generator-ignore.eta +0 -0
- /package/templates/nest/src/{printapi → simple-app/features/print}/api/api.ts.eta +0 -0
- /package/templates/nest/src/{printapi → simple-app/features/print}/api/base.ts.eta +0 -0
- /package/templates/nest/src/{printapi → simple-app/features/print}/api/common.ts.eta +0 -0
- /package/templates/nest/src/{printapi → simple-app/features/print}/api/configuration.ts.eta +0 -0
- /package/templates/nest/src/{printapi → simple-app/features/print}/api/git_push.sh.eta +0 -0
- /package/templates/nest/src/{printapi → simple-app/features/print}/api/index.ts.eta +0 -0
- /package/templates/nest/src/{printapi → simple-app/features/print}/api/openapitools.json.eta +0 -0
- /package/templates/project/{sharelibs → share-libs}/hello.ts._eta +0 -0
- /package/templates/project/{sharelibs → share-libs}/index.ts.eta +0 -0
- /package/templates/project/{sharelibs → share-libs}/money.ts.eta +0 -0
- /package/templates/project/{sharelibs → share-libs}/validate.ts.eta +0 -0
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Author: Ks Tan
|
|
6
6
|
*/
|
|
7
7
|
import { defineNuxtPlugin } from "#app";
|
|
8
|
-
import { PROFILEApi } from "../simpleapp/generate/openapi";
|
|
8
|
+
import { PROFILEApi,ProfileUserBranch,UserContextInfo } from "../simpleapp/generate/openapi";
|
|
9
9
|
import { UserProfile } from "~/types";
|
|
10
10
|
import axios, { Axios, AxiosError, AxiosResponse } from "axios";
|
|
11
11
|
import _ from "lodash";
|
|
@@ -33,18 +33,20 @@ export default defineNuxtPlugin(async (nuxtApp) => {
|
|
|
33
33
|
uid: ref(""),
|
|
34
34
|
email: ref(""),
|
|
35
35
|
fullName: ref(""),
|
|
36
|
+
uName: ref(""),
|
|
36
37
|
roles: ref<string[]>([]),
|
|
37
38
|
groups: ref<string[]>([]),
|
|
38
39
|
currentGroup: ref(""),
|
|
39
|
-
branches: ref([]),
|
|
40
|
+
branches: ref<ProfileUserBranch[]>([]),
|
|
40
41
|
invites: ref([]),
|
|
41
42
|
time: ref(""),
|
|
43
|
+
xOrg: ref(''),
|
|
42
44
|
moreProps: ref(),
|
|
43
|
-
package: ref(),
|
|
44
|
-
appintegration: ref({
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}),
|
|
45
|
+
// package: ref(),
|
|
46
|
+
// appintegration: ref({
|
|
47
|
+
// einvoice: false,
|
|
48
|
+
// simbiz6: false,
|
|
49
|
+
// }),
|
|
48
50
|
}),
|
|
49
51
|
|
|
50
52
|
actions: {
|
|
@@ -54,26 +56,24 @@ export default defineNuxtPlugin(async (nuxtApp) => {
|
|
|
54
56
|
const { $axios, $miniAppStore, $customFieldStore } = useNuxtApp();
|
|
55
57
|
const route = useRoute();
|
|
56
58
|
let xorg = this.getCurrentXorg();
|
|
57
|
-
|
|
58
59
|
let apiurl = "";
|
|
59
|
-
if (xorg
|
|
60
|
+
if (!xorg) {
|
|
60
61
|
apiurl = `${useRuntimeConfig().public.appUrl}/api`;
|
|
61
62
|
} else {
|
|
62
63
|
apiurl = `${useRuntimeConfig().public.appUrl}/api/${xorg}`;
|
|
63
64
|
}
|
|
64
|
-
|
|
65
|
-
if (xorg !== undefined) {
|
|
65
|
+
if (xorg) {
|
|
66
66
|
await $miniAppStore.loadInstalledMiniApps();
|
|
67
67
|
await $customFieldStore.fetchList();
|
|
68
68
|
}
|
|
69
|
-
|
|
70
69
|
return await new PROFILEApi(undefined, apiurl, $axios)
|
|
71
70
|
.getProfile()
|
|
72
|
-
.then((res: AxiosResponse) => {
|
|
71
|
+
.then((res: AxiosResponse) => {
|
|
73
72
|
if (!res) {
|
|
74
73
|
return;
|
|
75
74
|
}
|
|
76
75
|
this._id = res.data._id;
|
|
76
|
+
this.uName = res.data.uName;
|
|
77
77
|
this.sessionId = res.data.sessionId;
|
|
78
78
|
this.tenantId = res.data.tenantId;
|
|
79
79
|
this.orgId = res.data.orgId;
|
|
@@ -95,11 +95,12 @@ export default defineNuxtPlugin(async (nuxtApp) => {
|
|
|
95
95
|
this.groups = res.data.groups;
|
|
96
96
|
this.roles = res.data.roles;
|
|
97
97
|
this.time = res.data.time;
|
|
98
|
+
this.xOrg = res.data.xOrg;
|
|
98
99
|
this.invites = res.data.invites;
|
|
99
100
|
this.moreProps = res.data.moreProps;
|
|
100
|
-
this.package = res.data.moreProps.package;
|
|
101
|
-
this.appintegration.einvoice = res.data.appintegration.einvoice;
|
|
102
|
-
this.appintegration.simbiz6 = res.data.appintegration.simbiz6;
|
|
101
|
+
// this.package = res.data.moreProps.package;
|
|
102
|
+
// this.appintegration.einvoice = res.data.appintegration.einvoice;
|
|
103
|
+
// this.appintegration.simbiz6 = res.data.appintegration.simbiz6;
|
|
103
104
|
let cachegroup = useCookie("currentGroup").value ?? "";
|
|
104
105
|
if (!this.groups || !this.groups.includes(cachegroup)) {
|
|
105
106
|
cachegroup = "";
|
|
@@ -114,9 +115,14 @@ export default defineNuxtPlugin(async (nuxtApp) => {
|
|
|
114
115
|
});
|
|
115
116
|
},
|
|
116
117
|
getCurrentXorg() {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
118
|
+
const xorg = useRoute().params.xorg
|
|
119
|
+
let result = ''
|
|
120
|
+
if(typeof xorg == 'string'){
|
|
121
|
+
result = xorg
|
|
122
|
+
}else{
|
|
123
|
+
result =''
|
|
124
|
+
}
|
|
125
|
+
return result
|
|
120
126
|
},
|
|
121
127
|
async pingSession(): Promise<string> {
|
|
122
128
|
let xorg = this.getCurrentXorg();
|
|
@@ -170,7 +176,7 @@ export default defineNuxtPlugin(async (nuxtApp) => {
|
|
|
170
176
|
this.roles.includes(permission),
|
|
171
177
|
);
|
|
172
178
|
},
|
|
173
|
-
canPerform(resourcename: string, action: string): boolean {
|
|
179
|
+
canPerform(resourcename: string, action: string): boolean {
|
|
174
180
|
if (
|
|
175
181
|
this.roles.includes("superadmin") ||
|
|
176
182
|
this.roles.includes("tenantowner") ||
|
|
@@ -267,6 +273,7 @@ export default defineNuxtPlugin(async (nuxtApp) => {
|
|
|
267
273
|
orgRecordId: this.orgRecordId,
|
|
268
274
|
branchRecordId: this.branchRecordId,
|
|
269
275
|
uid: this.uid,
|
|
276
|
+
uName: this.uName,
|
|
270
277
|
email: this.email,
|
|
271
278
|
branchCode: this.branchCode,
|
|
272
279
|
branchName: this.branchName,
|
|
@@ -281,11 +288,11 @@ export default defineNuxtPlugin(async (nuxtApp) => {
|
|
|
281
288
|
invites: this.invites ?? [],
|
|
282
289
|
roles: this.roles,
|
|
283
290
|
groups: this.groups,
|
|
284
|
-
currentGroup: this.currentGroup,
|
|
285
|
-
time: this.time,
|
|
291
|
+
currentGroup: this.currentGroup,
|
|
286
292
|
moreProps: this.moreProps,
|
|
287
|
-
|
|
288
|
-
|
|
293
|
+
xOrg: this.getCurrentXorg()
|
|
294
|
+
// package: this.package,
|
|
295
|
+
// appintegration: this.appintegration,
|
|
289
296
|
};
|
|
290
297
|
return userinfo;
|
|
291
298
|
},
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { defineNuxtPlugin } from "#app";
|
|
8
8
|
<% for(let i=0;i<it.modules.length; i++){ %>
|
|
9
|
-
import {<%=it.modules[i].docname%>Doc} from "../simpleapp/docs/<%=it.modules[i].docname%>Doc"
|
|
9
|
+
import {<%= upperFirstCase(it.modules[i].docname)%>Doc} from "../simpleapp/docs/<%=it.modules[i].docname%>Doc"
|
|
10
10
|
<%}%>
|
|
11
11
|
|
|
12
12
|
export default defineNuxtPlugin((nuxtApp) => {
|
|
@@ -14,7 +14,7 @@ export default defineNuxtPlugin((nuxtApp) => {
|
|
|
14
14
|
return {
|
|
15
15
|
provide: {
|
|
16
16
|
<% for(let i=0;i<it.modules.length; i++){ %>
|
|
17
|
-
<%=it.modules[i].docname%>Doc:()=>new <%=it.modules[i].docname%>Doc(),
|
|
17
|
+
<%= it.modules[i].docname%>Doc:()=>new <%= upperFirstCase(it.modules[i].docname)%>Doc(),
|
|
18
18
|
<%}%>
|
|
19
19
|
}
|
|
20
20
|
}
|
|
@@ -6,14 +6,13 @@ const operationsGenerator = createOperationsGenerator()
|
|
|
6
6
|
|
|
7
7
|
export const getImage: ProviderGetImage = (
|
|
8
8
|
src,
|
|
9
|
-
{ modifiers = {}, baseURL } = {}
|
|
9
|
+
{ modifiers = {}, baseURL:string='' } = {}
|
|
10
10
|
) => {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
baseURL =
|
|
11
|
+
let baseURL = useRuntimeConfig().public.apiUrl ??''
|
|
12
|
+
|
|
13
|
+
if(baseURL.endsWith('/')){
|
|
14
|
+
baseURL = baseURL.slice(0, -1)
|
|
15
15
|
}
|
|
16
|
-
|
|
17
16
|
const operations = operationsGenerator(modifiers)
|
|
18
17
|
|
|
19
18
|
return {
|
|
@@ -68,6 +68,7 @@ export class SimpleAppClient<
|
|
|
68
68
|
getDocType = () => this.doctype;
|
|
69
69
|
getDocName = (capFirst: boolean = false) =>
|
|
70
70
|
capFirst ? upperFirst(this.docname) : this.docname;
|
|
71
|
+
getResourceName = ()=>upperFirst(this.schema["x-simpleapp-config"]?.resourceName??'');
|
|
71
72
|
setNew = () => {};
|
|
72
73
|
isNew = () => this.data.value?.created == "";
|
|
73
74
|
setSchema = (schema: SchemaType) => (this.schema = schema);
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* last change 2024-02-23
|
|
5
5
|
* Author: Ks Tan
|
|
6
6
|
*/
|
|
7
|
-
import {Branch} from "~/simpleapp/generate/openapi"
|
|
7
|
+
import {Branch, ProfileUserBranch,UserContextInfo} from "~/simpleapp/generate/openapi"
|
|
8
8
|
export type UserListItem = {
|
|
9
9
|
_id: string
|
|
10
10
|
uid?:string
|
|
@@ -53,42 +53,43 @@ export type UserListItem = {
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
|
|
56
|
-
export type UserProfile = {
|
|
57
|
-
_id : string
|
|
58
|
-
sessionId : string
|
|
59
|
-
tenantId : number
|
|
60
|
-
orgId : number
|
|
61
|
-
branchId : number
|
|
62
|
-
orgRecordId: string
|
|
63
|
-
branchRecordId: string
|
|
64
|
-
uid : string
|
|
65
|
-
email : string
|
|
66
|
-
branchCode: string
|
|
67
|
-
branchName: string
|
|
68
|
-
orgCode: string
|
|
69
|
-
orgName: string
|
|
70
|
-
currency:string
|
|
71
|
-
country:string
|
|
72
|
-
offsetMinute:number
|
|
73
|
-
timeZone:string
|
|
74
|
-
fullName : string
|
|
75
|
-
branches: UserStoreBranch[]
|
|
76
|
-
invites: {
|
|
77
|
-
_id: string;
|
|
78
|
-
email: string;
|
|
79
|
-
fullName: string;
|
|
80
|
-
tenantId: string;
|
|
81
|
-
tenantName: string;
|
|
82
|
-
created: string;
|
|
83
|
-
}[]
|
|
84
|
-
roles: string[]
|
|
85
|
-
groups: string[]
|
|
56
|
+
export type UserProfile = UserContextInfo & {
|
|
86
57
|
currentGroup:string
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
58
|
+
// _id : string
|
|
59
|
+
// sessionId : string
|
|
60
|
+
// tenantId : number
|
|
61
|
+
// orgId : number
|
|
62
|
+
// branchId : number
|
|
63
|
+
// orgRecordId: string
|
|
64
|
+
// branchRecordId: string
|
|
65
|
+
// uid : string
|
|
66
|
+
// email : string
|
|
67
|
+
// branchCode: string
|
|
68
|
+
// branchName: string
|
|
69
|
+
// orgCode: string
|
|
70
|
+
// orgName: string
|
|
71
|
+
// currency:string
|
|
72
|
+
// country:string
|
|
73
|
+
// offsetMinute:number
|
|
74
|
+
// timeZone:string
|
|
75
|
+
// fullName : string
|
|
76
|
+
// branches: UserStoreBranch[]
|
|
77
|
+
// invites: {
|
|
78
|
+
// _id: string;
|
|
79
|
+
// email: string;
|
|
80
|
+
// fullName: string;
|
|
81
|
+
// tenantId: string;
|
|
82
|
+
// tenantName: string;
|
|
83
|
+
// created: string;
|
|
84
|
+
// }[]
|
|
85
|
+
// roles: string[]
|
|
86
|
+
// groups: string[]
|
|
87
|
+
// currentGroup:string
|
|
88
|
+
// time: string
|
|
89
|
+
// moreProps: any
|
|
90
|
+
// package: 'free' | 'lite' | 'pro' | 'enterprise' | 'enterprisePlus'
|
|
91
|
+
// appintegration: {
|
|
92
|
+
// einvoice: boolean
|
|
93
|
+
// simbiz6: boolean
|
|
94
|
+
// }
|
|
94
95
|
}
|
|
@@ -13,10 +13,10 @@ elif [ $type == 'updatefrontend' ]; then
|
|
|
13
13
|
cp -a ./sharelibs frontend/simpleapp/generate
|
|
14
14
|
elif [ $type == 'backend' ]; then
|
|
15
15
|
simpleapp-generator -c config.json -g backend
|
|
16
|
-
cp -a ./
|
|
16
|
+
cp -a ./share-libs backend/src/simpleapp/generate
|
|
17
17
|
elif [ $type == 'updatebackend' ]; then
|
|
18
18
|
simpleapp-generator -c config.json -g updatebackend
|
|
19
|
-
cp -a ./
|
|
19
|
+
cp -a ./share-libs backend/src/simpleapp/generate
|
|
20
20
|
elif [ $type == 'updateMiniAppJsSdk' ]; then
|
|
21
21
|
simpleapp-generator -c config.json -g updateMiniAppJsSdk
|
|
22
22
|
elif [ $type == 'updateMiniAppStreamlitSdk' ]; then
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was automatically generated by simpleapp generator. Every
|
|
3
|
-
* MODIFICATION OVERRIDE BY GENERATEOR
|
|
4
|
-
* last change 2024-02-23
|
|
5
|
-
* Author: Ks Tan
|
|
6
|
-
*/
|
|
7
|
-
import { ApiProperty } from '@nestjs/swagger';
|
|
8
|
-
import { Field, ObjectType,ID } from '@nestjs/graphql';
|
|
9
|
-
import GraphQLJSON, { GraphQLJSONObject } from 'graphql-type-json';
|
|
10
|
-
|
|
11
|
-
<% const draw = (it, obj, key, currentModelName) => { %>
|
|
12
|
-
<% if(typeof obj == 'string') {%>
|
|
13
|
-
<% // This Is Dynamic Object %>
|
|
14
|
-
<% if(it.models?.[obj] && it.models[obj]?.model && Object.keys(it.models[obj]?.model).length === 0) { %>
|
|
15
|
-
@Field(()=>GraphQLJSON)
|
|
16
|
-
@ApiProperty({ type:()=>Object,required: false, default: {} })
|
|
17
|
-
<%= key %>: Object;
|
|
18
|
-
<% } else { %>
|
|
19
|
-
<%
|
|
20
|
-
let required = false;
|
|
21
|
-
const currentModel = it.models?.[currentModelName];
|
|
22
|
-
if (currentModel && (currentModel.required ?? []).includes(key)) {
|
|
23
|
-
required = true;
|
|
24
|
-
}
|
|
25
|
-
%>
|
|
26
|
-
@Field()
|
|
27
|
-
@ApiProperty({type: ()=><%=obj%>, required: <%= required %>})
|
|
28
|
-
<%= key %>: <%= obj %>;
|
|
29
|
-
<% } %>
|
|
30
|
-
<%} else if(typeof obj.default !='undefined' && JSON.stringify(obj.default)=='{}'){%>
|
|
31
|
-
@Field(()=>GraphQLJSON)
|
|
32
|
-
@ApiProperty({ type:()=>Object,required: false, default: {} })
|
|
33
|
-
<%= key %>: Object;
|
|
34
|
-
<% } else if( Array.isArray( obj)){%>
|
|
35
|
-
<%
|
|
36
|
-
let required = false;
|
|
37
|
-
const currentModel = it.models?.[currentModelName];
|
|
38
|
-
if (currentModel && (currentModel.required ?? []).includes(key)) {
|
|
39
|
-
required = true;
|
|
40
|
-
}
|
|
41
|
-
%>
|
|
42
|
-
@Field(type=>[<%=initType(obj[0]) %>])
|
|
43
|
-
@ApiProperty({type: ()=>[<%=initType(obj[0]) %>], required: <%= required %> })
|
|
44
|
-
<%= key %>: <%= obj[0] %>[];
|
|
45
|
-
|
|
46
|
-
<% }else{%>
|
|
47
|
-
@Field()
|
|
48
|
-
@ApiProperty(<%~ JSON.stringify(obj)%> )
|
|
49
|
-
<%= key %>: <%= obj.type %>;
|
|
50
|
-
<% } %>
|
|
51
|
-
<% } %>
|
|
52
|
-
|
|
53
|
-
<%Object.keys(it.models).forEach(function(name) { %>
|
|
54
|
-
<% let schema = it.models[name].model %>
|
|
55
|
-
|
|
56
|
-
<% // Skip Draw Dynamic Object Class %>
|
|
57
|
-
<% if(it.models[name].type === 'object' && schema && Object.keys(schema).length === 0 ) return; %>
|
|
58
|
-
|
|
59
|
-
@ObjectType()
|
|
60
|
-
export class <%= name %> {
|
|
61
|
-
|
|
62
|
-
<% Object.keys(schema).forEach(function(key) { %>
|
|
63
|
-
<% let obj = schema[key] %>
|
|
64
|
-
<% draw(it, obj, key, name) %>
|
|
65
|
-
<% }) %>
|
|
66
|
-
}
|
|
67
|
-
<%}) %>
|
|
68
|
-
|
|
69
|
-
/***************************************** Start Auto Complete *****************************************/
|
|
70
|
-
<% const autoCompleteModelName = it.apiSchemaName + 'AutoComplete'; %>
|
|
71
|
-
@ObjectType()
|
|
72
|
-
export class <%=autoCompleteModelName %> {
|
|
73
|
-
@Field()
|
|
74
|
-
@ApiProperty({ type: 'string', required: true, default: '' })
|
|
75
|
-
_id: string;
|
|
76
|
-
|
|
77
|
-
@Field()
|
|
78
|
-
@ApiProperty({ type: 'string', required: true, default: '' })
|
|
79
|
-
code: string;
|
|
80
|
-
|
|
81
|
-
@Field()
|
|
82
|
-
@ApiProperty({ type: 'string', required: true, default: '' })
|
|
83
|
-
label: string;
|
|
84
|
-
|
|
85
|
-
<% if(it.moreAutoComplete && Array.isArray(it.moreAutoComplete)) { %>
|
|
86
|
-
<% it.moreAutoComplete.forEach(function(field){ %>
|
|
87
|
-
<% draw(it, it.models[it.apiSchemaName].model[field], field, autoCompleteModelName) %>
|
|
88
|
-
|
|
89
|
-
<% }) %>
|
|
90
|
-
<% } %>
|
|
91
|
-
}
|
|
92
|
-
/****************************************** End Auto Complete ******************************************/
|
|
93
|
-
|
|
94
|
-
/************************************** Customized Code Begin Here *************************************/
|
|
95
|
-
<%~ it.apiSchemaCode %>
|
|
96
|
-
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was automatically generated by simpleapp generator. Every
|
|
3
|
-
* MODIFICATION OVERRIDE BY GENERATEOR
|
|
4
|
-
* last change 2024-07-10
|
|
5
|
-
* Author: Ks Tan
|
|
6
|
-
* Last Modified By: Yong Xiang
|
|
7
|
-
*/
|
|
8
|
-
import { UserContext } from '../commons/user.context'
|
|
9
|
-
import * as sharelibs from '../sharelibs'
|
|
10
|
-
import { Injectable } from '@nestjs/common';
|
|
11
|
-
import { InjectModel } from '@nestjs/mongoose';
|
|
12
|
-
import jsonpath from 'jsonpath'
|
|
13
|
-
import { Model } from 'mongoose';
|
|
14
|
-
import {<%= it.typename%>JsonSchema } from '../jsonschemas/<%= it.doctype %>.jsonschema'
|
|
15
|
-
import { SimpleAppService } from './simpleapp.processor';
|
|
16
|
-
import { IsolationType } from '../types';
|
|
17
|
-
import {DocNumberFormatGenerator} from '../commons/docnogenerator.service'
|
|
18
|
-
import { <%Object.keys(it.models).forEach(function(key) { %> <%=key %>, <%})%> } from '../types/<%= it.doctype %>.type';
|
|
19
|
-
import { <%Object.keys(it.models).forEach(function(modelname) { %> Default<%=modelname%>, <%})%> } from '../defaults/<%= it.doctype %>.default'
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
<%if(it.jsonschema['x-import-lib']) {%>
|
|
23
|
-
<%let libs = it.jsonschema['x-import-lib'] %>
|
|
24
|
-
<%for(let l = 0; l< libs.length; l++) { %>
|
|
25
|
-
import * as <%=libs[l].importAs %> from '<%=libs[l].importFrom %>'
|
|
26
|
-
<%}%>
|
|
27
|
-
<%}%>
|
|
28
|
-
|
|
29
|
-
@Injectable()
|
|
30
|
-
export class <%= it.typename %>Processor extends SimpleAppService<<%= it.typename %>> {
|
|
31
|
-
protected documentIdentityCode='<%~ it.autocompletecode %>'
|
|
32
|
-
protected documentIdentityLabel='<%~ it.autocompletename %>'
|
|
33
|
-
<%if(it.jsonschema['x-simpleapp-config']['generateDocumentNumber']){%>
|
|
34
|
-
protected withDocNumberFormat = true
|
|
35
|
-
<%}%>
|
|
36
|
-
|
|
37
|
-
protected foreignkeys = <%~ JSON.stringify(it.foreignkeys)%>
|
|
38
|
-
|
|
39
|
-
constructor(mydoc: Model<<%= it.typename %>>) {
|
|
40
|
-
super('<%= it.doctype.toUpperCase() %>','<%= it.name %>',mydoc,IsolationType.<%=it.isolationtype%>);
|
|
41
|
-
this.setSchema(<%= it.typename%>JsonSchema)
|
|
42
|
-
this.setData(Default<%=it.typename%>(crypto.randomUUID()))
|
|
43
|
-
<%if(it.moreAutoComplete.length>0){%>
|
|
44
|
-
this.addAutoCompleteField({
|
|
45
|
-
<%Object.keys(it.moreAutoComplete).forEach(function(key) { %>
|
|
46
|
-
<% let f=it.moreAutoComplete[key] %>
|
|
47
|
-
<%~ `${f}: '${f}'` %>,
|
|
48
|
-
<%})%>
|
|
49
|
-
})
|
|
50
|
-
<%}%>
|
|
51
|
-
}
|
|
52
|
-
<%if(it.jsonschema.properties['readOnly'] || it.jsonschema.properties['documentStatus']){%>
|
|
53
|
-
public isReadOnly():boolean{
|
|
54
|
-
<%if(it.jsonschema.properties['readOnly']){%>
|
|
55
|
-
if(this.data.readOnly) return true
|
|
56
|
-
<%}%>
|
|
57
|
-
<%if(it.jsonschema.properties['documentStatus']){%>
|
|
58
|
-
const docstatus = this.data.documentStatus
|
|
59
|
-
const statussetting = this.jsonschema['x-simpleapp-config'].allStatus?.find((item)=>item.status==docstatus)
|
|
60
|
-
if(statussetting && statussetting.readOnly) return true
|
|
61
|
-
<%}%>
|
|
62
|
-
return false
|
|
63
|
-
}
|
|
64
|
-
<%}%>
|
|
65
|
-
|
|
66
|
-
reCalculateValue(data:<%= it.typename %>){
|
|
67
|
-
//console.log('trigger new recalculate')
|
|
68
|
-
const $data = data;
|
|
69
|
-
<% if(it.jsonschema['x-simpleapp-config']['formulas']){ %>
|
|
70
|
-
<%Object.keys(it.jsonschema['x-simpleapp-config']['formulas']).forEach(function(index) { %>
|
|
71
|
-
<% let fml = it.jsonschema['x-simpleapp-config']['formulas'][index] %>
|
|
72
|
-
// <%~ JSON.stringify(fml) %>
|
|
73
|
-
//const tmp = jsonpath.query(vdata,fieldpath).filter((item:string)=>item!='')
|
|
74
|
-
|
|
75
|
-
jsonpath.apply($data, '<%~ fml.jsonPath %>', function($item:any) { return <%~fml.formula %> });
|
|
76
|
-
|
|
77
|
-
<%}) %>
|
|
78
|
-
<%} %>
|
|
79
|
-
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
/***************************** additional execute *****************************************/
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was automatically generated by simpleapp generator. It is changable
|
|
3
|
-
* --remove-this-line-to-prevent-override--
|
|
4
|
-
* last change 2024-04-19
|
|
5
|
-
* Author: Ks Tan
|
|
6
|
-
*/
|
|
7
|
-
import { Module } from '@nestjs/common';
|
|
8
|
-
import { CloudApiService } from './cloudapi.service';
|
|
9
|
-
@Module({
|
|
10
|
-
imports: [],
|
|
11
|
-
controllers: [],
|
|
12
|
-
providers: [CloudApiService],
|
|
13
|
-
exports: [CloudApiService],
|
|
14
|
-
})
|
|
15
|
-
export class CloudapiModule {}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was automatically generated by simpleapp generator. It is changable
|
|
3
|
-
* --remove-this-line-to-prevent-override--
|
|
4
|
-
* last change 2024-04-19
|
|
5
|
-
* Author: Ks Tan
|
|
6
|
-
*/
|
|
7
|
-
import { Injectable, InternalServerErrorException } from '@nestjs/common';
|
|
8
|
-
import { UserContext } from 'src/simpleapp/generate/commons/user.context';
|
|
9
|
-
|
|
10
|
-
@Injectable()
|
|
11
|
-
export class CloudApiService {
|
|
12
|
-
constructor() {}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was automatically generated by simpleapp generator. Every
|
|
3
|
-
* MODIFICATION OVERRIDE BY GENERATEOR
|
|
4
|
-
* last change 2025-06-09
|
|
5
|
-
*/
|
|
6
|
-
<% it.modules.forEach(function(module) { %>
|
|
7
|
-
<% if (module.schema && module.schema.properties) { %>
|
|
8
|
-
<% Object.entries(module.schema.properties).forEach(function([propName, prop]) { %>
|
|
9
|
-
<% if (prop.enum) { %>
|
|
10
|
-
export enum <%= module.docname %><%= propName.charAt(0).toUpperCase() + propName.slice(1) + 'Enum' %> {
|
|
11
|
-
<% prop.enum.forEach(function(enumValue, index) { %>
|
|
12
|
-
<% if (enumValue === '') { %>
|
|
13
|
-
EMPTY = ''<%= index < prop.enum.length - 1 ? ',' : '' %>
|
|
14
|
-
<% } else { %>
|
|
15
|
-
<%= enumValue.replace(/([A-Z])/g, '_$1').replace(/^_/, '').toUpperCase().replace(/-/g, '_') %> = '<%= enumValue %>'<%= index < prop.enum.length - 1 ? ',' : '' %>
|
|
16
|
-
<% } %>
|
|
17
|
-
<% }); %>
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
<% } %>
|
|
21
|
-
<% }); %>
|
|
22
|
-
<% } %>
|
|
23
|
-
<% }); %>
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was automatically generated by simpleapp generator during initialization. It is changable.
|
|
3
|
-
* --remove-this-line-to-prevent-override--
|
|
4
|
-
* last change 2024-02-22
|
|
5
|
-
* author: Ks Tan
|
|
6
|
-
*/
|
|
7
|
-
import { Field, ObjectType } from '@nestjs/graphql';
|
|
8
|
-
import { ApiProperty } from '@nestjs/swagger';
|
|
9
|
-
export class ForeignKey {
|
|
10
|
-
@ApiProperty({ type: 'string', required: false, format: 'uuid', default: '' })
|
|
11
|
-
_id: string;
|
|
12
|
-
@ApiProperty({ type: 'string', required: false, default: '' })
|
|
13
|
-
code: string;
|
|
14
|
-
@ApiProperty({ type: 'string', required: false, default: '' })
|
|
15
|
-
label: string;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
@ObjectType()
|
|
19
|
-
export class CodeLabelValue {
|
|
20
|
-
@ApiProperty({ type: 'string'})
|
|
21
|
-
@Field()
|
|
22
|
-
_id: string;
|
|
23
|
-
@ApiProperty({ type: 'string' })
|
|
24
|
-
@Field()
|
|
25
|
-
code: string
|
|
26
|
-
@ApiProperty({ type: 'string' })
|
|
27
|
-
@Field()
|
|
28
|
-
label: string
|
|
29
|
-
@ApiProperty({ type: Number, required: false, default: 0 })
|
|
30
|
-
@Field()
|
|
31
|
-
value: number
|
|
32
|
-
}
|
|
33
|
-
@ObjectType()
|
|
34
|
-
export class KeyValue {
|
|
35
|
-
@ApiProperty({ type: 'string' })
|
|
36
|
-
@Field()
|
|
37
|
-
key: string;
|
|
38
|
-
@ApiProperty({ type: 'string' })
|
|
39
|
-
@Field()
|
|
40
|
-
value: string;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export class UserAllPermissionsBranches {
|
|
44
|
-
@ApiProperty({ type: 'string', required: true, default: '',})
|
|
45
|
-
permId: string;
|
|
46
|
-
@ApiProperty({ type: Number, required: true, default: 0 })
|
|
47
|
-
branchId: number;
|
|
48
|
-
@ApiProperty({ type: () => ForeignKey, required: true })
|
|
49
|
-
branch: ForeignKey;
|
|
50
|
-
|
|
51
|
-
groups: string[];
|
|
52
|
-
@ApiProperty({ type: 'string', required: true, default: '',})
|
|
53
|
-
userId: string;
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
export class UserPermission {
|
|
58
|
-
@ApiProperty({ type: 'string', required: true, format: 'uuid', default: '' })
|
|
59
|
-
permId: string;
|
|
60
|
-
@ApiProperty({ type: Number, required: true, default: 0 })
|
|
61
|
-
branchId: number;
|
|
62
|
-
@ApiProperty({ type: () => ForeignKey, required: true })
|
|
63
|
-
branch: ForeignKey;
|
|
64
|
-
|
|
65
|
-
@ApiProperty({ type: [String], required: true, default: '' })
|
|
66
|
-
groups: string[];
|
|
67
|
-
@ApiProperty({ type: 'string', required: true, format: 'uuid', default: '' })
|
|
68
|
-
userId: string;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
@ObjectType()
|
|
72
|
-
export class TextSearchBody{
|
|
73
|
-
@Field()
|
|
74
|
-
@ApiProperty({ type: String })
|
|
75
|
-
keyword:string
|
|
76
|
-
@Field(()=>[String])
|
|
77
|
-
@ApiProperty({ type: ()=>[String] })
|
|
78
|
-
fields?:string[]
|
|
79
|
-
@Field(()=>[[String]])
|
|
80
|
-
@ApiProperty({ type: ()=>[[String]], })
|
|
81
|
-
sorts?:string[][]
|
|
82
|
-
@Field(type=>Object)
|
|
83
|
-
@ApiProperty({ type: Object })
|
|
84
|
-
lookup?: Record<string,string>
|
|
85
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was automatically generated by simpleapp generator. Every
|
|
3
|
-
* MODIFICATION OVERRIDE BY GENERATEOR
|
|
4
|
-
* last change 2024-02-23
|
|
5
|
-
* Author: Ks Tan
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
<%for(let i=0; i<it.modules.length;i++){ %>
|
|
9
|
-
<% const d = it.modules[i] %>
|
|
10
|
-
export * from './<%= d['doctype']%>.apischema'
|
|
11
|
-
<%}%>
|
|
12
|
-
|
|
13
|
-
export * from './simpleapp.apischema'
|
|
14
|
-
|
|
15
|
-
export * from '../../apischemas'
|