@simitgroup/simpleapp-generator 1.1.0 → 1.1.2
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/framework.js +2 -2
- package/dist/framework.js.map +1 -1
- package/dist/generate.d.ts.map +1 -1
- package/dist/generate.js +15 -44
- package/dist/generate.js.map +1 -1
- package/dist/processors/jsonschemabuilder.js +9 -0
- package/dist/processors/jsonschemabuilder.js.map +1 -1
- package/dist/storage.d.ts +1 -0
- package/dist/storage.d.ts.map +1 -1
- package/dist/storage.js +2 -1
- package/dist/storage.js.map +1 -1
- package/package.json +1 -1
- package/src/framework.ts +2 -2
- package/src/generate.ts +22 -49
- package/src/processors/jsonschemabuilder.ts +12 -2
- package/src/storage.ts +2 -1
- package/templates/basic/nuxt/pages.landing.vue.eta +20 -27
- package/templates/basic/nuxt/pages.new.vue.eta +8 -7
- package/templates/basic/nuxt/pages.viewer.vue.eta +13 -0
- package/templates/nest/src/simpleapp/services/docno.service.ts.eta +1 -1
- package/templates/nuxt/app.vue.eta +5 -1
- package/templates/nuxt/assets/css/style.css._eta +33 -15
- package/templates/nuxt/assets/primevue/passthrough.ts._eta +14 -7
- package/templates/nuxt/components/debug/DebugDocumentData.vue.eta +23 -22
- package/templates/nuxt/components/docPage/DocPageList.vue.eta +112 -0
- package/templates/nuxt/components/event/EventDocumentViewer.vue.eta +69 -0
- package/templates/nuxt/components/header/HeaderBar.vue.eta +12 -10
- package/templates/nuxt/components/header/HeaderBreadcrumb.vue.eta +76 -0
- package/templates/nuxt/components/header/button/HeaderButtonMenuPicker.vue.eta +5 -7
- package/templates/nuxt/components/header/button/HeaderButtonProfile.vue.eta +39 -8
- package/templates/nuxt/components/renderer/RendererForeignKey.vue.eta +22 -3
- package/templates/nuxt/components/simpleApp/SimpleAppAutocomplete.vue.eta +82 -0
- package/templates/nuxt/components/simpleApp/SimpleAppDocumentNo.vue.eta +8 -8
- package/templates/nuxt/components/simpleApp/SimpleAppFieldContainer.vue.eta +21 -7
- package/templates/nuxt/components/simpleApp/SimpleAppInput.vue.eta +24 -63
- package/templates/nuxt/components/table/TableDocuments.vue.eta +12 -6
- package/templates/nuxt/components/user/UserButtonCreateTenant.vue.eta +25 -3
- package/templates/nuxt/components/user/UserProfileListItem.vue.eta +41 -41
- package/templates/nuxt/components/user/UserTenantPicker.vue.eta +26 -14
- package/templates/nuxt/composables/getDocument.generate.ts.eta +1 -1
- package/templates/nuxt/composables/getUserStore.generate.ts.eta +4 -1
- package/templates/nuxt/composables/stringHelper.generate.ts.eta +5 -1
- package/templates/nuxt/composables/themes.generate.ts.eta +1 -0
- package/templates/nuxt/i18n.config.ts.eta +5 -0
- package/templates/nuxt/lang/cn.ts._eta +9 -0
- package/templates/nuxt/lang/df.ts.eta +18 -0
- package/templates/nuxt/lang/en.ts._eta +6 -0
- package/templates/nuxt/layouts/{documentlist.vue.eta → documentlist.vue.eta.disabled} +1 -1
- package/templates/nuxt/nuxt.config.ts.eta +49 -16
- package/templates/nuxt/pages/[xorg]/docnoformat.vue.eta +11 -81
- package/templates/nuxt/pages/[xorg]/organization/[id]/branches/new.vue +1 -1
- package/templates/nuxt/pages/[xorg]/organization.vue.eta +10 -0
- package/templates/nuxt/pages/[xorg]/profile.vue.eta +3 -0
- package/templates/nuxt/pages/[xorg]/user.vue.eta +5 -0
- package/templates/nuxt/pages/index.vue._eta +19 -56
- package/templates/nuxt/pages/profile.vue.eta +12 -12
- package/templates/nuxt/plugins/10.simpleapp-event.ts.eta +7 -0
- package/templates/nuxt/plugins/20.simpleapp-userstore.ts.eta +1 -1
- package/templates/nuxt/simpleapp/generate/commons/documents.ts.eta +4 -1
- package/templates/nuxt/tailwind.config.ts._eta +18 -17
- package/templates/nuxt/types/events.ts.eta +11 -0
- package/templates/nuxt/types/others.ts.eta +4 -1
- package/templates/project/jsonschemas/category.json._eta +3 -3
- package/templates/project/jsonschemas/customer.json._eta +15 -2
- package/templates/project/jsonschemas/invoice.json._eta +5 -4
- package/templates/project/jsonschemas/product.json._eta +3 -3
- package/templates/project/sharelibs/money.ts.eta +2 -3
- package/tsconfig.tsbuildinfo +1 -1
- /package/templates/nuxt/layouts/{sidelist.vue.eta → sidelist.vue.eta.disabled} +0 -0
- /package/templates/nuxt/layouts/{sidelistcrud.vue.eta → sidelistcrud.vue.eta.disabled} +0 -0
|
@@ -1,64 +1,64 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
</div>
|
|
2
|
+
<!-- <ul role="list" class="divide-y divide-gray-100">
|
|
3
|
+
<li v-for="person in people" :key="person.email" class="flex justify-between gap-x-6 py-5"> -->
|
|
4
|
+
<div class="flex justify-between gap-x-6 py-5 cursor-pointer">
|
|
5
|
+
<div class="flex min-w-0 gap-x-4">
|
|
6
|
+
<img class="h-12 w-12 flex-none rounded-full bg-gray-50" :src="`${getAvatarLink(data.email,32)}`" alt="" />
|
|
7
|
+
<div class="min-w-0 flex-auto">
|
|
8
|
+
<p class="text-sm font-semibold leading-6 text-gray-900 dark:text-gray-200">{{ data.fullName }}</p>
|
|
9
|
+
<p class="mt-1 truncate text-xs leading-5 text-gray-500 dark:text-gray-400">{{ data.email }}</p>
|
|
11
10
|
</div>
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
<p class="text-xs leading-5 text-gray-500">Online</p>
|
|
11
|
+
</div>
|
|
12
|
+
<div class="hidden shrink-0 sm:flex sm:flex-col sm:items-end">
|
|
13
|
+
|
|
14
|
+
<div v-if="isOnline" class="mt-1 flex items-center gap-x-1.5">
|
|
15
|
+
<div class="flex-none rounded-full bg-emerald-500/20 p-1">
|
|
16
|
+
<div class="h-1.5 w-1.5 rounded-full bg-emerald-500" />
|
|
19
17
|
</div>
|
|
20
|
-
<p
|
|
21
|
-
<span v-if="datedifferent.get('years')>0">{{ datedifferent.get('years') }} year(s)</span>
|
|
22
|
-
<span v-if="datedifferent.get('months')>0">{{ datedifferent.get('months') }} month(s)</span>
|
|
23
|
-
<span v-if="datedifferent.get('days')>0">{{ datedifferent.get('days') }} day(s)</span>
|
|
24
|
-
<span v-if="datedifferent.get('hours')>0">{{ datedifferent.get('hours') }} Hour(s)</span>
|
|
25
|
-
<span v-if="datedifferent.get('minutes')>0">{{ datedifferent.get('minutes') }} min(s)</span>
|
|
26
|
-
</p>
|
|
27
|
-
<p class="text-sm text-right leading-6 text-gray-400 w-[120px] truncate ...">
|
|
28
|
-
{{ data.description }}
|
|
29
|
-
</p>
|
|
18
|
+
<p class="text-xs leading-5 text-gray-500 dark:text-gray-400">Online</p>
|
|
30
19
|
</div>
|
|
20
|
+
<p v-else class="mt-1 text-xs leading-5 text-gray-500">
|
|
21
|
+
<span v-if="datedifferent.get('years')>0">{{ datedifferent.get('years') }} year(s)</span>
|
|
22
|
+
<span v-if="datedifferent.get('months')>0">{{ datedifferent.get('months') }} month(s)</span>
|
|
23
|
+
<span v-if="datedifferent.get('days')>0">{{ datedifferent.get('days') }} day(s)</span>
|
|
24
|
+
<span v-if="datedifferent.get('hours')>0">{{ datedifferent.get('hours') }} Hour(s)</span>
|
|
25
|
+
<span v-if="datedifferent.get('minutes')>0">{{ datedifferent.get('minutes') }} min(s)</span>
|
|
26
|
+
</p>
|
|
27
|
+
<p class="text-sm text-right leading-6 text-gray-400 w-[120px] truncate ...">
|
|
28
|
+
{{ data.description }}
|
|
29
|
+
</p>
|
|
31
30
|
</div>
|
|
32
|
-
|
|
31
|
+
</div>
|
|
32
|
+
|
|
33
33
|
</template>
|
|
34
34
|
|
|
35
35
|
<script setup lang="ts">
|
|
36
36
|
import {computed} from 'vue'
|
|
37
37
|
import moment from 'moment'
|
|
38
38
|
const props = defineProps<{
|
|
39
|
-
|
|
39
|
+
data:any
|
|
40
40
|
}>()
|
|
41
41
|
|
|
42
42
|
|
|
43
43
|
|
|
44
44
|
const datedifferent = computed(()=>{
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
const data = moment.duration(differentTime.value)
|
|
46
|
+
return data
|
|
47
47
|
})
|
|
48
48
|
const differentTime = computed(()=>{
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
49
|
+
const lasttime = new Date(props.data.lastActivity).getTime()
|
|
50
|
+
const current = new Date().getTime()
|
|
51
|
+
const result = current - lasttime
|
|
52
|
+
return result
|
|
53
53
|
})
|
|
54
54
|
const isOnline = computed(()=>{
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
55
|
+
if(props.data.lastActivity) {
|
|
56
|
+
const diffminutes = differentTime.value/ 1000/60
|
|
57
|
+
return diffminutes < 1
|
|
58
|
+
}else{
|
|
59
|
+
return false
|
|
60
|
+
}
|
|
61
|
+
|
|
62
62
|
})
|
|
63
63
|
|
|
64
64
|
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<div v-if="alltenants" v-for="tenant in alltenants">
|
|
3
|
+
<card :pt="{ header:{class:'text-xl text-gray-600'}}">
|
|
4
|
+
|
|
3
5
|
<template #header>
|
|
4
|
-
|
|
6
|
+
{{tenant.tenantName }}
|
|
5
7
|
</template>
|
|
6
8
|
<template #content>
|
|
7
9
|
|
|
8
10
|
<ul >
|
|
9
|
-
<li v-for="o in
|
|
10
|
-
<h1>{{ o.orgName }}</h1>
|
|
11
|
+
<li v-for="o in getOrglist(tenant)">
|
|
12
|
+
<h1 class="subtitle-text">{{ o.orgName }}</h1>
|
|
11
13
|
<ul role="list" class="divide-y divide-gray-100 rounded-md border border-gray-200">
|
|
12
|
-
<li v-for="b in
|
|
13
|
-
<NuxtLink :href="`/${b.xOrg }`" v-if="o.orgId==b.orgId" :external="true"
|
|
14
|
+
<li v-for="b in getBranchlist(tenant)" class="w-full items-center justify-between py-4 pl-4 pr-4 text-sm route-link-list">
|
|
15
|
+
<NuxtLink :href="`/${b.xOrg }`" v-if="o.orgId==b.orgId" :external="true" >
|
|
14
16
|
<div class="flex w-full flex-1 items-center ">
|
|
15
17
|
<!-- <i class="pi pi-sitemap"></i> -->
|
|
16
18
|
<p class="flex-1 flex-shrink-0 font-bold text-primary-600 ">
|
|
@@ -53,23 +55,33 @@
|
|
|
53
55
|
</ul> -->
|
|
54
56
|
</template>
|
|
55
57
|
</card>
|
|
58
|
+
</div>
|
|
56
59
|
</template>
|
|
57
60
|
|
|
58
61
|
<script setup lang="ts">
|
|
59
62
|
import _ from 'lodash'
|
|
60
|
-
const
|
|
61
|
-
|
|
62
|
-
}>()
|
|
63
|
-
const branchlist = computed(()=>props.tenant.permissions)
|
|
63
|
+
const profileapi = getAllApi().PROFILEApi;
|
|
64
|
+
const alltenants = ref()
|
|
64
65
|
|
|
65
66
|
|
|
66
|
-
const orglist = computed(()=>_.uniqBy(branchlist.value,'orgId')
|
|
67
|
-
.map((item:any)=>({ orgId:item.orgId,orgCode:item.orgCode,orgName:item.orgName}) ) )
|
|
68
67
|
|
|
69
68
|
|
|
69
|
+
const loadAllTenants = async () =>{
|
|
70
|
+
const api = new profileapi(undefined,useRuntimeConfig().public.API_URL,)
|
|
71
|
+
alltenants.value = (await api.getAllTenants()).data
|
|
72
|
+
}
|
|
70
73
|
|
|
71
|
-
|
|
74
|
+
// const props = defineProps<{
|
|
75
|
+
// tenant:any
|
|
76
|
+
// }>()
|
|
77
|
+
const getBranchlist = (tenant:any)=>tenant.permissions
|
|
72
78
|
|
|
73
|
-
})
|
|
74
79
|
|
|
80
|
+
const getOrglist = (tenant:any) => _.uniqBy(getBranchlist(tenant),'orgId')
|
|
81
|
+
.map((item:any)=>({ orgId:item.orgId,orgCode:item.orgCode,orgName:item.orgName}) )
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
onNuxtReady(()=>{
|
|
85
|
+
loadAllTenants()
|
|
86
|
+
})
|
|
75
87
|
</script>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import {getAllDocuments} from '~/simpleapp/generate/commons/documents'
|
|
2
2
|
export const getDocument = (docname:string) =>{
|
|
3
|
-
return getAllDocuments().find((item)=>item.docName==docname)
|
|
3
|
+
return getAllDocuments().find((item)=>item.docName==docname) //?.docClass
|
|
4
4
|
}
|
|
@@ -24,4 +24,7 @@ export const getPageBaseUrl = (resourcename:string) =>{
|
|
|
24
24
|
*/
|
|
25
25
|
export const canPerform = (resource:string,action:string):boolean =>{
|
|
26
26
|
return getUserStore().canPerform(resource,action)
|
|
27
|
-
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export const getProfileEmail = () => getUserProfile().email
|
|
30
|
+
export const getProfileFullName = () => getUserProfile().fullName
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import plugin from 'primevue/config';
|
|
1
2
|
import {Md5} from 'ts-md5'
|
|
3
|
+
|
|
2
4
|
export const camelCaseToWords = (s: string) =>{
|
|
3
5
|
const result = s.replace(/([A-Z])/g, ' $1');
|
|
4
6
|
return result.charAt(0).toUpperCase() + result.slice(1);
|
|
@@ -13,4 +15,6 @@ export const getAvatarLink = (email:string, size:number):string=>{
|
|
|
13
15
|
}
|
|
14
16
|
|
|
15
17
|
export const toLocalDate = (dateiso8601:string)=> new Date(String(dateiso8601)).toLocaleDateString()
|
|
16
|
-
export const t = (txt:string):string=>
|
|
18
|
+
export const t = (txt:string,options?:any):string => useNuxtApp().$i18n.t(txt,options)
|
|
19
|
+
|
|
20
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const getAvatarColor = computed(()=>useColorMode().preference == 'dark' ? '#ffffff' : '#000000')
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
welcome: 'Welcome',
|
|
3
|
+
create: 'Create',
|
|
4
|
+
profile: 'Profile',
|
|
5
|
+
logout: 'logout',
|
|
6
|
+
language: 'Language',
|
|
7
|
+
theme: 'Theme',
|
|
8
|
+
welcomeSimpleApp: 'Welcome To SimpleApp',
|
|
9
|
+
changeHomePageMsg: '{fullName}, it is product front page and by right you shall replace it with something else.',
|
|
10
|
+
realman:'Real man code with simpleapp',
|
|
11
|
+
|
|
12
|
+
//auto generate from schema
|
|
13
|
+
<% for(let i=0; i< it.allfields.length; i++){ %>
|
|
14
|
+
<% let f = it.allfields[i] %>
|
|
15
|
+
<%=f%> : '<%= camelCaseToWords(f) %>',
|
|
16
|
+
<%}%>
|
|
17
|
+
|
|
18
|
+
}
|
|
@@ -149,7 +149,7 @@ watch(()=> useRoute().meta ,(newvalue,oldvalue)=>{
|
|
|
149
149
|
|
|
150
150
|
<HeaderBar />
|
|
151
151
|
<UserInvitation/>
|
|
152
|
-
<TableDocuments :value="recordlist" :columns="tablecolumns" :title="
|
|
152
|
+
<TableDocuments :value="recordlist" :columns="tablecolumns" :title="t(useRoute().meta.name as string)">
|
|
153
153
|
<template #toolbar>
|
|
154
154
|
<div class="w-full text-left">
|
|
155
155
|
<slot>
|
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
import path from 'path'
|
|
8
8
|
export default defineNuxtConfig({
|
|
9
9
|
// colorMode: {} ,
|
|
10
|
-
runtimeConfig:{
|
|
10
|
+
runtimeConfig:{
|
|
11
11
|
public:{
|
|
12
12
|
APP_URL: process.env.APP_URL,
|
|
13
13
|
API_URL: process.env.API_URL,
|
|
14
|
-
DEBUGDATA: process.env.DEBUGDATA,
|
|
14
|
+
DEBUGDATA: process.env.DEBUGDATA,
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
17
|
vite: {
|
|
@@ -26,14 +26,51 @@ tailwindcss: {
|
|
|
26
26
|
// Options
|
|
27
27
|
},
|
|
28
28
|
modules: [
|
|
29
|
+
// "@hebilicious/authjs-nuxt",
|
|
30
|
+
'@nuxtjs/i18n',
|
|
29
31
|
'@sidebase/nuxt-auth',
|
|
30
32
|
'nuxt-primevue',
|
|
31
33
|
// "nuxt-security", //temporary avoid nuxt-security cause cors
|
|
32
34
|
'@vueuse/nuxt',
|
|
33
35
|
'@nuxt/ui',
|
|
34
36
|
'@nuxtjs/tailwindcss',
|
|
35
|
-
'@pinia/nuxt'
|
|
37
|
+
['@pinia/nuxt',{
|
|
38
|
+
autoImports: [
|
|
39
|
+
// automatically imports `defineStore`
|
|
40
|
+
'defineStore', // import { defineStore } from 'pinia'
|
|
41
|
+
['defineStore', 'definePiniaStore'], // import { defineStore as definePiniaStore } from 'pinia'
|
|
42
|
+
],
|
|
43
|
+
}],
|
|
44
|
+
'@nuxtjs/color-mode',
|
|
45
|
+
|
|
46
|
+
|
|
36
47
|
],
|
|
48
|
+
i18n: {
|
|
49
|
+
lazy: true,
|
|
50
|
+
langDir: "lang/",
|
|
51
|
+
strategy: "no_prefix",
|
|
52
|
+
locales: [
|
|
53
|
+
{
|
|
54
|
+
code: "df",
|
|
55
|
+
iso: "df",
|
|
56
|
+
name: "Default",
|
|
57
|
+
file: "df.ts",
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
code: "en",
|
|
61
|
+
iso: "en",
|
|
62
|
+
name: "English",
|
|
63
|
+
file: "en.ts",
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
code: "cn",
|
|
67
|
+
iso: "cn",
|
|
68
|
+
name: "Chinese",
|
|
69
|
+
file: "cn.ts",
|
|
70
|
+
},
|
|
71
|
+
],
|
|
72
|
+
defaultLocale: "df",
|
|
73
|
+
},
|
|
37
74
|
primevue: {
|
|
38
75
|
options: {
|
|
39
76
|
unstyled: true,
|
|
@@ -52,13 +89,9 @@ tailwindcss: {
|
|
|
52
89
|
|
|
53
90
|
|
|
54
91
|
},
|
|
55
|
-
pinia: {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
'defineStore', // import { defineStore } from 'pinia'
|
|
59
|
-
['defineStore', 'definePiniaStore'], // import { defineStore as definePiniaStore } from 'pinia'
|
|
60
|
-
],
|
|
61
|
-
},
|
|
92
|
+
// pinia: {
|
|
93
|
+
|
|
94
|
+
// },
|
|
62
95
|
auth: {
|
|
63
96
|
globalAppMiddleware: true
|
|
64
97
|
},
|
|
@@ -81,12 +114,12 @@ tailwindcss: {
|
|
|
81
114
|
// },
|
|
82
115
|
//csrf: true, // been force to off csrf cash it crash with nuxt-auth
|
|
83
116
|
// },
|
|
84
|
-
ssr: false,
|
|
85
|
-
content: [
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
],
|
|
117
|
+
// ssr: false,
|
|
118
|
+
// content: [
|
|
119
|
+
// "./index.html",
|
|
120
|
+
// "./src/**/*.{vue,js,ts,jsx,tsx}",
|
|
121
|
+
// "./node_modules/primevue/**/*.{vue,js,ts,jsx,tsx}"
|
|
122
|
+
// ],
|
|
90
123
|
css: [
|
|
91
124
|
'primeicons/primeicons.css',
|
|
92
125
|
path.resolve(__dirname,'./assets/css/style.css')
|
|
@@ -1,24 +1,19 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="grid grid-cols-5 p-4">
|
|
3
|
-
<ListView
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
<ListView
|
|
4
|
+
:list="getAllDocFormats()"
|
|
5
|
+
idField="docType"
|
|
6
|
+
titleField="docName"
|
|
6
7
|
subTitleField="docType"
|
|
7
8
|
:withFilter="true"
|
|
8
|
-
:url="getDocumentUrl('docnoformat')"
|
|
9
|
+
:url="getDocumentUrl('docnoformat')"
|
|
10
|
+
></ListView>
|
|
9
11
|
<div class="col-span-4">
|
|
10
12
|
<NuxtPage></NuxtPage>
|
|
11
13
|
</div>
|
|
12
14
|
</div>
|
|
13
|
-
|
|
14
15
|
</template>
|
|
15
|
-
<script setup lang="ts">
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
</script>
|
|
20
|
-
|
|
21
|
-
<!-- <script setup lang="ts">
|
|
16
|
+
<script setup lang="ts">
|
|
22
17
|
/**
|
|
23
18
|
* This file was automatically generated by simpleapp everytime regenerate code.
|
|
24
19
|
* delete file "delete-me-for-avoid-override" if you want to modify this file and
|
|
@@ -27,74 +22,9 @@
|
|
|
27
22
|
* author: Ks Tan
|
|
28
23
|
*/
|
|
29
24
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
const data = doc.getReactiveData();
|
|
34
|
-
const visible = ref(false);
|
|
35
|
-
|
|
36
|
-
definePageMeta({
|
|
37
|
-
name: "Docnoformat",
|
|
38
|
-
layout: "documentlist",
|
|
39
|
-
documentName: "docnoformat",
|
|
40
|
-
columns: [
|
|
41
|
-
{
|
|
42
|
-
title: t("branch"),
|
|
43
|
-
field: "branch",
|
|
44
|
-
rendererName: "RendererForeignKey",
|
|
45
|
-
rendererSetting: { collection: "branch" },
|
|
46
|
-
},
|
|
47
|
-
"docNoFormatNo",
|
|
48
|
-
"docNoFormatName",
|
|
49
|
-
"docNoType",
|
|
50
|
-
"docNoPattern",
|
|
51
|
-
"nextNumber",
|
|
52
|
-
] as CellSetting[],
|
|
53
|
-
sorts: [["docNoFormatNo", "asc"]],
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
const newData = () => {
|
|
57
|
-
doc.setNew();
|
|
58
|
-
goTo(doc.getDocName(), "new");
|
|
59
|
-
visible.value = true;
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
const exitRecord = () => {
|
|
63
|
-
goTo(doc.getDocName());
|
|
64
|
-
console.log("exitRecord");
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
watch(
|
|
68
|
-
() => useRoute().fullPath,
|
|
69
|
-
(newvalue, oldvalue) => {
|
|
70
|
-
visible.value = useRoute().params.id ? true : false;
|
|
71
|
-
},
|
|
72
|
-
);
|
|
73
|
-
|
|
74
|
-
onNuxtReady(() => {
|
|
75
|
-
visible.value = useRoute().params.id ? true : false;
|
|
25
|
+
definePageMeta({
|
|
26
|
+
name: "docnoformat",
|
|
27
|
+
title: "docnoformat",
|
|
76
28
|
});
|
|
77
29
|
</script>
|
|
78
|
-
|
|
79
|
-
<div>
|
|
80
|
-
<Button
|
|
81
|
-
class="bg-primary-600 hover:bg-primary-400 text-white"
|
|
82
|
-
v-if="canPerform(String(useRoute().meta.name), 'create')"
|
|
83
|
-
@click="newData"
|
|
84
|
-
>New</Button
|
|
85
|
-
>
|
|
86
|
-
<Dialog
|
|
87
|
-
v-model:visible="visible"
|
|
88
|
-
:pt="{
|
|
89
|
-
root: { class: 'w-full h-full bg-white' },
|
|
90
|
-
headertitle: { class: 'm-2 ml-6 text-2xl font-bold' },
|
|
91
|
-
}"
|
|
92
|
-
modal
|
|
93
|
-
:header="t(doc.getDocName())"
|
|
94
|
-
:autoZIndex="false"
|
|
95
|
-
@update:visible="exitRecord"
|
|
96
|
-
>
|
|
97
|
-
<NuxtPage />
|
|
98
|
-
</Dialog>
|
|
99
|
-
</div>
|
|
100
|
-
</template> -->
|
|
30
|
+
|
|
@@ -44,6 +44,13 @@ const refresh = () => {
|
|
|
44
44
|
$event("RefreshDocumentList", { documentName: doc.getDocName() });
|
|
45
45
|
};
|
|
46
46
|
|
|
47
|
+
|
|
48
|
+
definePageMeta({
|
|
49
|
+
name: 'organization',
|
|
50
|
+
title: 'organization'
|
|
51
|
+
})
|
|
52
|
+
|
|
53
|
+
|
|
47
54
|
//branch record update then reload
|
|
48
55
|
$listen("RefreshDocumentList", (data) => {
|
|
49
56
|
console.log("refresh from branch", data.documentName, "==", doc.getDocName());
|
|
@@ -56,6 +63,9 @@ if (id) {
|
|
|
56
63
|
fetchRecord(id.value);
|
|
57
64
|
}
|
|
58
65
|
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
59
69
|
getCurrentOrg();
|
|
60
70
|
</script>
|
|
61
71
|
<template>
|
|
@@ -1,67 +1,30 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
2
|
/**
|
|
3
|
-
* This file was automatically generated by simpleapp generator
|
|
4
|
-
*
|
|
5
|
-
* last change 2023-
|
|
3
|
+
* This file was automatically generated by simpleapp generator
|
|
4
|
+
* CHANGE IT!!
|
|
5
|
+
* last change 2023-11-12
|
|
6
6
|
* Author: Ks Tan
|
|
7
7
|
*/
|
|
8
|
-
|
|
9
|
-
import _ from "lodash";
|
|
10
|
-
// import InputText from "primevue/inputtext";
|
|
11
|
-
// import Dialog from "primevue/dialog";
|
|
12
|
-
import { ref, Ref } from "vue";
|
|
13
|
-
// import { EventType } from "~/types";
|
|
14
|
-
// import { TenantDoc } from "../simpleapp/docs/TenantDoc";
|
|
15
|
-
// import ProgressSpinner from "primevue/progressspinner";
|
|
16
|
-
// import Panel from "primevue/panel";
|
|
17
|
-
// import Card from "primevue/card";
|
|
18
|
-
// import { AxiosResponse } from "axios";
|
|
19
|
-
import {computed} from 'vue'
|
|
20
|
-
const { $event, $listen, $userstore } = useNuxtApp();
|
|
21
|
-
const branches = ref([]);
|
|
22
|
-
const userprofile = ref();
|
|
23
|
-
const orgList = ref();
|
|
24
|
-
const alltenants = ref()
|
|
25
|
-
|
|
26
|
-
const loadTenants = async () => {
|
|
27
|
-
const profileapi = getApi().PROFILEApi;
|
|
28
|
-
const axiosreturn = await new profileapi(
|
|
29
|
-
undefined,
|
|
30
|
-
useRuntimeConfig().public.API_URL,
|
|
31
|
-
).getAllTenants();
|
|
32
|
-
alltenants.value = axiosreturn.data
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
// $listen("InvitationAccepted", async () => {
|
|
36
|
-
// loadProfile();
|
|
37
|
-
// });
|
|
38
|
-
|
|
39
|
-
onMounted(() => {
|
|
40
|
-
loadTenants();
|
|
41
|
-
|
|
42
|
-
// const profileapi = getApi().PROFILEApi;
|
|
43
|
-
});
|
|
44
8
|
</script>
|
|
45
9
|
<template>
|
|
46
|
-
<div
|
|
47
|
-
class="
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
10
|
+
<div class="grid place-content-center">
|
|
11
|
+
<ClientOnly><div class="flex flex-row">
|
|
12
|
+
<div class="block">
|
|
13
|
+
<h1
|
|
14
|
+
class="font-bold text-3xl md:text-5xl text-gray-800 dark:text-white"
|
|
15
|
+
>
|
|
16
|
+
{{ t("welcomeSimpleApp") }}
|
|
53
17
|
</h1>
|
|
54
|
-
<p class="
|
|
55
|
-
|
|
56
|
-
something else.
|
|
18
|
+
<p class="text-gray-600 dark:text-gray-200">
|
|
19
|
+
{{ t("changeHomePageMsg",{fullName:getProfileFullName()}) }}
|
|
57
20
|
</p>
|
|
58
|
-
<div class="
|
|
21
|
+
<div class="">
|
|
59
22
|
<UserButtonCreateTenant></UserButtonCreateTenant>
|
|
60
23
|
</div>
|
|
61
24
|
</div>
|
|
62
|
-
<div class="
|
|
25
|
+
<div class="hidden lg:block">
|
|
63
26
|
<svg
|
|
64
|
-
fill="
|
|
27
|
+
:fill="getAvatarColor"
|
|
65
28
|
viewBox="0 0 512 512"
|
|
66
29
|
xmlns="http://www.w3.org/2000/svg"
|
|
67
30
|
>
|
|
@@ -91,11 +54,11 @@ onMounted(() => {
|
|
|
91
54
|
</g>
|
|
92
55
|
</g>
|
|
93
56
|
</svg>
|
|
94
|
-
<p class="text-gray-500">
|
|
57
|
+
<p class="text-gray-500 dark:text-gray-200">{{ t('realman') }}</p>
|
|
95
58
|
</div>
|
|
96
|
-
</div>
|
|
97
|
-
<div
|
|
98
|
-
<UserTenantPicker
|
|
59
|
+
</div></ClientOnly>
|
|
60
|
+
<div class="grid grid-cols-1 lg:grid-cols-2 2xl:grid-cols-3">
|
|
61
|
+
<UserTenantPicker></UserTenantPicker>
|
|
99
62
|
</div>
|
|
100
63
|
</div>
|
|
101
64
|
</template>
|