@simitgroup/simpleapp-generator 1.5.1-alpha → 1.6.1-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/dist/buildinschemas/branch.d.ts.map +1 -1
- package/dist/buildinschemas/branch.js +10 -0
- package/dist/buildinschemas/branch.js.map +1 -1
- package/dist/buildinschemas/index.d.ts +2 -0
- package/dist/buildinschemas/index.d.ts.map +1 -1
- package/dist/buildinschemas/index.js +5 -1
- package/dist/buildinschemas/index.js.map +1 -1
- package/dist/buildinschemas/keyvaluepair.d.ts +3 -0
- package/dist/buildinschemas/keyvaluepair.d.ts.map +1 -0
- package/dist/buildinschemas/keyvaluepair.js +28 -0
- package/dist/buildinschemas/keyvaluepair.js.map +1 -0
- package/dist/buildinschemas/message.d.ts +3 -0
- package/dist/buildinschemas/message.d.ts.map +1 -0
- package/dist/buildinschemas/message.js +34 -0
- package/dist/buildinschemas/message.js.map +1 -0
- package/dist/buildinschemas/organization.d.ts.map +1 -1
- package/dist/buildinschemas/organization.js +18 -1
- package/dist/buildinschemas/organization.js.map +1 -1
- package/dist/buildinschemas/systemmessage.d.ts +3 -0
- package/dist/buildinschemas/systemmessage.d.ts.map +1 -0
- package/dist/buildinschemas/systemmessage.js +43 -0
- package/dist/buildinschemas/systemmessage.js.map +1 -0
- package/dist/framework.d.ts.map +1 -1
- package/dist/framework.js +4 -2
- package/dist/framework.js.map +1 -1
- package/dist/generate.d.ts.map +1 -1
- package/dist/generate.js +37 -9
- package/dist/generate.js.map +1 -1
- package/dist/processors/bpmnbuilder.d.ts.map +1 -1
- package/dist/processors/bpmnbuilder.js +23 -32
- package/dist/processors/bpmnbuilder.js.map +1 -1
- package/dist/processors/jrxmlbuilder.d.ts +3 -0
- package/dist/processors/jrxmlbuilder.d.ts.map +1 -0
- package/dist/processors/jrxmlbuilder.js +57 -0
- package/dist/processors/jrxmlbuilder.js.map +1 -0
- package/dist/type.d.ts +6 -0
- package/dist/type.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/buildinschemas/branch.ts +10 -0
- package/src/buildinschemas/index.ts +2 -0
- package/src/buildinschemas/keyvaluepair.ts +26 -0
- package/src/buildinschemas/organization.ts +18 -1
- package/src/buildinschemas/systemmessage.ts +42 -0
- package/src/framework.ts +4 -2
- package/src/generate.ts +41 -13
- package/src/processors/bpmnbuilder.ts +34 -38
- package/src/processors/jrxmlbuilder.ts +38 -0
- package/src/type.ts +7 -1
- package/templates/basic/nest/controller.ts.eta +34 -17
- package/templates/basic/nest/processor.ts.eta +2 -1
- package/templates/basic/nest/resolver.ts.eta +1 -1
- package/templates/basic/nest/service.ts.eta +22 -4
- package/templates/basic/nest/type.ts.eta +2 -2
- package/templates/basic/nuxt/component.select.vue.eta +5 -1
- package/templates/basic/nuxt/pages.form.vue.eta +1 -1
- package/templates/basic/nuxt/pages.mobile.landing.vue.eta +4 -61
- package/templates/basic/nuxt/simpleapp.generate.client.ts.eta +11 -13
- package/templates/nest/src/app.module.ts.eta +12 -4
- package/templates/nest/src/cloudapi/cloudapi.module.ts._eta +1 -1
- package/templates/nest/src/printapi/api/.gitignore.eta +4 -0
- package/templates/nest/src/printapi/api/.npmignore.eta +1 -0
- package/templates/nest/src/printapi/api/.openapi-generator/FILES.eta +8 -0
- package/templates/nest/src/printapi/api/.openapi-generator/VERSION.eta +1 -0
- package/templates/nest/src/printapi/api/.openapi-generator-ignore.eta +23 -0
- package/templates/nest/src/printapi/api/api.ts.eta +223 -0
- package/templates/nest/src/printapi/api/base.ts.eta +86 -0
- package/templates/nest/src/printapi/api/common.ts.eta +150 -0
- package/templates/nest/src/printapi/api/configuration.ts.eta +110 -0
- package/templates/nest/src/printapi/api/git_push.sh.eta +57 -0
- package/templates/nest/src/printapi/api/index.ts.eta +18 -0
- package/templates/nest/src/printapi/api/openapitools.json.eta +7 -0
- package/templates/nest/src/printapi/printapi.module.ts.eta +15 -0
- package/templates/nest/src/printapi/printapi.service.ts.eta +42 -0
- package/templates/nest/src/simpleapp/apischemas/index.ts._eta +11 -0
- package/templates/nest/src/simpleapp/generate/commons/robotuser.service.ts.eta +5 -4
- package/templates/nest/src/simpleapp/generate/commons/roles/roles.enum.ts.eta +7 -0
- package/templates/nest/src/simpleapp/generate/commons/user.context.ts.eta +10 -9
- package/templates/nest/src/simpleapp/generate/processors/autoinc.processor.ts.eta +73 -0
- package/templates/nest/src/simpleapp/generate/processors/branch.processor.ts.eta +104 -0
- package/templates/nest/src/simpleapp/generate/processors/docno.processor.ts.eta +77 -0
- package/templates/nest/src/simpleapp/generate/processors/org.processor.ts.eta +115 -0
- package/templates/nest/src/simpleapp/generate/processors/perm.processor.ts.eta +71 -0
- package/templates/nest/src/simpleapp/generate/processors/simpleapp.processor.ts.eta +77 -13
- package/templates/nest/src/simpleapp/generate/processors/sysmsg.processor.ts.eta +49 -0
- package/templates/nest/src/simpleapp/generate/processors/tenant.processor.ts.eta +52 -0
- package/templates/nest/src/simpleapp/generate/types/simpleapp.type.ts.eta +12 -5
- package/templates/nest/src/simpleapp/generate/workflow/workflow.controller.ts.eta +2 -2
- package/templates/nest/src/simpleapp/generate/workflow/workflow.delegate.ts.eta +33 -28
- package/templates/nest/src/simpleapp/generate/workflow/workflow.service.ts.eta +95 -26
- package/templates/nest/src/simpleapp/generate/workflow/workflow.type.ts.eta +4 -4
- package/templates/nest/src/simpleapp/profile/profile.apischema.ts.eta +15 -0
- package/templates/nest/src/simpleapp/profile/profile.controller.ts.eta +3 -1
- package/templates/nest/src/simpleapp/profile/profile.service.ts.eta +20 -3
- package/templates/nest/src/simpleapp/services/sysmsg.service.ts._etaxxx +43 -0
- package/templates/nest/src/simpleapp/services/userresolver.service.ts._eta +70 -0
- package/templates/nest/src/simpleapp/simpleapp.module.ts.eta +8 -4
- package/templates/nest/src/simpleapp/types/index.ts._eta +5 -0
- package/templates/nuxt/assets/css/listview.css._eta +2 -2
- package/templates/nuxt/components/button/ButtonAction.vue._eta +11 -5
- package/templates/nuxt/components/calendar/CalendarSmall.vue.eta +11 -2
- package/templates/nuxt/components/debug/DebugDocumentData.vue.eta +1 -1
- package/templates/nuxt/components/form/{FormBranch.vue.eta → FormBranch.vue._eta} +1 -1
- package/templates/nuxt/components/image/ImageAvatar.vue.eta.vue +38 -0
- package/templates/nuxt/components/image/ImageOrganization.vue.eta.vue +40 -0
- package/templates/nuxt/components/image/ImageToBase64Uploader.vue.eta.vue +147 -0
- package/templates/nuxt/components/list/ListItem.vue.eta +24 -0
- package/templates/nuxt/components/list/ListMessages.vue.eta +89 -0
- package/templates/nuxt/components/list/ListView.vue.eta +9 -12
- package/templates/nuxt/components/renderer/RendererMoney.vue.eta +11 -12
- package/templates/nuxt/components/select/SelectTemplate.vue.eta +49 -20
- package/templates/nuxt/components/simpleApp/SimpleAppAutocomplete.vue.eta +2 -2
- package/templates/nuxt/components/simpleApp/SimpleAppChildrenList.vue.eta +16 -15
- package/templates/nuxt/components/simpleApp/SimpleAppFormToolBar.vue._eta +92 -8
- package/templates/nuxt/components/simpleApp/SimpleAppInput.vue.eta +29 -6
- package/templates/nuxt/components/text/TextBold.vue._eta +13 -0
- package/templates/nuxt/components/user/UserButtonCreateTenant.vue._eta +18 -2
- package/templates/nuxt/composables/getUserStore.generate.ts.eta +12 -3
- package/templates/nuxt/composables/hotvalue.generate.ts.eta +30 -0
- package/templates/nuxt/composables/pusher.ts._eta +13 -0
- package/templates/nuxt/composables/stringHelper.generate.ts.eta +2 -3
- package/templates/nuxt/composables/sysmessage.generate.ts.eta +20 -0
- package/templates/nuxt/composables/workflow.generate.ts.eta +9 -4
- package/templates/nuxt/layouts/mobile.vue._eta +31 -42
- package/templates/nuxt/nuxt.config.ts._eta +2 -2
- package/templates/nuxt/othermodules.d.ts.eta +449 -0
- package/templates/nuxt/pages/[xorg]/mobile/organization/[id].vue._eta +40 -0
- package/templates/nuxt/pages/[xorg]/mobile/organization/{index.vue.eta → index.vue.aetaz} +16 -13
- package/templates/nuxt/pages/[xorg]/organization.vue.eta +21 -15
- package/templates/nuxt/plugins/40.pusher.ts.eta +18 -0
- package/templates/nuxt/simpleapp/generate/clients/SimpleAppClient.ts.eta +10 -1
- package/templates/nuxt/simpleapp/generate/commons/roles.ts.eta +4 -1
- package/templates/nuxt/types/schema.ts.eta +8 -1
- package/templates/nuxt/types/simpleappinput.ts.eta +3 -5
- package/templates/printformats/template.jrxml._eta +27 -0
- package/templates/project/groups/admin.json.eta +6 -1
- package/templates/project/jsonschemas/branch.json._eta +113 -0
- package/templates/project/jsonschemas/invoice.json._eta +5 -1
- package/templates/project/jsonschemas/organization.json._eta +111 -0
- package/templates/project/lang/default._json +71 -150
- package/templates/workflow/next/listener.ts.eta +6 -3
- package/tsconfig.tsbuildinfo +1 -1
- /package/templates/nest/src/simpleapp/services/{autoinc.service.ts.eta → autoinc.service.ts.etaxx} +0 -0
- /package/templates/nest/src/simpleapp/services/{branch.service.ts.eta → branch.service.ts.etaxxx} +0 -0
- /package/templates/nest/src/simpleapp/services/{docno.service.ts.eta → docno.service.ts.etaxxx} +0 -0
- /package/templates/nest/src/simpleapp/services/{org.service.ts.eta → org.service.ts.etaxxx} +0 -0
- /package/templates/nest/src/simpleapp/services/{perm.service.ts.eta → perm.service.ts.etaxxx} +0 -0
- /package/templates/nest/src/simpleapp/services/{tenant.service.ts.eta → tenant.service.ts.etaxxx} +0 -0
|
@@ -0,0 +1,18 @@
|
|
|
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 { defineNuxtPlugin } from "#app";
|
|
8
|
+
import Pusher from 'pusher-js';
|
|
9
|
+
export default defineNuxtPlugin( async(nuxtApp) => {
|
|
10
|
+
const pusherkey = (useRuntimeConfig().app.PUSHER_KEY ?? '') as string
|
|
11
|
+
const pushercluster = (useRuntimeConfig().app.PUSHER_CLUSTER ?? '') as string
|
|
12
|
+
const pusher = new Pusher(pusherkey, { cluster: pushercluster,});
|
|
13
|
+
return {
|
|
14
|
+
provide: {
|
|
15
|
+
pusher:pusher
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
});
|
|
@@ -22,13 +22,15 @@ type crudType = {
|
|
|
22
22
|
runUpdate: Function;
|
|
23
23
|
runPatch: Function;
|
|
24
24
|
runDelete: Function;
|
|
25
|
-
runSearch: Function
|
|
25
|
+
runSearch: Function;
|
|
26
|
+
runDefault:Function;
|
|
26
27
|
};
|
|
27
28
|
export class SimpleAppClient<
|
|
28
29
|
TData extends { _id?: string,created?:string },
|
|
29
30
|
TApi extends crudType,
|
|
30
31
|
> {
|
|
31
32
|
// protected defaultTimeOut=5000
|
|
33
|
+
protected unwantchobj;
|
|
32
34
|
protected docapi;
|
|
33
35
|
public event:Function|null=null;
|
|
34
36
|
public listen:Function|null=null;
|
|
@@ -65,18 +67,25 @@ export class SimpleAppClient<
|
|
|
65
67
|
};
|
|
66
68
|
|
|
67
69
|
async getById(id?: string) {
|
|
70
|
+
if(this.unwantchobj)this.unwantchobj()
|
|
68
71
|
return await this.docapi.runFindOne(id,this.axios)
|
|
69
72
|
.then((res: AxiosResponse) => {
|
|
70
73
|
// if(this.event){this.event('info:getById',res.data)}
|
|
71
74
|
this.data.value={} as TData
|
|
72
75
|
Object.assign(this.data.value, res.data);
|
|
76
|
+
this.setWatchChange()
|
|
73
77
|
return res;
|
|
74
78
|
}).catch((res:any)=>{
|
|
75
79
|
// if(this.event){this.event('error:getById',res)}
|
|
76
80
|
return Promise.reject(res)
|
|
77
81
|
});
|
|
78
82
|
}
|
|
83
|
+
setWatchChange(){}
|
|
79
84
|
|
|
85
|
+
async runDefault(){
|
|
86
|
+
const res = await this.docapi.runDefault()
|
|
87
|
+
return res.data
|
|
88
|
+
}
|
|
80
89
|
async create() {
|
|
81
90
|
const errors = this.validateFailed();
|
|
82
91
|
const {$event} =useNuxtApp()
|
|
@@ -8,11 +8,14 @@ type roletype = {resource:string, action:string}
|
|
|
8
8
|
const allroles:roletype[] = [
|
|
9
9
|
<% for(let i=0;i<it.modules.length; i++){ %>
|
|
10
10
|
<% const m = it.modules[i] %>
|
|
11
|
+
{resource: '<%=m.docname%>', action:'access'},
|
|
11
12
|
{resource: '<%=m.docname%>', action:'create'},
|
|
12
13
|
{resource: '<%=m.docname%>', action:'update'},
|
|
13
14
|
{resource: '<%=m.docname%>', action:'delete'},
|
|
14
15
|
{resource: '<%=m.docname%>', action:'search'},
|
|
15
|
-
|
|
16
|
+
<%if(m.schema['x-simpleapp-config']['printFormats']){%>
|
|
17
|
+
{resource: '<%=m.docname%>', action:'print'},
|
|
18
|
+
<%}%>,
|
|
16
19
|
|
|
17
20
|
<% if(m.api && m.api.length >0) {%>
|
|
18
21
|
|
|
@@ -46,8 +46,15 @@ export type SchemaConfig = {
|
|
|
46
46
|
documentType: string
|
|
47
47
|
documentName: string
|
|
48
48
|
collectionName?: string
|
|
49
|
-
foreignKeys?:MyForeignKey
|
|
49
|
+
foreignKeys?:MyForeignKey
|
|
50
|
+
printFormats?: SchemaPrintFormat[]
|
|
50
51
|
}
|
|
52
|
+
|
|
53
|
+
export type SchemaPrintFormat = {
|
|
54
|
+
formatName: string
|
|
55
|
+
formatId: string
|
|
56
|
+
description?: string
|
|
57
|
+
}
|
|
51
58
|
export type MyForeignKey = {
|
|
52
59
|
[collectionname:string]:string[]
|
|
53
60
|
}
|
|
@@ -58,13 +58,11 @@ export type FormActions = {
|
|
|
58
58
|
[key:string]:string[]
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
|
|
62
61
|
export type FormMenu = {
|
|
63
|
-
type
|
|
64
|
-
action
|
|
65
|
-
label:string
|
|
62
|
+
type?:string
|
|
63
|
+
action?:string
|
|
64
|
+
label?: string | ((...args: any) => string) | undefined
|
|
66
65
|
command? : Function
|
|
67
66
|
event?:FormCrudEvent
|
|
68
67
|
[key:string] : any
|
|
69
68
|
}
|
|
70
|
-
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!-- Created with simpleapp generator -->
|
|
3
|
+
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="<%=it.formatName%>" pageWidth="595" pageHeight="420" orientation="Landscape" columnWidth="380" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="d0a16255-a928-4987-a618-d8b2c6a4728a">
|
|
4
|
+
<property name="com.jaspersoft.studio.report.description" value="<%=it.description%>"/>
|
|
5
|
+
|
|
6
|
+
<queryString>
|
|
7
|
+
<![CDATA[]]>
|
|
8
|
+
</queryString>
|
|
9
|
+
<background>
|
|
10
|
+
<band splitType="Stretch"/>
|
|
11
|
+
</background>
|
|
12
|
+
<detail><band splitType="Stretch"/></detail>
|
|
13
|
+
<noData>
|
|
14
|
+
<band height="380" splitType="Stretch">
|
|
15
|
+
<staticText>
|
|
16
|
+
<reportElement x="0" y="0" width="555" height="380" uuid="0fd432f8-6d4b-49cc-ac6c-1de5b660275b"/>
|
|
17
|
+
<box>
|
|
18
|
+
<pen lineWidth="0.75"/>
|
|
19
|
+
</box>
|
|
20
|
+
<textElement textAlignment="Center" verticalAlignment="Middle">
|
|
21
|
+
<font size="29"/>
|
|
22
|
+
</textElement>
|
|
23
|
+
<text><![CDATA[this is <%=it.formatName%> (<%=it.formatId%>) printformat, please change it]]></text>
|
|
24
|
+
</staticText>
|
|
25
|
+
</band>
|
|
26
|
+
</noData>
|
|
27
|
+
</jasperReport>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"Autoincreament": [
|
|
3
|
+
"access",
|
|
3
4
|
"create",
|
|
4
5
|
"update",
|
|
5
6
|
"delete",
|
|
@@ -7,31 +8,35 @@
|
|
|
7
8
|
"generateNextNo"
|
|
8
9
|
],
|
|
9
10
|
"Branch": [
|
|
11
|
+
"access",
|
|
10
12
|
"create",
|
|
11
13
|
"update",
|
|
12
14
|
"delete",
|
|
13
15
|
"search"
|
|
14
16
|
],
|
|
15
17
|
"Organization": [
|
|
18
|
+
"access",
|
|
16
19
|
"create",
|
|
17
20
|
"update",
|
|
18
21
|
"search",
|
|
19
22
|
"delete"
|
|
20
23
|
],
|
|
21
24
|
"Permission": [
|
|
22
|
-
"
|
|
25
|
+
"access",
|
|
23
26
|
"search",
|
|
24
27
|
"delete",
|
|
25
28
|
"update",
|
|
26
29
|
"create"
|
|
27
30
|
],
|
|
28
31
|
"Tenant": [
|
|
32
|
+
"access",
|
|
29
33
|
"create",
|
|
30
34
|
"update",
|
|
31
35
|
"delete",
|
|
32
36
|
"search"
|
|
33
37
|
],
|
|
34
38
|
"User": [
|
|
39
|
+
"access",
|
|
35
40
|
"create",
|
|
36
41
|
"update",
|
|
37
42
|
"search",
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "object",
|
|
3
|
+
"x-simpleapp-config": {
|
|
4
|
+
"isolationType": "org",
|
|
5
|
+
"documentType": "branch",
|
|
6
|
+
"documentName": "branch",
|
|
7
|
+
"uniqueKey": "branchCode",
|
|
8
|
+
"uniqueKeys": [
|
|
9
|
+
[
|
|
10
|
+
"branchId"
|
|
11
|
+
]
|
|
12
|
+
],
|
|
13
|
+
"documentTitle": "branchName",
|
|
14
|
+
"additionalAutoCompleteFields": [
|
|
15
|
+
"branchId"
|
|
16
|
+
]
|
|
17
|
+
},
|
|
18
|
+
"properties": {
|
|
19
|
+
"_id": {
|
|
20
|
+
"type": "string"
|
|
21
|
+
},
|
|
22
|
+
"created": {
|
|
23
|
+
"type": "string"
|
|
24
|
+
},
|
|
25
|
+
"updated": {
|
|
26
|
+
"type": "string"
|
|
27
|
+
},
|
|
28
|
+
"createdBy": {
|
|
29
|
+
"type": "string"
|
|
30
|
+
},
|
|
31
|
+
"updatedBy": {
|
|
32
|
+
"type": "string"
|
|
33
|
+
},
|
|
34
|
+
"tenantId": {
|
|
35
|
+
"type": "integer",
|
|
36
|
+
"default": 1,
|
|
37
|
+
"minimum": 1
|
|
38
|
+
},
|
|
39
|
+
"orgId": {
|
|
40
|
+
"type": "integer",
|
|
41
|
+
"default": 1,
|
|
42
|
+
"minimum": 1
|
|
43
|
+
},
|
|
44
|
+
"branchId": {
|
|
45
|
+
"type": "integer",
|
|
46
|
+
"default": 1,
|
|
47
|
+
"minimum": 1
|
|
48
|
+
},
|
|
49
|
+
"organization": {
|
|
50
|
+
"type": "object",
|
|
51
|
+
"x-foreignkey": "organization",
|
|
52
|
+
"properties": {
|
|
53
|
+
"_id": {
|
|
54
|
+
"type": "string"
|
|
55
|
+
},
|
|
56
|
+
"code": {
|
|
57
|
+
"type": "string"
|
|
58
|
+
},
|
|
59
|
+
"label": {
|
|
60
|
+
"type": "string"
|
|
61
|
+
},
|
|
62
|
+
"orgId": {
|
|
63
|
+
"type": "integer"
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"branchCode": {
|
|
68
|
+
"type": "string",
|
|
69
|
+
"minLength": 1
|
|
70
|
+
},
|
|
71
|
+
"branchName": {
|
|
72
|
+
"type": "string",
|
|
73
|
+
"minLength": 1
|
|
74
|
+
},
|
|
75
|
+
"street1": {
|
|
76
|
+
"type": "string"
|
|
77
|
+
},
|
|
78
|
+
"street2": {
|
|
79
|
+
"type": "string"
|
|
80
|
+
},
|
|
81
|
+
"street3": {
|
|
82
|
+
"type": "string"
|
|
83
|
+
},
|
|
84
|
+
"street4": {
|
|
85
|
+
"type": "string"
|
|
86
|
+
},
|
|
87
|
+
"city": {
|
|
88
|
+
"type": "string"
|
|
89
|
+
},
|
|
90
|
+
"region": {
|
|
91
|
+
"type": "string"
|
|
92
|
+
},
|
|
93
|
+
"postcode": {
|
|
94
|
+
"type": "string"
|
|
95
|
+
},
|
|
96
|
+
"country": {
|
|
97
|
+
"type": "string"
|
|
98
|
+
},
|
|
99
|
+
"tel": {
|
|
100
|
+
"type": "string"
|
|
101
|
+
},
|
|
102
|
+
"email": {
|
|
103
|
+
"type": "string"
|
|
104
|
+
},
|
|
105
|
+
"active": {
|
|
106
|
+
"type": "boolean",
|
|
107
|
+
"default": true
|
|
108
|
+
},
|
|
109
|
+
"description": {
|
|
110
|
+
"type": "string"
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
@@ -15,7 +15,11 @@
|
|
|
15
15
|
"jsonPath": "$.invoiceTotal",
|
|
16
16
|
"formula": "sharelibs.getTotal(data.details)"
|
|
17
17
|
}
|
|
18
|
-
]
|
|
18
|
+
],
|
|
19
|
+
"printFormats":[
|
|
20
|
+
{"formatName":"invoice A4","formatId":"invoice-a4","description":""},
|
|
21
|
+
{"formatName":"invoice A5","formatId":"invoice-a5","description":""}
|
|
22
|
+
],
|
|
19
23
|
},
|
|
20
24
|
"properties": {
|
|
21
25
|
"_id": { "type": "string" },
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "object",
|
|
3
|
+
"x-simpleapp-config": {
|
|
4
|
+
"isolationType": "tenant",
|
|
5
|
+
"documentType": "org",
|
|
6
|
+
"documentName": "organization",
|
|
7
|
+
"pageType": "crud",
|
|
8
|
+
"uniqueKey": "orgCode",
|
|
9
|
+
"uniqueKeys": [
|
|
10
|
+
[
|
|
11
|
+
"orgId"
|
|
12
|
+
]
|
|
13
|
+
],
|
|
14
|
+
"documentTitle": "orgName",
|
|
15
|
+
"additionalAutoCompleteFields": [
|
|
16
|
+
"orgId"
|
|
17
|
+
],
|
|
18
|
+
"additionalApis":[{
|
|
19
|
+
"action":"getlogo",
|
|
20
|
+
"entryPoint":"logo",
|
|
21
|
+
"requiredRole":[],
|
|
22
|
+
"method":"get",
|
|
23
|
+
"schema":"string",
|
|
24
|
+
"responseType":"String",
|
|
25
|
+
"description":"obtain avatar base64 jpg image"
|
|
26
|
+
},{
|
|
27
|
+
"action":"uploadlogo",
|
|
28
|
+
"entryPoint":"logo",
|
|
29
|
+
"requiredRole":[],
|
|
30
|
+
"method":"post",
|
|
31
|
+
"schema":"KeyValue",
|
|
32
|
+
"responseType":"String",
|
|
33
|
+
"description":"post avatar in base64 jpg image"
|
|
34
|
+
}]
|
|
35
|
+
},
|
|
36
|
+
"required": [
|
|
37
|
+
"orgId",
|
|
38
|
+
"orgCode",
|
|
39
|
+
"orgName"
|
|
40
|
+
],
|
|
41
|
+
"properties": {
|
|
42
|
+
"_id": {
|
|
43
|
+
"type": "string"
|
|
44
|
+
},
|
|
45
|
+
"created": {
|
|
46
|
+
"type": "string"
|
|
47
|
+
},
|
|
48
|
+
"updated": {
|
|
49
|
+
"type": "string"
|
|
50
|
+
},
|
|
51
|
+
"createdBy": {
|
|
52
|
+
"type": "string"
|
|
53
|
+
},
|
|
54
|
+
"updatedBy": {
|
|
55
|
+
"type": "string"
|
|
56
|
+
},
|
|
57
|
+
"tenantId": {
|
|
58
|
+
"type": "integer",
|
|
59
|
+
"default": 1,
|
|
60
|
+
"minimum": 1
|
|
61
|
+
},
|
|
62
|
+
"orgId": {
|
|
63
|
+
"type": "integer",
|
|
64
|
+
"default": 1,
|
|
65
|
+
"minimum": 1
|
|
66
|
+
},
|
|
67
|
+
"branchId": {
|
|
68
|
+
"type": "integer",
|
|
69
|
+
"default": 1,
|
|
70
|
+
"minimum": 0
|
|
71
|
+
},
|
|
72
|
+
"orgCode": {
|
|
73
|
+
"type": "string",
|
|
74
|
+
"minLength": 1
|
|
75
|
+
},
|
|
76
|
+
"orgName": {
|
|
77
|
+
"type": "string"
|
|
78
|
+
},
|
|
79
|
+
"registrationNo": {
|
|
80
|
+
"type": "string"
|
|
81
|
+
},
|
|
82
|
+
"active": {
|
|
83
|
+
"type": "boolean",
|
|
84
|
+
"default": true
|
|
85
|
+
},
|
|
86
|
+
"description": {
|
|
87
|
+
"type": "string",
|
|
88
|
+
"format": "text"
|
|
89
|
+
},
|
|
90
|
+
"timeZone": {
|
|
91
|
+
"type": "string",
|
|
92
|
+
"examples": [
|
|
93
|
+
"Asia/Kuala_Lumpur"
|
|
94
|
+
]
|
|
95
|
+
},
|
|
96
|
+
"offsetMinute": {
|
|
97
|
+
"type": "number",
|
|
98
|
+
"default": 0
|
|
99
|
+
},
|
|
100
|
+
"currency": {
|
|
101
|
+
"type": "string",
|
|
102
|
+
"minimum": 3,
|
|
103
|
+
"maximum": 3
|
|
104
|
+
},
|
|
105
|
+
"country": {
|
|
106
|
+
"type": "string",
|
|
107
|
+
"minimum": 2,
|
|
108
|
+
"maximum": 2
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
@@ -1,150 +1,71 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
// console.log('props.setting',modelValue.value,props.setting)
|
|
73
|
-
let schema: any;
|
|
74
|
-
|
|
75
|
-
const getLayoutClass = () =>
|
|
76
|
-
`simpleapp-input-container flex ${
|
|
77
|
-
props.inputType == "checkbox"
|
|
78
|
-
? " flex-row gap-4 mt-1 ml-1 "
|
|
79
|
-
: "flex flex-col "
|
|
80
|
-
}`;
|
|
81
|
-
|
|
82
|
-
const getLabelClass = () => {
|
|
83
|
-
let class1 =
|
|
84
|
-
"simpleapp-input-label text-left text-gray-500 dark:text-gray-200 ";
|
|
85
|
-
|
|
86
|
-
if (!isMobile()) class1 += "whitespace-nowrap truncate";
|
|
87
|
-
else if (props.inputType == "checkbox") class1 += " ml-1 dark:text-gray-200";
|
|
88
|
-
else if (props.inputType != "autocomplete" && modelValue.value)
|
|
89
|
-
class1 += "-mb-4 ml-1 z-10 text-xs dark:text-gray-100";
|
|
90
|
-
else if (props.inputType == "autocomplete" && modelValue.value?.label)
|
|
91
|
-
class1 += "-mb-4 ml-1 z-10 text-xs dark:text-gray-100";
|
|
92
|
-
else if (modelValue.value !== undefined)
|
|
93
|
-
class1 += "-mb-4 ml-1 z-10 text-xs dark:text-gray-100";
|
|
94
|
-
else class1 += "-mb-4 ml-1 z-10 text-xs dark:text-gray-100 ";
|
|
95
|
-
return class1;
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
const fielddesc = computed(() => {
|
|
99
|
-
return props.description ?? "";
|
|
100
|
-
});
|
|
101
|
-
|
|
102
|
-
if (props.setting.fieldsetting && props.setting.fieldsetting.type) {
|
|
103
|
-
schema = props.setting.fieldsetting;
|
|
104
|
-
// console.log("schema setting",props.setting,schema)
|
|
105
|
-
if (props?.instancepath) instancepath.value = props.instancepath;
|
|
106
|
-
else if (props.setting?.instancepath)
|
|
107
|
-
instancepath.value = props.setting.instancepath;
|
|
108
|
-
else instancepath.value = "/unknown";
|
|
109
|
-
|
|
110
|
-
const fieldnamearr = instancepath.value.split("/");
|
|
111
|
-
const fieldname = camelCaseToWords(fieldnamearr[fieldnamearr.length - 1]);
|
|
112
|
-
|
|
113
|
-
// if(props.description)fielddesc.value = props.description
|
|
114
|
-
// else if (schema?.description != 'undefined') fielddesc.value=schema.description
|
|
115
|
-
// else fielddesc.value=''
|
|
116
|
-
}
|
|
117
|
-
const fieldlabel = computed(() => {
|
|
118
|
-
if (props.label) {
|
|
119
|
-
return t(props.label);
|
|
120
|
-
} else if (schema.title) {
|
|
121
|
-
return t(schema.title);
|
|
122
|
-
} else {
|
|
123
|
-
return t(props.setting.key);
|
|
124
|
-
}
|
|
125
|
-
});
|
|
126
|
-
const errormsg = computed(() => {
|
|
127
|
-
props.setting.errors[instancepath.value];
|
|
128
|
-
});
|
|
129
|
-
const error = ref("");
|
|
130
|
-
watch(props.setting.errors, (newvalue, oldvalue) => {
|
|
131
|
-
//it is array
|
|
132
|
-
error.value = "";
|
|
133
|
-
if (newvalue[instancepath.value]) {
|
|
134
|
-
const errlist: any[] = newvalue[instancepath.value];
|
|
135
|
-
for (let i = 0; i < errlist.length; i++) {
|
|
136
|
-
error.value += errlist[i].message + ",";
|
|
137
|
-
}
|
|
138
|
-
fieldcontainerclass.value = defaultcssclass + " input-error";
|
|
139
|
-
} else {
|
|
140
|
-
error.value = "";
|
|
141
|
-
fieldcontainerclass.value = defaultcssclass;
|
|
142
|
-
}
|
|
143
|
-
// console.log("validation result",props.setting.instancepath,)
|
|
144
|
-
// error.value = newvalue[props.setting.instancepath].message
|
|
145
|
-
});
|
|
146
|
-
|
|
147
|
-
watch(()=>props.resetcount,()=>{
|
|
148
|
-
error.value=''
|
|
149
|
-
})
|
|
150
|
-
</script>
|
|
1
|
+
{
|
|
2
|
+
"home":"Home",
|
|
3
|
+
"welcome": "Welcome",
|
|
4
|
+
"create": "Create",
|
|
5
|
+
"close": "Close",
|
|
6
|
+
"update": "Update",
|
|
7
|
+
"delete": "Delete",
|
|
8
|
+
"modify": "Modify",
|
|
9
|
+
"confirm": "Confirm",
|
|
10
|
+
"void": "Void",
|
|
11
|
+
"draft": "Draft",
|
|
12
|
+
"profile": "Profile",
|
|
13
|
+
"logout": "logout",
|
|
14
|
+
"language": "Language",
|
|
15
|
+
"theme": "Theme",
|
|
16
|
+
"welcomeSimpleApp": "Welcome To SimpleApp",
|
|
17
|
+
"changeHomePageMsg": "{fullName}, it is product front page and by right you shall replace it with something else.",
|
|
18
|
+
"realman": "Real man code with simpleapp",
|
|
19
|
+
"new": "New",
|
|
20
|
+
"keyword": "Keyword",
|
|
21
|
+
"empty": "Empty",
|
|
22
|
+
"noDataFound": "No Data Found",
|
|
23
|
+
"userInfo": "User Information",
|
|
24
|
+
"currentBranchAccessRights": "Current Branch Access Rights",
|
|
25
|
+
"yourCompanyName": "Your Company Name",
|
|
26
|
+
"onlyAppearInDebugMode": "Only Appear In Debug Mode",
|
|
27
|
+
"pickDocument": "Pick Document",
|
|
28
|
+
"sample": "Sample",
|
|
29
|
+
"createYourContentHere": "Create your content here",
|
|
30
|
+
"setting": "Setting",
|
|
31
|
+
"mytasks": "My Tasks",
|
|
32
|
+
"suspend": "Suspend",
|
|
33
|
+
"submit": "Submit",
|
|
34
|
+
"decision": "Decision",
|
|
35
|
+
"simpleApproveMessage": "Approve or reject",
|
|
36
|
+
"suspendcustomer": "Suspend Customer",
|
|
37
|
+
"formKeyNotFound": "Formkey not found \"{formKey}\"",
|
|
38
|
+
"selectAll": "Select All",
|
|
39
|
+
"branches":"Branches",
|
|
40
|
+
"accessRights": "Access Rights",
|
|
41
|
+
"fullName":"Full Name",
|
|
42
|
+
"type": "Type",
|
|
43
|
+
"save": "Save",
|
|
44
|
+
"general": "General",
|
|
45
|
+
"login":"Login",
|
|
46
|
+
"sessionExpire": "Session Expire",
|
|
47
|
+
"reloginMessage": "Session Expire, relogin" ,
|
|
48
|
+
"backToHome":"Back To Home",
|
|
49
|
+
"undefined": "Undefined",
|
|
50
|
+
"no":"No",
|
|
51
|
+
"edit":"Edit",
|
|
52
|
+
"select":"Select",
|
|
53
|
+
"backendServerDownMessage":"Seems there is some connectivity issue, please try again later",
|
|
54
|
+
"invalidXorg":"Invalid XOrg ",
|
|
55
|
+
"userNotExistInTenant":"This tenant is not accessible" ,
|
|
56
|
+
"light":"Light",
|
|
57
|
+
"dark":"Dark",
|
|
58
|
+
"redirectToLoginPage":"Redirect To Login Page",
|
|
59
|
+
"cancel":"Cancel",
|
|
60
|
+
"deleteRecord":"Delete Record",
|
|
61
|
+
"deleteThisRecord?":"Delete this Record?",
|
|
62
|
+
"ok":"OK",
|
|
63
|
+
"null":"Null",
|
|
64
|
+
"switchDatabase":"Switch Database",
|
|
65
|
+
"pickYourDatabase" : "Pick Your Database",
|
|
66
|
+
"createNewCompany":"Create New Company",
|
|
67
|
+
"printFormats":"Print Formats",
|
|
68
|
+
"print":"Print",
|
|
69
|
+
"printPreview": "Print Preview",
|
|
70
|
+
"messages":"Messages"
|
|
71
|
+
}
|