@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
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<ImageToBase64Uploader
|
|
4
|
+
v-if="changable"
|
|
5
|
+
#default
|
|
6
|
+
:class="` place-content-center bg-white rounded-md`"
|
|
7
|
+
@image-uploaded="handleBase64"
|
|
8
|
+
:imagePath="imagepath"
|
|
9
|
+
>
|
|
10
|
+
<!-- {{console.log("imagepath",imagepath)}} -->
|
|
11
|
+
<NuxtImg
|
|
12
|
+
v-if="orgRecordId"
|
|
13
|
+
class="w-full h-full rounded-md"
|
|
14
|
+
:key="imageKey"
|
|
15
|
+
:src="imagepath"
|
|
16
|
+
placeholder="/images/organization.png"
|
|
17
|
+
@error="onError"
|
|
18
|
+
/>
|
|
19
|
+
</ImageToBase64Uploader>
|
|
20
|
+
<div
|
|
21
|
+
v-else
|
|
22
|
+
:class="` inline-block rounded-md bg-white text-black`"
|
|
23
|
+
>
|
|
24
|
+
<!-- {{console.log("imagepath",imagepath)}} -->
|
|
25
|
+
|
|
26
|
+
<NuxtImg
|
|
27
|
+
v-if="orgRecordId"
|
|
28
|
+
class="rounded-md min-w-10 min-h-10 h-full"
|
|
29
|
+
:src="imagepath"
|
|
30
|
+
placeholder="/images/organization.png"
|
|
31
|
+
@error="onError"
|
|
32
|
+
/>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
</template>
|
|
36
|
+
<script lang="ts" setup>
|
|
37
|
+
import { PHOTOSIZE } from "~/types";
|
|
38
|
+
// import {KeyValue} from ''
|
|
39
|
+
const props = defineProps<{
|
|
40
|
+
changable?: boolean;
|
|
41
|
+
orgRecordId?: string;
|
|
42
|
+
size: PHOTOSIZE;
|
|
43
|
+
}>();
|
|
44
|
+
const imageKey = ref(0);
|
|
45
|
+
const orgRecordId = computed(
|
|
46
|
+
() => props.orgRecordId ?? getUserProfile()?.orgRecordId,
|
|
47
|
+
);
|
|
48
|
+
const xorgpath = getCurrentXorg() ? `${getCurrentXorg()}/` : "MC0wLTA/";
|
|
49
|
+
const size = props.size ?? PHOTOSIZE.S64;
|
|
50
|
+
const path = useOrganizationInfo().getBranchPhotoUrl(orgRecordId.value, size);
|
|
51
|
+
const imagepath = ref(path)
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
watch(
|
|
55
|
+
() => props.orgRecordId,
|
|
56
|
+
() => imageKey.value++,
|
|
57
|
+
);
|
|
58
|
+
const handleBase64 = async (data: string) => {
|
|
59
|
+
const keyvalue = {
|
|
60
|
+
key: "organizations/" + props.orgRecordId,
|
|
61
|
+
value: data,
|
|
62
|
+
};
|
|
63
|
+
// console.log("upload logo ", data);
|
|
64
|
+
const uploadok = await useNuxtApp()
|
|
65
|
+
.$OrganizationDoc()
|
|
66
|
+
.getApi()
|
|
67
|
+
.runUploadPhoto(orgRecordId.value,keyvalue)
|
|
68
|
+
if (uploadok) {
|
|
69
|
+
const realpath = `/api/${imagepath}`;
|
|
70
|
+
await fetch(realpath, { cache: "reload", credentials: "include" });
|
|
71
|
+
imageKey.value++;
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
const onError = () => {
|
|
75
|
+
imagepath.value = "/images/organization.png";
|
|
76
|
+
};
|
|
77
|
+
</script>
|
|
@@ -47,7 +47,7 @@ const getField = (path: string) => {
|
|
|
47
47
|
type defaulttype = typeof alldefaults;
|
|
48
48
|
type keytype = keyof defaulttype;
|
|
49
49
|
|
|
50
|
-
const x: keytype = ("Default" + props.document.
|
|
50
|
+
const x: keytype = ("Default" + props.document.getResourceName()) as keytype;
|
|
51
51
|
const defaultvalue = alldefaults[x](randomUUID());
|
|
52
52
|
return {
|
|
53
53
|
path: path,
|
|
@@ -53,19 +53,24 @@
|
|
|
53
53
|
:action-name="menu.action"
|
|
54
54
|
>{{ menu.label }}</ButtonAction
|
|
55
55
|
>
|
|
56
|
-
<
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
56
|
+
<template v-else>
|
|
57
|
+
<ButtonAction
|
|
58
|
+
v-if="!(hideButtons ?? []).includes(menu.action)"
|
|
59
|
+
:disabled="!canPerform(doc.getDocName(true), menu.action)"
|
|
60
|
+
@click="emitEvent(menu, $event)"
|
|
61
|
+
:action-name="menu.action"
|
|
62
|
+
>{{ menu.label }}</ButtonAction
|
|
63
|
+
>
|
|
64
|
+
</template>
|
|
63
65
|
</div>
|
|
64
66
|
</div>
|
|
67
|
+
<div><slot name="left"></slot></div>
|
|
65
68
|
</div>
|
|
66
69
|
|
|
67
70
|
<!-- center -->
|
|
68
|
-
<div class="flex flex-row"
|
|
71
|
+
<div class="flex flex-row">
|
|
72
|
+
<div><slot name="center"></slot></div>
|
|
73
|
+
</div>
|
|
69
74
|
<!-- right -->
|
|
70
75
|
<div class="flex flex-row gap-2">
|
|
71
76
|
<DebugDocumentData v-model="data" :label="t(doc.getDocName())" />
|
|
@@ -82,8 +87,11 @@
|
|
|
82
87
|
>
|
|
83
88
|
</div>
|
|
84
89
|
</div>
|
|
90
|
+
<div><slot name="right"></slot></div>
|
|
91
|
+
<slot name="actions"></slot>
|
|
85
92
|
</div>
|
|
86
93
|
</div>
|
|
94
|
+
<Toast ref="toast" />
|
|
87
95
|
</div>
|
|
88
96
|
|
|
89
97
|
<OverlayPanelWithToolBar
|
|
@@ -98,13 +106,13 @@
|
|
|
98
106
|
</template>
|
|
99
107
|
<template #headerCenter>
|
|
100
108
|
<div class="flex flex-row gap-2 justify-center">
|
|
101
|
-
<
|
|
109
|
+
<Select
|
|
102
110
|
:options="printformats"
|
|
103
111
|
option-label="formatName"
|
|
104
112
|
option-value="formatId"
|
|
105
113
|
v-model="currentprintformat"
|
|
106
114
|
@change="printPdf"
|
|
107
|
-
></
|
|
115
|
+
></Select>
|
|
108
116
|
<ButtonPrimary @click="showPrintFormats"
|
|
109
117
|
><i class="pi pi-refresh"
|
|
110
118
|
/></ButtonPrimary>
|
|
@@ -183,9 +191,11 @@ const pdfReady = ref(false);
|
|
|
183
191
|
const props = defineProps<{
|
|
184
192
|
document: SimpleAppClient<any, any>;
|
|
185
193
|
disableaction?: string[];
|
|
194
|
+
hideButtons?: ("create" | "update" | "delete")[];
|
|
186
195
|
}>();
|
|
187
196
|
const doc = props.document;
|
|
188
197
|
const data = doc.getReactiveData();
|
|
198
|
+
const toast = ref(null);
|
|
189
199
|
|
|
190
200
|
const createData = async () => {
|
|
191
201
|
try {
|
|
@@ -213,11 +223,24 @@ const updateData = async () => {
|
|
|
213
223
|
console.debug("validation error:", e);
|
|
214
224
|
}
|
|
215
225
|
};
|
|
226
|
+
|
|
216
227
|
const deleteData = async () => {
|
|
217
228
|
try {
|
|
218
229
|
getRecently().delete(data.value._id);
|
|
230
|
+
// toast.value?.add({
|
|
231
|
+
// severity: 'success',
|
|
232
|
+
// summary: 'Success',
|
|
233
|
+
// detail: 'The data was deleted successfully.',
|
|
234
|
+
// life: 4000,
|
|
235
|
+
// });
|
|
219
236
|
return await doc.delete();
|
|
220
237
|
} catch (e) {
|
|
238
|
+
// toast.value?.add({
|
|
239
|
+
// severity: 'error',
|
|
240
|
+
// summary: 'Action Denied',
|
|
241
|
+
// detail: e,
|
|
242
|
+
// life: 4000,
|
|
243
|
+
// });
|
|
221
244
|
console.debug("validation error:", e);
|
|
222
245
|
}
|
|
223
246
|
};
|
|
@@ -340,17 +363,20 @@ const getActions = () => {
|
|
|
340
363
|
const showPrintFormats = async () => {
|
|
341
364
|
await printPdf();
|
|
342
365
|
};
|
|
343
|
-
const emitEvent = async (menu: FormMenu, clickEvent
|
|
366
|
+
const emitEvent = async (menu: FormMenu, clickEvent?: Event | MouseEvent) => {
|
|
344
367
|
if (menu.action == "delete") {
|
|
345
368
|
confirm.require({
|
|
346
|
-
target: clickEvent
|
|
369
|
+
target: clickEvent?.target as HTMLElement,
|
|
347
370
|
header: t("deleteRecord"),
|
|
348
371
|
message: `${t("deleteThisRecord?")}`,
|
|
349
372
|
|
|
350
373
|
// icon: "pi pi-exclamation-triangle gap-4",
|
|
351
374
|
acceptClass: "bg-danger-600 text-white",
|
|
352
375
|
accept: async () => {
|
|
353
|
-
if (await deleteData())
|
|
376
|
+
if (await deleteData()) {
|
|
377
|
+
emits("on", FormCrudEvent.delete);
|
|
378
|
+
emitEvent({ action: "exit", type: "menu", label: "" }, clickEvent);
|
|
379
|
+
}
|
|
354
380
|
},
|
|
355
381
|
});
|
|
356
382
|
} else {
|
|
@@ -385,16 +411,22 @@ const getDocActions = () => {
|
|
|
385
411
|
if (allstatus) {
|
|
386
412
|
const stateconfig = allstatus.find((item) => item.status === docstatus);
|
|
387
413
|
docactionmenus =
|
|
388
|
-
stateconfig?.actions
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
414
|
+
stateconfig?.actions
|
|
415
|
+
.filter(
|
|
416
|
+
(item) =>
|
|
417
|
+
!(props.disableaction && props.disableaction.includes(item)),
|
|
418
|
+
)
|
|
419
|
+
.map((item) => ({
|
|
420
|
+
action: item,
|
|
421
|
+
label: statusNames[item],
|
|
422
|
+
type: "docstatus",
|
|
423
|
+
icon: getActionIcon(item),
|
|
424
|
+
command: emitMobileEvent,
|
|
425
|
+
})) ?? [];
|
|
395
426
|
}
|
|
396
427
|
return docactionmenus;
|
|
397
428
|
};
|
|
429
|
+
|
|
398
430
|
const showMenuButton = (menu: FormMenu) => {
|
|
399
431
|
if (menu.separator) return true;
|
|
400
432
|
|
|
@@ -463,6 +495,49 @@ const togglePdfMenu = async () => {
|
|
|
463
495
|
files: [file],
|
|
464
496
|
});
|
|
465
497
|
};
|
|
498
|
+
|
|
499
|
+
// onMounted(() => {
|
|
500
|
+
// document.onkeydown = async function (e) {
|
|
501
|
+
// const capturekeys = ['s','d','p']
|
|
502
|
+
|
|
503
|
+
// // let capturekey=''
|
|
504
|
+
// // switch (props.actionName) {
|
|
505
|
+
// // case "create":
|
|
506
|
+
// // case "update":
|
|
507
|
+
// // capturekey= "s";
|
|
508
|
+
// // break;
|
|
509
|
+
// // case "delete":
|
|
510
|
+
// // capturekey= "d";
|
|
511
|
+
// // break;
|
|
512
|
+
// // case "print":
|
|
513
|
+
// // capturekey= "p";
|
|
514
|
+
// // break;
|
|
515
|
+
// // case "confirm":
|
|
516
|
+
// // capturekey= "enter";
|
|
517
|
+
// // break;
|
|
518
|
+
// // case "void":
|
|
519
|
+
// // capturekey= "";
|
|
520
|
+
// // break;
|
|
521
|
+
// // case "draft":
|
|
522
|
+
// // capturekey= "";
|
|
523
|
+
// // break;
|
|
524
|
+
// // }
|
|
525
|
+
|
|
526
|
+
// // console.log("Capture key",e)
|
|
527
|
+
// // if (capturekeys.includes(e.key) && (e.ctrlKey || e.metaKey)) {
|
|
528
|
+
// // e.preventDefault();
|
|
529
|
+
// // let eventdata={} as FormMenu
|
|
530
|
+
// // if(e.key=='s' && doc.isNew()) eventdata.action='create'
|
|
531
|
+
// // else if(e.key=='s' && !doc.isNew()) eventdata.action='update'
|
|
532
|
+
// // else if(e.key=='d' && !doc.isNew()) eventdata.action='delete'
|
|
533
|
+
// // else if(e.key=='p' && !doc.isNew()) eventdata.action='print'
|
|
534
|
+
|
|
535
|
+
// // if(eventdata.action) await emitEvent(eventdata)
|
|
536
|
+
|
|
537
|
+
// // }
|
|
538
|
+
|
|
539
|
+
// };
|
|
540
|
+
// });
|
|
466
541
|
</script>
|
|
467
542
|
<style>
|
|
468
543
|
.vue-pdf-embed {
|
|
@@ -46,33 +46,32 @@ const errCreateTenant = ref();
|
|
|
46
46
|
const onhold = ref(false);
|
|
47
47
|
|
|
48
48
|
const createTenant = async () => {
|
|
49
|
-
holdScreenStart()
|
|
49
|
+
holdScreenStart();
|
|
50
50
|
onhold.value = true;
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
.
|
|
54
|
-
|
|
55
|
-
|
|
51
|
+
try{
|
|
52
|
+
const tmp:AxiosResponse = await getProfileApi().createTenant(data.value)
|
|
53
|
+
const res = tmp.data
|
|
54
|
+
await reloadUserStore()
|
|
55
|
+
if (res && res.status && res.status == 201) {
|
|
56
56
|
if (res.data && res.data["xOrg"]) {
|
|
57
57
|
const xorg = res.data["xOrg"];
|
|
58
|
-
navigateTo("/" + xorg
|
|
58
|
+
navigateTo("/" + xorg);
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
61
|
+
}catch(e){
|
|
62
|
+
const err = e as AxiosError
|
|
63
|
+
errCreateTenant.value = err["message"];
|
|
64
|
+
console.error("errCreateTenant", err.response?.data?.data);
|
|
65
65
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
});
|
|
72
|
-
})
|
|
73
|
-
.finally(() => {
|
|
74
|
-
onhold.value = false;
|
|
75
|
-
holdScreenEnd()
|
|
66
|
+
useNuxtApp().$event("Notification", {
|
|
67
|
+
documentName: "tenant",
|
|
68
|
+
status: NotificationStatus.error,
|
|
69
|
+
summary: t("createError"),
|
|
70
|
+
data: err.response?.data?.data,
|
|
76
71
|
});
|
|
72
|
+
}finally{
|
|
73
|
+
onhold.value = false;
|
|
74
|
+
holdScreenEnd();
|
|
75
|
+
}
|
|
77
76
|
};
|
|
78
77
|
</script>
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
</div>
|
|
18
18
|
<div class="flex flex-col w-full justify-end gap-2">
|
|
19
19
|
<div class="flex flex-row gap-2">
|
|
20
|
-
<TextMain>{{ item.
|
|
20
|
+
<TextMain>{{ item.branch.label }}</TextMain>
|
|
21
21
|
<Tag v-for="groupname in item.groups">{{ t(groupname) }}</Tag>
|
|
22
22
|
</div>
|
|
23
23
|
<TextSubsubtitle>{{ item.orgName }}</TextSubsubtitle>
|
|
@@ -4,8 +4,10 @@
|
|
|
4
4
|
* last change 2023-10-28
|
|
5
5
|
* Author: Ks Tan
|
|
6
6
|
*/
|
|
7
|
+
import {DOCNOApi} from '~/simpleapp/generate/openapi'
|
|
8
|
+
|
|
7
9
|
export const getDocFormats = async (doctype:string)=>{
|
|
8
|
-
const docno =
|
|
10
|
+
const docno = new DOCNOApi(getAxiosConfig())
|
|
9
11
|
const docnoformats = await docno.runListDocFormats(doctype)
|
|
10
|
-
return docnoformats
|
|
12
|
+
return docnoformats.data
|
|
11
13
|
}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<% if (module.schema && module.schema.properties) { %>
|
|
8
8
|
<% Object.entries(module.schema.properties).forEach(function([propName, prop]) { %>
|
|
9
9
|
<% if (prop.enum) { %>
|
|
10
|
-
export enum <%=
|
|
10
|
+
export enum <%= upperFirstCase(module.docname) %><%= propName.charAt(0).toUpperCase() + propName.slice(1) + 'Enum' %> {
|
|
11
11
|
<% prop.enum.forEach(function(enumValue, index) { %>
|
|
12
12
|
<% if (enumValue === '') { %>
|
|
13
13
|
EMPTY = ''<%= index < prop.enum.length - 1 ? ',' : '' %>
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
import { getUserProfile } from './../composables/getUserStore.generate';
|
|
8
8
|
import {MenuData} from '~/types'
|
|
9
9
|
export default defineNuxtRouteMiddleware((to, from) => {
|
|
10
|
-
const userprofile = getUserProfile()
|
|
10
|
+
// const userprofile = getUserProfile()
|
|
11
11
|
//skip auto then simply allow
|
|
12
12
|
if(!to.meta.auth){
|
|
13
13
|
return true
|
|
@@ -26,12 +26,12 @@ export default defineNuxtRouteMiddleware((to, from) => {
|
|
|
26
26
|
if(resourcename===undefined){//home page
|
|
27
27
|
|
|
28
28
|
// return true //no permission needed
|
|
29
|
-
if(userprofile.group==''){
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}else{
|
|
29
|
+
//if(userprofile.group==''){
|
|
30
|
+
// console.error("no access right to current xorg")
|
|
31
|
+
// return navigateTo('/')
|
|
32
|
+
//}else{
|
|
33
33
|
return true
|
|
34
|
-
}
|
|
34
|
+
//}
|
|
35
35
|
|
|
36
36
|
}else{
|
|
37
37
|
const {$userstore} = useNuxtApp()
|
|
@@ -2,36 +2,42 @@
|
|
|
2
2
|
<div class="p-10 m-10 text-3xl border text-center dark:text-white">
|
|
3
3
|
<div class="flex flex-col justify-center">
|
|
4
4
|
<div class="pi pi-spin pi-spinner" style="font-size: 8rem"></div>
|
|
5
|
-
<div>{{ t("login")+
|
|
5
|
+
<div>{{ t("login") + "..." }}</div>
|
|
6
6
|
</div>
|
|
7
7
|
<!-- <NuxtPage /> -->
|
|
8
8
|
</div>
|
|
9
9
|
</template>
|
|
10
10
|
<script setup lang="ts">
|
|
11
11
|
/**
|
|
12
|
-
* This file was automatically generated by simpleapp generator
|
|
13
|
-
*
|
|
14
|
-
* last change 2024-02-
|
|
15
|
-
*
|
|
12
|
+
* This file was automatically generated by simpleapp generator. Every
|
|
13
|
+
* MODIFICATION OVERRIDE BY GENERATEOR
|
|
14
|
+
* last change 2024-02-13
|
|
15
|
+
* Author: Ks Tan
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
18
|
definePageMeta({
|
|
19
19
|
name: "Login",
|
|
20
20
|
auth: false,
|
|
21
|
-
layout: false
|
|
21
|
+
layout: false,
|
|
22
22
|
});
|
|
23
23
|
|
|
24
24
|
const route = useRoute();
|
|
25
25
|
const { signIn } = useAuth();
|
|
26
26
|
const callbackUrl = ref("");
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
27
|
+
onNuxtReady(async () => {
|
|
28
|
+
setTimeout(async () => {
|
|
29
|
+
if (getUserProfile().email) {
|
|
30
|
+
console.log('getUserProfile',getUserProfile().email)
|
|
31
|
+
navigateTo("picktenant");
|
|
32
|
+
} else {
|
|
33
|
+
if (route.query.callbackUrl) {
|
|
34
|
+
callbackUrl.value = <string>route.query.callbackUrl;
|
|
35
|
+
} else {
|
|
36
|
+
callbackUrl.value = "/";
|
|
37
|
+
}
|
|
38
|
+
callbackUrl.value = decodeURIComponent(callbackUrl.value);
|
|
39
|
+
// await signIn("keycloak", { callbackUrl: callbackUrl.value });
|
|
40
|
+
}
|
|
41
|
+
}, 2000);
|
|
36
42
|
});
|
|
37
43
|
</script>
|
|
@@ -1,59 +1,49 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<title>{{ t("profile") }}</title>
|
|
3
3
|
<div class="p-4 place-items-center text-center justify-center flex flex-row">
|
|
4
|
-
<ImageAvatar :size="128" changable class="cursor-pointer"/>
|
|
4
|
+
<ImageAvatar :size="128" changable class="cursor-pointer" />
|
|
5
5
|
</div>
|
|
6
6
|
<div class="p-4">
|
|
7
7
|
<div class="px-4 sm:px-0">
|
|
8
|
-
<h3
|
|
9
|
-
|
|
10
|
-
>
|
|
11
|
-
{{ t("userinfo") }}
|
|
8
|
+
<h3 class="text-base font-semibold leading-7 text-gray-900">
|
|
9
|
+
{{ t("userInfo") }}
|
|
12
10
|
</h3>
|
|
13
11
|
</div>
|
|
14
12
|
<div class="mt-6 border-t border-gray-100">
|
|
15
13
|
<dl class="divide-y divide-gray-100">
|
|
16
14
|
<div class="px-4 py-6 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0">
|
|
17
|
-
<dt
|
|
18
|
-
class="text-sm font-medium leading-6 text-gray-900 dark:text-gray-400"
|
|
19
|
-
>
|
|
15
|
+
<dt class="text-sm font-medium leading-6 text-gray-900">
|
|
20
16
|
{{ t("fullName") }}
|
|
21
17
|
</dt>
|
|
22
18
|
<dd
|
|
23
|
-
class="mt-1 text-sm leading-6 text-gray-700 sm:col-span-2 sm:mt-0
|
|
19
|
+
class="mt-1 text-sm leading-6 text-gray-700 sm:col-span-2 sm:mt-0"
|
|
24
20
|
>
|
|
25
21
|
{{ getUserProfile().fullName }}
|
|
26
22
|
</dd>
|
|
27
23
|
</div>
|
|
28
24
|
<div class="px-4 py-6 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0">
|
|
29
|
-
<dt
|
|
30
|
-
class="text-sm font-medium leading-6 text-gray-900 dark:text-gray-400"
|
|
31
|
-
>
|
|
25
|
+
<dt class="text-sm font-medium leading-6 text-gray-900">
|
|
32
26
|
{{ t("groups") }}
|
|
33
27
|
</dt>
|
|
34
28
|
<dd
|
|
35
|
-
class="mt-1 text-sm leading-6 text-gray-700
|
|
29
|
+
class="mt-1 text-sm leading-6 text-gray-700 sm:col-span-2 sm:mt-0"
|
|
36
30
|
>
|
|
37
|
-
{{ getUserProfile()?.groups }}
|
|
31
|
+
{{ capitalizeGroups(getUserProfile()?.groups).join(", ") }}
|
|
38
32
|
</dd>
|
|
39
33
|
</div>
|
|
40
34
|
<div class="px-4 py-6 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0">
|
|
41
|
-
<dt
|
|
42
|
-
class="text-sm font-medium leading-6 text-gray-900 dark:text-gray-400"
|
|
43
|
-
>
|
|
35
|
+
<dt class="text-sm font-medium leading-6 text-gray-900">
|
|
44
36
|
{{ t("email") }}
|
|
45
37
|
</dt>
|
|
46
38
|
<dd
|
|
47
|
-
class="mt-1 text-sm leading-6 text-gray-700
|
|
39
|
+
class="mt-1 text-sm leading-6 text-gray-700 sm:col-span-2 sm:mt-0"
|
|
48
40
|
>
|
|
49
41
|
{{ getProfileEmail() }}
|
|
50
42
|
</dd>
|
|
51
43
|
</div>
|
|
52
44
|
|
|
53
45
|
<div class="px-4 py-6 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0">
|
|
54
|
-
<dt
|
|
55
|
-
class="text-sm font-medium leading-6 text-gray-900 dark:text-gray-400"
|
|
56
|
-
>
|
|
46
|
+
<dt class="text-sm font-medium leading-6 text-gray-900">
|
|
57
47
|
{{ t("branches") }}
|
|
58
48
|
</dt>
|
|
59
49
|
<dd class="mt-2 text-sm text-gray-900 sm:col-span-2 sm:mt-0">
|
|
@@ -65,16 +55,16 @@
|
|
|
65
55
|
class="flex items-center justify-between py-4 pl-4 pr-5 text-sm leading-6"
|
|
66
56
|
v-for="b in getUserProfile().branches"
|
|
67
57
|
>
|
|
68
|
-
<NuxtLink :href="`/${b.xOrg}`"
|
|
58
|
+
<NuxtLink :href="`/${b.xOrg}`">
|
|
69
59
|
<div class="flex w-0 flex-1 items-center">
|
|
70
60
|
<i class="pi pi-sitemap"></i>
|
|
71
61
|
<div class="ml-4 flex min-w-0 flex-1 gap-2">
|
|
72
62
|
<span class="truncate font-medium">
|
|
73
63
|
{{ b.branch.branchName }}
|
|
74
64
|
</span>
|
|
75
|
-
<span class="flex-shrink-0 text-gray-400">
|
|
76
|
-
b.branch.branchCode
|
|
77
|
-
|
|
65
|
+
<span class="flex-shrink-0 text-gray-400">
|
|
66
|
+
{{ b.branch.branchCode }}
|
|
67
|
+
</span>
|
|
78
68
|
</div>
|
|
79
69
|
</div>
|
|
80
70
|
<div class="ml-4 flex-shrink-0">
|
|
@@ -92,18 +82,16 @@
|
|
|
92
82
|
</div>
|
|
93
83
|
|
|
94
84
|
<div
|
|
95
|
-
v-if="useRuntimeConfig().public.
|
|
85
|
+
v-if="useRuntimeConfig().public.debugData == '1'"
|
|
96
86
|
class="px-4 py-6 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0"
|
|
97
87
|
>
|
|
98
|
-
<dt
|
|
99
|
-
class="text-sm font-medium leading-6 text-gray-900 dark:text-gray-400"
|
|
100
|
-
>
|
|
88
|
+
<dt class="text-sm font-medium leading-6 text-gray-900">
|
|
101
89
|
{{ t("more") }}
|
|
102
90
|
<p class="text-danger-600">{{ t("onlyAppearInDebugMode") }}</p>
|
|
103
91
|
<p class="text-danger-600">{{ getUserProfile().sessionId }}</p>
|
|
104
92
|
</dt>
|
|
105
93
|
<dd
|
|
106
|
-
class="mt-1 text-sm leading-6 text-gray-700
|
|
94
|
+
class="mt-1 text-sm leading-6 text-gray-700 sm:col-span-2 sm:mt-0"
|
|
107
95
|
>
|
|
108
96
|
<div>
|
|
109
97
|
<p>{{ t("accessRights") }}</p>
|
|
@@ -123,9 +111,13 @@
|
|
|
123
111
|
</template>
|
|
124
112
|
<script setup lang="ts">
|
|
125
113
|
/**
|
|
126
|
-
* This file was automatically generated by simpleapp generator
|
|
127
|
-
*
|
|
114
|
+
* This file was automatically generated by simpleapp generator. Every
|
|
115
|
+
* MODIFICATION OVERRIDE BY GENERATEOR
|
|
128
116
|
* last change 2023-10-28
|
|
129
117
|
* Author: Ks Tan
|
|
130
118
|
*/
|
|
119
|
+
const capitalizeGroups = (groups: string[] | undefined): string[] => {
|
|
120
|
+
if (!groups) return [];
|
|
121
|
+
return groups.map((group) => group.charAt(0).toUpperCase() + group.slice(1));
|
|
122
|
+
};
|
|
131
123
|
</script>
|