@simitgroup/simpleapp-generator 1.5.1-alpha → 1.6.0-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 +3 -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 +3 -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/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/pages.form.vue.eta +1 -1
- package/templates/basic/nuxt/pages.mobile.landing.vue.eta +4 -61
- 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/roles/roles.enum.ts.eta +7 -0
- package/templates/nest/src/simpleapp/generate/commons/user.context.ts.eta +9 -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 +29 -9
- 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 +10 -3
- 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/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 +6 -2
- package/templates/nest/src/simpleapp/types/index.ts._eta +5 -0
- package/templates/nuxt/components/button/ButtonAction.vue._eta +11 -5
- 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/simpleApp/SimpleAppAutocomplete.vue.eta +1 -1
- package/templates/nuxt/components/simpleApp/SimpleAppFormToolBar.vue._eta +93 -7
- package/templates/nuxt/components/text/TextBold.vue._eta +13 -0
- package/templates/nuxt/composables/getUserStore.generate.ts.eta +11 -2
- 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 +7 -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 +70 -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
|
@@ -1,72 +1,61 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="h-screen flex flex-col">
|
|
2
|
+
<div class="h-screen flex flex-col ">
|
|
3
3
|
|
|
4
4
|
<div class="flex flex-col grow overflow-y-auto">
|
|
5
5
|
<div class="flex flex-col mb-14 w-full">
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
<ListMessages v-model="messagesVisible"/>
|
|
7
|
+
<UserInvitation/>
|
|
8
|
+
<slot></slot>
|
|
9
|
+
</div>
|
|
10
10
|
</div>
|
|
11
11
|
<!-- fixed -->
|
|
12
12
|
<div v-if="getCurrentXorg()" class="flex h-16 border-t-2 dark:border-t-gray-700 text-3xl flex-row left-0 w-full justify justify-between bottom-0 fixed z-50 bg-white dark:bg-slate-900 opacity opacity-95 " >
|
|
13
|
-
<div v-
|
|
14
|
-
<NuxtLink
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
>
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
13
|
+
<div v-if="getUserProfile()?.currentGroup=='teacher'" class="flex flex-row">
|
|
14
|
+
<NuxtLink :class="`pi pi-home p-4 cursor-pointer inline-block align-middle`" :to="getDocumentUrl('')" />
|
|
15
|
+
<ButtonText class="cursor-pointer inline-block align-middle" @click="openMessages">
|
|
16
|
+
<i class="pi pi-envelope p-1" ></i>
|
|
17
|
+
<Badge v-if="systemMsgQty" class="-ml-4" :value="systemMsgQty"></Badge>
|
|
18
|
+
</ButtonText>
|
|
19
|
+
<ButtonText :class="`pi pi-user p-4 cursor-pointer inline-block align-middle`" @click="openProfile"/>
|
|
20
|
+
</div>
|
|
21
|
+
<div v-else class="flex flex-row">
|
|
22
|
+
<NuxtLink :class="`pi pi-home p-4 cursor-pointer inline-block align-middle`" :to="getDocumentUrl('')" />
|
|
23
|
+
|
|
24
|
+
<ButtonText :class="`pi pi-bars p-4 cursor-pointer inline-block align-middle`" @click="openMenu"/>
|
|
25
|
+
<ButtonText class="cursor-pointer inline-block align-middle" @click="openMessages">
|
|
26
|
+
<i class="pi pi-envelope p-1" ></i>
|
|
27
|
+
<Badge v-if="systemMsgQty" class="-ml-4" :value="systemMsgQty"></Badge>
|
|
28
|
+
</ButtonText>
|
|
29
|
+
<ButtonText :class="`pi pi-user p-4 cursor-pointer inline-block align-middle`" @click="openProfile"/>
|
|
22
30
|
</div>
|
|
23
31
|
|
|
24
32
|
<HeaderButtonMenuPicker v-model="showMenu"></HeaderButtonMenuPicker>
|
|
25
33
|
<HeaderButtonProfile v-model="showProfile"/>
|
|
26
34
|
|
|
27
35
|
</div>
|
|
28
|
-
|
|
36
|
+
|
|
37
|
+
|
|
29
38
|
<!-- <HeaderBar class="border flex flex-row h-10 fixed left-0 w-full justify justify-between top-0 z-50 bg-white dark:bg-gray-800"/> -->
|
|
30
39
|
|
|
31
40
|
</div>
|
|
41
|
+
|
|
32
42
|
</template>
|
|
33
43
|
<script setup lang="ts">
|
|
34
44
|
/**
|
|
35
45
|
* This file was automatically generated by simpleapp generator during initialization. It is changable.
|
|
36
|
-
* last change 2024-
|
|
46
|
+
* last change 2024-04-10
|
|
37
47
|
* author: Ks Tan
|
|
38
48
|
*/
|
|
39
49
|
const showMenu =ref(false)
|
|
40
50
|
const showProfile =ref(false)
|
|
41
|
-
|
|
51
|
+
const messagesVisible = ref(false)
|
|
42
52
|
const openMenu = ()=>showMenu.value=true
|
|
43
53
|
const openProfile = ()=>showProfile.value=true
|
|
54
|
+
const openMessages=() => messagesVisible.value = true
|
|
55
|
+
|
|
56
|
+
|
|
44
57
|
type MenuType = {iconClass:string,path?:string,command?:Function}
|
|
45
|
-
type AllMenus = {[key:string]:MenuType[]}
|
|
46
|
-
const menus=ref<MenuType[]>([])
|
|
47
|
-
// {iconClass:'pi-bars',path:'managestudents/profile'},
|
|
48
|
-
const allmenus:AllMenus = {
|
|
49
|
-
admin:[
|
|
50
|
-
{iconClass:'pi-home dark:text-white',path:''},
|
|
51
|
-
//{iconClass:'pi-users dark:text-white',path:'managestudents'},
|
|
52
|
-
//{iconClass:'pi-calendar dark:text-white',path:`manageclasses`},
|
|
53
|
-
{iconClass:'pi-bars dark:text-white',command: openMenu},
|
|
54
|
-
{iconClass:'pi-user dark:text-white',command: openProfile},
|
|
55
|
-
],
|
|
56
|
-
teacher: [{iconClass:'pi-home dark:text-white',path:''},
|
|
57
|
-
{iconClass:'pi-user dark:text-white',command: openProfile},],
|
|
58
|
-
unknown:[]
|
|
59
|
-
}
|
|
60
58
|
|
|
61
|
-
const readGroup=()=>{
|
|
62
|
-
if(getUserProfile()?.currentGroup) {
|
|
63
|
-
menus.value = allmenus[getUserProfile()?.currentGroup ?? 'unknown']
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
59
|
|
|
67
|
-
onMounted(()=>{
|
|
68
|
-
readGroup()
|
|
69
|
-
useNuxtApp().$listen('pickGroup',()=>readGroup())
|
|
70
|
-
})
|
|
71
60
|
|
|
72
|
-
</script>
|
|
61
|
+
</script>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was automatically generated by simpleapp generator.
|
|
3
|
-
*
|
|
2
|
+
* This file was automatically generated by simpleapp generator.
|
|
3
|
+
* --remove-this-line-to-prevent-override--
|
|
4
4
|
* last change 2023-10-28
|
|
5
5
|
* Author: Ks Tan
|
|
6
6
|
*/
|
|
@@ -0,0 +1,449 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was automatically generated by simpleapp generator.
|
|
3
|
+
* MODIFICATION OVERRIDE BY GENERATEOR
|
|
4
|
+
* last change 2023-10-28
|
|
5
|
+
* Author: Ks Tan
|
|
6
|
+
*/
|
|
7
|
+
declare module 'vue-pdf-embed';
|
|
8
|
+
|
|
9
|
+
declare module 'vue-cal' {
|
|
10
|
+
import Vue from 'vue';
|
|
11
|
+
|
|
12
|
+
// const VueCal = Vue.extend<VueCalProps>(Vue);
|
|
13
|
+
|
|
14
|
+
export type FormattedDate = string // eg (e.g. 2020-09-18)
|
|
15
|
+
export type View = 'years' | 'year' | 'month' | 'week' | 'day';
|
|
16
|
+
export type WeekDays = 1 | 2 | 3 | 4 | 5 | 6 | 7
|
|
17
|
+
|
|
18
|
+
export interface SplitDaysAttributes {
|
|
19
|
+
id: string | number
|
|
20
|
+
class: string
|
|
21
|
+
label: string
|
|
22
|
+
hide?: boolean
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface EditableEvents {
|
|
26
|
+
title: boolean
|
|
27
|
+
drag: boolean
|
|
28
|
+
resize: boolean
|
|
29
|
+
delete: boolean
|
|
30
|
+
create: boolean
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* If no title is provided, no title will be displayed.
|
|
35
|
+
* content accepts free HTML, for instance: '<i class="v-icon material-icons">local_hospital</i>'.
|
|
36
|
+
* If no content is provided, no content will be displayed.
|
|
37
|
+
* You may need an event CSS class to handle different event types for instance. With different classes you can apply different styles to the events.
|
|
38
|
+
* E.g. backgrounds, images, borders, etc.
|
|
39
|
+
* The background attribute sets an event as a background event, which allows overlapping and disable the ability to drag & resize.
|
|
40
|
+
* When using splitDays, the split attribute accepts a number, starting from 1, corresponding to the split you want the event to appear in.
|
|
41
|
+
* Optionally, if you have set the id property in splitDays, you have to use the same id here (Integer or String).
|
|
42
|
+
* When the showAllDayEvents and time options are set to true, all the events with an attribute allDay set to true will show up in a fixed bar (week & day views).
|
|
43
|
+
*/
|
|
44
|
+
export interface Event {
|
|
45
|
+
_eid?: string
|
|
46
|
+
start: string | Date // '2018-11-19 12:00', // Required.
|
|
47
|
+
end: string | Date // '2018-11-19 14:00', // Required.
|
|
48
|
+
// Instead of formatted dates, you can also provide Javascript Date objects:
|
|
49
|
+
// start: new Date(2018, 11 - 1, 19, 12, 0),
|
|
50
|
+
// end: new Date(2018, 11 - 1, 19, 14, 0),
|
|
51
|
+
title?: string // Optional.
|
|
52
|
+
content?: string // Optional.
|
|
53
|
+
contentFull?: string // opens in a d ialog
|
|
54
|
+
class?: string // Optional - space-separated css classes.
|
|
55
|
+
background?: boolean // Optional. (Event type not CSS property)
|
|
56
|
+
split?: number | string // Optional.
|
|
57
|
+
allDay?: boolean // Optional.
|
|
58
|
+
deletable?: boolean // optional - force undeletable when events are editable.
|
|
59
|
+
resizable?: boolean // optional - force unresizable when events are editable.
|
|
60
|
+
startTimeMinutes?: number
|
|
61
|
+
endTimeMinutes?: number
|
|
62
|
+
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// export interface Event {
|
|
66
|
+
// created_at?: string | Date
|
|
67
|
+
// updated_at?: string | Date
|
|
68
|
+
// created_by_id?: number
|
|
69
|
+
// id?: number
|
|
70
|
+
// }
|
|
71
|
+
|
|
72
|
+
export type OnEventClick = (event: Event, e: MouseEvent) => void
|
|
73
|
+
|
|
74
|
+
export interface EventReadyChanged {
|
|
75
|
+
view: string
|
|
76
|
+
startDate: Date // View start - JS native Date object.
|
|
77
|
+
endDate: Date, // View end - JS native Date object.
|
|
78
|
+
firstCellDate: Date // Month view only, in case cell is out of current month - JS native Date object.
|
|
79
|
+
lastCellDate: Date // Month view only, in case cell is out of current month - JS native Date object.
|
|
80
|
+
outOfScopeEvents: Array<Event> // Month view only, all the events that are out of the current month.
|
|
81
|
+
events: Array<Event> // All the events in the current view.
|
|
82
|
+
week: number // Week number. Only returned if view is 'week'.
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export interface EventChange {
|
|
86
|
+
event: Event
|
|
87
|
+
originalEvent: Event
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export interface EventTitleChange {
|
|
91
|
+
event: Event
|
|
92
|
+
oldTitle: string
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export interface EventDurationChange extends EventChange {
|
|
96
|
+
oldDate: Date
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
export interface Events {
|
|
101
|
+
ready: EventReadyChanged
|
|
102
|
+
'view-change': EventReadyChanged
|
|
103
|
+
'cell-click': Date
|
|
104
|
+
'cell-dblclick': Date
|
|
105
|
+
'cell-contextmenu': Date & { x: number, y: number }
|
|
106
|
+
'cell-keypress-enter': Date
|
|
107
|
+
'cell-focus': Date
|
|
108
|
+
'event-focus': Event
|
|
109
|
+
'event-mouse-enter': Event
|
|
110
|
+
'event-mouse-leave': Event
|
|
111
|
+
'event-create': Event
|
|
112
|
+
'event-drag-create': Event
|
|
113
|
+
'event-delete': Event
|
|
114
|
+
'event-title-change': Event
|
|
115
|
+
'event-duration-change': EventDurationChange
|
|
116
|
+
'event-resizing': any
|
|
117
|
+
'event-drop': any
|
|
118
|
+
'event-change': EventChange
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export type EventListeners = {
|
|
122
|
+
[A in keyof Events]: (value: Events[A]) => void
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
export interface VueCalEvent extends Event {
|
|
127
|
+
daysCount: number
|
|
128
|
+
deleting: boolean
|
|
129
|
+
draggable: boolean
|
|
130
|
+
dragging: boolean
|
|
131
|
+
draggingStatic: boolean
|
|
132
|
+
endTimeMinutes: number
|
|
133
|
+
focused: boolean
|
|
134
|
+
repeat: boolean
|
|
135
|
+
resizing: boolean
|
|
136
|
+
segments: any
|
|
137
|
+
titleEditable: boolean
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
export interface VueCalView {
|
|
141
|
+
id: string
|
|
142
|
+
title: string
|
|
143
|
+
startDate: any
|
|
144
|
+
endDate: any
|
|
145
|
+
firstCellDate: any
|
|
146
|
+
lastCellDate: any
|
|
147
|
+
selectedDate: any
|
|
148
|
+
events: VueCalEvent[]
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export interface Props {
|
|
152
|
+
activeView?: View //default?: 'week'
|
|
153
|
+
/** When the all day bar is visible and Vue Cal is also scrollable horizontally (due to minCellWidth or day splits with minSplitWidth), the all-day bar must have a fixed height for this particular layout.
|
|
154
|
+
* Only if these conditions are fulfilled, the height provided through this option will be used. If none is provided the default height will be used.
|
|
155
|
+
* The height can be any valid CSS height (as a string) or an integer for an amount of pixels. */
|
|
156
|
+
allDayBarHeight?: string | number //default?: '25px'
|
|
157
|
+
cellClickHold?: boolean //default?: true
|
|
158
|
+
/** When set to true, a right click on a cell will emit the cell-contextmenu event, providing an object containing?: the date and time at cursor, the x and y position of cursor, and the full original DOM event. */
|
|
159
|
+
cellContextmenu?: boolean //default?: false
|
|
160
|
+
clickToNavigate?: boolean //default?: false
|
|
161
|
+
dblclickToNavigate?: boolean //default?: true
|
|
162
|
+
disableDatePrototypes?: boolean //default?: false
|
|
163
|
+
/** Allows you to provide an array of formatted dates (e.g. 2020-09-18) to disable. */
|
|
164
|
+
disableDays?: Array<FormattedDate> //default?: []
|
|
165
|
+
disableViews?: Array<View> //default?: []
|
|
166
|
+
dragToCreateEvent?: boolean //default?: true
|
|
167
|
+
dragToCreateThreshold?: number //default?: 15
|
|
168
|
+
/** When editableEvents is set to true, it allows?:
|
|
169
|
+
Dragging and dropping events
|
|
170
|
+
Resizing events by dragging the handle showing at the bottom of each event if time is set to true,
|
|
171
|
+
Deleting events by click and hold an event.
|
|
172
|
+
Editing events title */
|
|
173
|
+
editableEvents?: boolean | EditableEvents //default?: false
|
|
174
|
+
events?: Array<Event> //default?: [
|
|
175
|
+
eventsCountOnYearView?: boolean //default?: false
|
|
176
|
+
eventsOnMonthView?: boolean | string //default?: false
|
|
177
|
+
hideBody?: boolean //default?: false
|
|
178
|
+
/** When set to true, the title bar with navigating arrows will disappear. You can still navigate from a view to another with the view selector and clicking a cell (narrower view).*/
|
|
179
|
+
hideTitleBar?: boolean //default?: false
|
|
180
|
+
/** When set to true, the top view selector will disappear. You can still navigate from a view to another by clicking a cell (narrower view) or the view title (broader view). */
|
|
181
|
+
hideViewSelector?: boolean //default?: false
|
|
182
|
+
/** Hide particular days of the week. This option accepts an array of days (day numbers) to hide, starting at 1 for Monday, to 7 for Sunday. */
|
|
183
|
+
hideWeekdays?: Array<WeekDays> //default?: []
|
|
184
|
+
hideWeekends?: boolean //default?: false
|
|
185
|
+
locale?: string //default?: 'en'
|
|
186
|
+
maxDate?: string | Date //efault?: ''
|
|
187
|
+
/** When a number is set, in pixels, each cell of the week view (only) will have this minimum width. If it does not fit in the calendar body, the overflow will be scrollable. If minSplitWidth is also set, it will override minCellWidth.*/
|
|
188
|
+
minCellWidth?: number //default?: 0 // In pixels.
|
|
189
|
+
minDate?: string | Date //efault?: ''
|
|
190
|
+
minEventWidth?: number //default?: 0 // In percent.
|
|
191
|
+
/** This is for day splits only, and it applies to the week and day views (only).
|
|
192
|
+
When a number is set, in pixels, each split of each cell will have this minimum width.
|
|
193
|
+
If it does not fit in the calendar body, the overflow will be scrollable.
|
|
194
|
+
If minCellWidth is also set, minSplitWidth will override it on week view. */
|
|
195
|
+
minSplitWidth?: number //default?: 0 // In pixels.
|
|
196
|
+
onEventClick?: Function //default?: null
|
|
197
|
+
onEventCreate?: Function //default?: null
|
|
198
|
+
onEventDblclick?: Function //default?: null
|
|
199
|
+
overlapsPerTimeStep?: boolean //default?: false
|
|
200
|
+
resizeX?: boolean //default?: false
|
|
201
|
+
selectedDate?: string | Date //default?: ''
|
|
202
|
+
/**
|
|
203
|
+
* When the showAllDayEvents is set to true the events with an allDay attribute set to true will be displayed in a fixed top bar on the week & day views.
|
|
204
|
+
The all day events bar will only show up if the options showAllDayEvents & time are set to true.
|
|
205
|
+
time is important since without time information every event is an all-day event there is no point in separating them then.
|
|
206
|
+
* When showAllDayEvents is set to false, all the all day events (allDay attribute set to true), will show up as a normal background event.
|
|
207
|
+
* On month view, switching showAllDayEvents on and off will not have any impact since both should display the all day events.
|
|
208
|
+
* showAllDayEvents accepts a Boolean or the string 'short', to display only the event title. */
|
|
209
|
+
showAllDayEvents?: boolean | 'short' //default?: false
|
|
210
|
+
/** When set to true, the weeks numbers will show in the first column on the month view (only). You can also provide a custom renderer to the weeks numbers cells through the week-number-cell slot.*/
|
|
211
|
+
showWeekNumbers?: boolean | string //default?: false
|
|
212
|
+
/** When set to true, the days of the week headings will be truncated to 3 letters. Does not apply to the title of the day view. 2 media queries are truncating the days of the week bellow 450px,*/
|
|
213
|
+
small?: boolean //default?: false
|
|
214
|
+
/** With the snapToTime option, you can make sure the event starts and end at specific intervals of minutes.
|
|
215
|
+
E.g. ?:snap-to-time="15" will snap the event to the closest ?:00, ?:15, ?:30, ?:45 while dragging.
|
|
216
|
+
This option also applies on event resizing after the drag-creation. */
|
|
217
|
+
snapToTime?: number //default?: null
|
|
218
|
+
specialHours?: object //default?: {}
|
|
219
|
+
/** Split each day into multiple vertical splits.
|
|
220
|
+
Accepts an array of split objects with attributes.
|
|
221
|
+
Each split object can have these attributes, they are all optional?: */
|
|
222
|
+
splitDays?: Array<any> //default?: [
|
|
223
|
+
startWeekOnSunday?: boolean //default?: false
|
|
224
|
+
stickySplitLabels?: boolean //default?: false
|
|
225
|
+
time?: boolean //default?: true
|
|
226
|
+
timeCellHeight?: number //default?: 40 // In pixels.
|
|
227
|
+
/**
|
|
228
|
+
* When defined, overrides the default time format in time cells and events.
|
|
229
|
+
* Formatted time can contain any character but the following characters will be replaced?:
|
|
230
|
+
*
|
|
231
|
+
* H?: Hours no leading zero, 24-hour format
|
|
232
|
+
* HH?: Hours with leading zero, 24-hour format
|
|
233
|
+
* h?: Hours no leading zero, 12-hour format
|
|
234
|
+
* hh?: Hours with leading zero, 12-hour format
|
|
235
|
+
* m?: Minutes no leading zero
|
|
236
|
+
* mm?: Minutes with leading zero
|
|
237
|
+
* {am}?: am or pm
|
|
238
|
+
* The characters `{` and `}` are removed and used only to delimit keywords when there is no space.
|
|
239
|
+
* E.g. "h?:mm{am}".
|
|
240
|
+
*/
|
|
241
|
+
timeFormat?: string //default?: ''
|
|
242
|
+
/** If time is enabled, set the start of the timeline in minutes. By default it starts at midnight. */
|
|
243
|
+
timeFrom?: number //default?: 0 // In minutes.
|
|
244
|
+
/** If time is enabled, set the time increment in minutes. */
|
|
245
|
+
timeStep?: number //default?: 30 // In minutes.
|
|
246
|
+
/** If time is enabled, set the end of the timeline in minutes. By default it ends at 24?:00. */
|
|
247
|
+
timeTo?: number //default?: 24 * 60 // In minutes.
|
|
248
|
+
/** Adds a Today button in the title bar to quickly go to Today's date. */
|
|
249
|
+
todayButton?: boolean //default?: false
|
|
250
|
+
transitions?: boolean //default?: true
|
|
251
|
+
twelveHour?: boolean //default?: false
|
|
252
|
+
/**
|
|
253
|
+
* When set to true, the days of the week headings will be truncated to 1 letter. Does not apply to the title of the day view.
|
|
254
|
+
* In Addition, the whole calendar gets applied a smaller font size of 0.9em, and the current view title is also reduced.
|
|
255
|
+
* 2 media queries are truncating the days of the week bellow 450px,
|
|
256
|
+
*/
|
|
257
|
+
xsmall?: boolean //default?: false
|
|
258
|
+
watchRealTime?: boolean //default: false
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
export namespace slots {
|
|
262
|
+
export namespace event {
|
|
263
|
+
export interface Props {
|
|
264
|
+
view: View
|
|
265
|
+
event: VueCalEvent
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
export interface VueCal extends Props {}
|
|
272
|
+
|
|
273
|
+
export class VueCal extends Vue {
|
|
274
|
+
$on<T extends keyof Events>(event: T, callback: EventListeners[T]) {
|
|
275
|
+
return super.$on(event, callback);
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
//region: Data
|
|
279
|
+
ready: boolean; // Is vue-cal ready.
|
|
280
|
+
// Make texts reactive before a locale is loaded.
|
|
281
|
+
texts: any;
|
|
282
|
+
utils: {
|
|
283
|
+
// Remove prototypes ASAP if the user wants so.
|
|
284
|
+
date: any
|
|
285
|
+
cell: any
|
|
286
|
+
// Note: Destructuring class method loses the `this` context and Vue Cal becomes inaccessible
|
|
287
|
+
// from the event utils function. Don't do:
|
|
288
|
+
// const { eventInRange, createEventSegments } = this.utils.event
|
|
289
|
+
event: any
|
|
290
|
+
};
|
|
291
|
+
modules: { dnd: null };
|
|
292
|
+
|
|
293
|
+
minutesAtCursor(e: MouseEvent)
|
|
294
|
+
|
|
295
|
+
// At any time this object will be filled with current view, visible events and selected date.
|
|
296
|
+
view: VueCalView;
|
|
297
|
+
eventIdIncrement: number; // Internal unique id.
|
|
298
|
+
// or updated at least on each cells rerender, in order to keep Today's date accurate.
|
|
299
|
+
now: Date;
|
|
300
|
+
|
|
301
|
+
//endregion
|
|
302
|
+
// Useful when watchRealTime = true, 2 timeouts: 1 to snap to round minutes, then 1 every minute.
|
|
303
|
+
timeTickerIds: [ any, any ];
|
|
304
|
+
// An array of mutable events updated each time given external events array changes.
|
|
305
|
+
mutableEvents: any;
|
|
306
|
+
// Transition when switching view. left when going toward the past, right when going toward future.
|
|
307
|
+
transitionDirection: string;
|
|
308
|
+
|
|
309
|
+
//region: Methods
|
|
310
|
+
/**
|
|
311
|
+
* Shorthand function for external call (via $refs).
|
|
312
|
+
*/
|
|
313
|
+
previous()
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* Shorthand function for external call (via $refs).
|
|
317
|
+
*/
|
|
318
|
+
next()
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* On click on previous or next arrow, update the calendar visible date range.
|
|
322
|
+
*
|
|
323
|
+
* @param {Boolean} next
|
|
324
|
+
*/
|
|
325
|
+
previousNext(next = true)
|
|
326
|
+
|
|
327
|
+
// Preset at now date on load, but updated every minute if watchRealTime,
|
|
328
|
+
|
|
329
|
+
/**
|
|
330
|
+
* On click/dblclick of a cell go to a narrower view if available.
|
|
331
|
+
* E.g. Click on month cell takes you to week view if not hidden, otherwise on day view if not hidden.
|
|
332
|
+
*
|
|
333
|
+
* @param {String | Date} date A starting date for the view, if none, fallbacks to the selected date,
|
|
334
|
+
* If also empty fallbacks to the current view start date.
|
|
335
|
+
*/
|
|
336
|
+
switchToNarrowerView(date = null)
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* Switches to the specified view on view selector click, or programmatically form external call (via $refs).
|
|
340
|
+
* If a date is given, it will be selected and if the view does not contain it, it will go to that date.
|
|
341
|
+
*
|
|
342
|
+
* @param {String} view the view to go to. Among `years`, `year`, `month`, `week`, `day`.
|
|
343
|
+
* @param {String | Date} date A starting date for the view, if none, fallbacks to the selected date,
|
|
344
|
+
* If also empty fallbacks to the current view start date.
|
|
345
|
+
* @param {Boolean} fromViewSelector to know if the caller is the built-in view selector.
|
|
346
|
+
*/
|
|
347
|
+
switchView(view: ViewEvents, date: Date = null, fromViewSelector: boolean = false)
|
|
348
|
+
|
|
349
|
+
// The events source of truth.
|
|
350
|
+
|
|
351
|
+
/**
|
|
352
|
+
* Creates a new event in vue-cal memory (in the mutableEvents array) starting at the given date & time.
|
|
353
|
+
* Proxy method to allow call from cell click & hold or external call (via $refs).
|
|
354
|
+
* Notes: Event duration is by default 2 hours. You can override the event end through eventOptions.
|
|
355
|
+
*
|
|
356
|
+
* @param {String | Date} dateTime date & time at which the event will start.
|
|
357
|
+
* @param {Number} duration the event duration in minutes.
|
|
358
|
+
* @param {Object} eventOptions an object of options to override the event creation defaults.
|
|
359
|
+
* (can be any key allowed in an event object)
|
|
360
|
+
* @return {Object} the created event.
|
|
361
|
+
*/
|
|
362
|
+
createEvent(dateTime: string | Date, duration: number, eventOptions: Events = {})
|
|
363
|
+
|
|
364
|
+
/**
|
|
365
|
+
* Only import locale on demand to keep a small library weight.
|
|
366
|
+
*
|
|
367
|
+
* @param {String|Object} locale the language user whishes to have on vue-cal.
|
|
368
|
+
*/
|
|
369
|
+
loadLocale(locale)
|
|
370
|
+
|
|
371
|
+
//endregion
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
export default VueCal;
|
|
375
|
+
|
|
376
|
+
global {
|
|
377
|
+
type VueCalDateTimeFormat = VueCalTimeFormat &
|
|
378
|
+
string
|
|
379
|
+
| 'YYYY' // full year. E.g. `2019`
|
|
380
|
+
| 'YY' //2 last digits of the year. E.g. `19`
|
|
381
|
+
| 'MMMM' //month in full. E.g. `January`
|
|
382
|
+
| 'MMM' // 3 first letters of the month. E.g. `Jan`
|
|
383
|
+
| 'MM' // month number with leading zero. (01-12) E.g. `01`
|
|
384
|
+
| 'M' // month number without leading zero. (1-12) E.g. `1`
|
|
385
|
+
| 'DD' // date of the month with leading zero. (01-31) E.g. `01`
|
|
386
|
+
| 'D' // date of the month without leading zero. (1-31) E.g. `1`
|
|
387
|
+
| 'S' // (usually with surrounding `{ }`) only in English, will output `st`, `nd`, `rd` or `th`.
|
|
388
|
+
| 'dddd' // day of the week in full. E.g. `Monday`
|
|
389
|
+
| 'ddd' // 3 first letters of the day of the week. E.g. `Mon`
|
|
390
|
+
| 'dd' // first letter of the day of the week. E.g. `M`
|
|
391
|
+
| 'd' // number of the day of the week. (1-7) E.g. `1` for Monday
|
|
392
|
+
|
|
393
|
+
type VueCalTimeFormat =
|
|
394
|
+
| string
|
|
395
|
+
| 'HH' // Hours with leading zero, 24-hour format. (00-24)E.g. `20`
|
|
396
|
+
| 'H' // Hours without leading zero, 24-hour format. (0-24)E.g. `20`
|
|
397
|
+
| 'hh' // Hours with leading zero, 12-hour format. E.g. `08`
|
|
398
|
+
| 'h' // Hours without leading zero, 12-hour format. E.g. `8`
|
|
399
|
+
| 'mm' // Minutes with leading zero. E.g. `08`
|
|
400
|
+
| 'm' // Minutes without leading zero. E.g. `8`
|
|
401
|
+
| 'am' // (usually with surrounding `{ }`) am or pm (also localized if any)
|
|
402
|
+
|
|
403
|
+
interface Date {
|
|
404
|
+
addDays(days: number): this // adds days to a Date object and returns it. The original Date stays untouched as a copy is made.
|
|
405
|
+
subtractDays(days: number): this // Subtracts days to a Date object and returns it. The original Date stays untouched as a copy is made.
|
|
406
|
+
addHours(hours: number): this //Adds hours to a Date object and returns it. The original Date stays untouched as a copy is made. `hours` is an integer.
|
|
407
|
+
subtractHours(hours: number): this // Subtracts hours to a Date object and returns it. The original Date stays untouched as a copy is made. `hours` is an integer.
|
|
408
|
+
addMinutes(minutes: number): this // Adds minutes to a Date object and returns it. The original Date stays untouched as a copy is made. `minutes` is an integer.
|
|
409
|
+
subtractMinutes(minutes: number): this //Subtracts minutes to a Date object and returns it. The original Date stays untouched as a copy is made. `minutes` is an integer.
|
|
410
|
+
getWeek(): number // Returns the week number (1 to 53) of a date.
|
|
411
|
+
isToday(): boolean // Returns true if the date is Today.
|
|
412
|
+
isLeapYear(): boolean //Returns true if the date is in a leap year.
|
|
413
|
+
/**
|
|
414
|
+
Returns a formatted date string. Default format is 'YYYY-MM-DD', but you can use any formatting keyword from this list, and add any character not present in this mapping:
|
|
415
|
+
* YYYY: full year. E.g. `2019`
|
|
416
|
+
* YY: 2 last digits of the year. E.g. `19`
|
|
417
|
+
* MMMM: month in full. E.g. `January`
|
|
418
|
+
* MMM: 3 first letters of the month. E.g. `Jan`
|
|
419
|
+
* MM: month number with leading zero. (01-12) E.g. `01`
|
|
420
|
+
* M: month number without leading zero. (1-12) E.g. `1`
|
|
421
|
+
* DD: date of the month with leading zero. (01-31) E.g. `01`
|
|
422
|
+
* D: date of the month without leading zero. (1-31) E.g. `1`
|
|
423
|
+
* S: (usually with surrounding `{ }`) only in English, will output `st`, `nd`, `rd` or `th`.
|
|
424
|
+
* dddd: day of the week in full. E.g. `Monday`
|
|
425
|
+
* ddd: 3 first letters of the day of the week. E.g. `Mon`
|
|
426
|
+
* dd: first letter of the day of the week. E.g. `M`
|
|
427
|
+
* d: number of the day of the week. (1-7) E.g. `1` for Monday
|
|
428
|
+
* And also all the keywords from the following formatTime() function.
|
|
429
|
+
*/
|
|
430
|
+
format(format: VueCalDateTimeFormat): string
|
|
431
|
+
|
|
432
|
+
/**
|
|
433
|
+
Returns a formatted time string.
|
|
434
|
+
The format() function can also do this, but this might be a shortcut if you just want the default time formatting.
|
|
435
|
+
E.g. `formatTime()`).
|
|
436
|
+
This function will also be slightly faster than format() as lighter in functionality.
|
|
437
|
+
Default format is 'HH:mm', but you can use any formatting keyword from this list, and add any character not present in this mapping:
|
|
438
|
+
* HH: Hours with leading zero, 24-hour format. (00-24)E.g. `20`
|
|
439
|
+
* H: Hours without leading zero, 24-hour format. (0-24)E.g. `20`
|
|
440
|
+
* hh: Hours with leading zero, 12-hour format. E.g. `08`
|
|
441
|
+
* h: Hours without leading zero, 12-hour format. E.g. `8`
|
|
442
|
+
* mm: Minutes with leading zero. E.g. `08`
|
|
443
|
+
* m: Minutes without leading zero. E.g. `8`
|
|
444
|
+
* am: (usually with surrounding `{ }`) am or pm (also localized if any)
|
|
445
|
+
*/
|
|
446
|
+
formatTime(format: VueCalTimeFormat): string
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<LazyFormBranch :_id="_id" class="w-full" @after="after" />
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script setup lang="ts">
|
|
6
|
+
/**
|
|
7
|
+
* This file was automatically generated by simpleapp generator.
|
|
8
|
+
* --remove-this-line-to-prevent-override--
|
|
9
|
+
* last change 2023-09-09
|
|
10
|
+
* author: Ks Tan
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { Branch } from "~/simpleapp/generate/types";
|
|
14
|
+
const doc = useNuxtApp().$BranchDoc();
|
|
15
|
+
const _id = getPathPara("id", "");
|
|
16
|
+
|
|
17
|
+
const after = (actionName: string, data: Branch) => {
|
|
18
|
+
console.log("Branch capture after emits ", actionName);
|
|
19
|
+
switch (actionName) {
|
|
20
|
+
case "exit":
|
|
21
|
+
goTo('organization');
|
|
22
|
+
break;
|
|
23
|
+
case "create":
|
|
24
|
+
goTo(doc.getDocName(), data._id);
|
|
25
|
+
refreshDocumentList('branch');
|
|
26
|
+
goTo('organization');
|
|
27
|
+
break;
|
|
28
|
+
case "update":
|
|
29
|
+
refreshDocumentList('branch');
|
|
30
|
+
goTo('organization');
|
|
31
|
+
break;
|
|
32
|
+
case "delete":
|
|
33
|
+
goTo(doc.getDocName(), "new");
|
|
34
|
+
refreshDocumentList('branch');
|
|
35
|
+
goTo('organization');
|
|
36
|
+
break;
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
</script>
|
|
40
|
+
|