@neutron.co.id/operasional-interfaces 1.14.7 → 1.14.8
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/build/@mock/mock.interfaces.d.ts +0 -2
- package/build/@office/common/OfficeSingleSync/OfficeSingleSync.vue +50 -0
- package/build/@office/common/OfficeSingleSync/index.d.ts +1 -0
- package/build/@office/common/OfficeSingleSync/index.mjs +1 -0
- package/build/@office/common/OperasionalIdentitas/OperasionalIdentitas.vue +66 -62
- package/build/@office/common/index.d.ts +1 -0
- package/build/@office/common/index.mjs +1 -0
- package/build/@office/config.mjs +6 -1
- package/build/@office/models/personalia/index.d.ts +1 -0
- package/build/@office/models/personalia/index.mjs +1 -0
- package/build/@office/models/personalia/shift/ShiftAdministrator.vue +78 -0
- package/build/@office/models/personalia/shift/ShiftCollection/ShiftCollection.stories.d.ts +7 -0
- package/build/@office/models/personalia/shift/ShiftCollection/ShiftCollection.stories.mjs +36 -0
- package/build/@office/models/personalia/shift/ShiftCollection/ShiftCollection.vue +73 -0
- package/build/@office/models/personalia/shift/ShiftCollection/index.d.ts +1 -0
- package/build/@office/models/personalia/shift/ShiftCollection/index.mjs +1 -0
- package/build/@office/models/personalia/shift/ShiftSingle/ShiftSingle.stories.d.ts +8 -0
- package/build/@office/models/personalia/shift/ShiftSingle/ShiftSingle.stories.mjs +47 -0
- package/build/@office/models/personalia/shift/ShiftSingle/ShiftSingle.vue +69 -0
- package/build/@office/models/personalia/shift/ShiftSingle/index.d.ts +1 -0
- package/build/@office/models/personalia/shift/ShiftSingle/index.mjs +1 -0
- package/build/@office/models/personalia/shift/ShiftStaff.vue +92 -0
- package/build/@office/models/personalia/shift/index.d.ts +4 -0
- package/build/@office/models/personalia/shift/index.mjs +4 -0
- package/build/@office/models/personalia/situation/SituationSingle/SituationSingle.vue +0 -1
- package/build/@office/models/personalia/staff/StaffIdentity.vue +148 -150
- package/build/@office/models/personalia/staff/StaffSingle/StaffSingle.vue +1 -1
- package/build/@office/models/personalia/submission/SubmissionAudit.vue +6 -10
- package/build/@office/models/personalia/submission/SubmissionDecision.vue +3 -4
- package/build/@office/models/personalia/submission/SubmissionStaff.vue +46 -30
- package/build/@package/@office/common/OfficeSingleSync/OfficeSingleSync.vue.d.ts +2 -0
- package/build/@package/@office/common/OfficeSingleSync/index.d.ts +1 -0
- package/build/@package/@office/common/index.d.ts +1 -0
- package/build/@package/@office/models/personalia/index.d.ts +1 -0
- package/build/@package/@office/models/personalia/shift/ShiftAdministrator.vue.d.ts +2 -0
- package/build/@package/@office/models/personalia/shift/ShiftCollection/ShiftCollection.vue.d.ts +43 -0
- package/build/@package/@office/models/personalia/shift/ShiftCollection/index.d.ts +1 -0
- package/build/@package/@office/models/personalia/shift/ShiftSingle/ShiftSingle.vue.d.ts +2 -0
- package/build/@package/@office/models/personalia/shift/ShiftSingle/index.d.ts +1 -0
- package/build/@package/@office/models/personalia/shift/ShiftStaff.vue.d.ts +2 -0
- package/build/@package/@office/models/personalia/shift/index.d.ts +4 -0
- package/build/mock/index.cjs +821 -426
- package/build/mock/index.mjs +825 -430
- package/build/mock/style.css +36 -5
- package/build/module.json +1 -1
- package/build/nuxt.json +1 -1
- package/build/nuxt.mjs +6 -1
- package/package.json +8 -6
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<NeonSingle class="neu-shift-single">
|
|
3
|
+
<OfficeTabs :use-url="isMain">
|
|
4
|
+
<OfficeTab handle="info" icon="circle-info" title="Info">
|
|
5
|
+
<NeonForm
|
|
6
|
+
handle="info"
|
|
7
|
+
:initial-values="initialValues"
|
|
8
|
+
:is-loading="isLoading"
|
|
9
|
+
:is-changed="isChanged"
|
|
10
|
+
use-unsaved
|
|
11
|
+
@cancel="discardChanges"
|
|
12
|
+
@submit="saveOne"
|
|
13
|
+
>
|
|
14
|
+
<NeonField
|
|
15
|
+
v-model="values.titleShift"
|
|
16
|
+
v-bind="fields.titleShift"
|
|
17
|
+
is-disabled
|
|
18
|
+
/>
|
|
19
|
+
<NeonField
|
|
20
|
+
v-model="values.expTime"
|
|
21
|
+
v-bind="fields.expTime"
|
|
22
|
+
is-disabled
|
|
23
|
+
/>
|
|
24
|
+
|
|
25
|
+
<NeonField
|
|
26
|
+
v-model="values.disciplineAt"
|
|
27
|
+
v-bind="fields.disciplineAt"
|
|
28
|
+
is-disabled
|
|
29
|
+
/>
|
|
30
|
+
|
|
31
|
+
<NeonField
|
|
32
|
+
v-model="values.disciplineEnd"
|
|
33
|
+
v-bind="fields.disciplineEnd"
|
|
34
|
+
is-disabled
|
|
35
|
+
/>
|
|
36
|
+
|
|
37
|
+
<NeonField
|
|
38
|
+
v-model="values.picketStaff"
|
|
39
|
+
v-bind="fields.picketStaff"
|
|
40
|
+
is-disabled
|
|
41
|
+
/>
|
|
42
|
+
|
|
43
|
+
<NeonField
|
|
44
|
+
v-model="values.offsetTime"
|
|
45
|
+
v-bind="fields.offsetTime"
|
|
46
|
+
is-disabled
|
|
47
|
+
/>
|
|
48
|
+
|
|
49
|
+
<NeonField
|
|
50
|
+
v-model="values.effortTime"
|
|
51
|
+
v-bind="fields.effortTime"
|
|
52
|
+
is-disabled
|
|
53
|
+
/>
|
|
54
|
+
</NeonForm>
|
|
55
|
+
</OfficeTab>
|
|
56
|
+
</OfficeTabs>
|
|
57
|
+
</NeonSingle>
|
|
58
|
+
</template>
|
|
59
|
+
|
|
60
|
+
<script setup lang="ts">
|
|
61
|
+
import { NeonSingle, useSingle } from '@neon.id/context'
|
|
62
|
+
import { NeonField, NeonFields, NeonForm } from '@neon.id/form'
|
|
63
|
+
import { NeonButton, NeonDivider, NeonCopy } from '@neon.id/interfaces'
|
|
64
|
+
import { OfficeRelation, OfficeTab, OfficeTabs } from '@neon.id/office'
|
|
65
|
+
import { Query } from '@neon.id/query'
|
|
66
|
+
import { useOperasional } from '../../../common/providers/operasional'
|
|
67
|
+
import { computed, watch } from 'vue'
|
|
68
|
+
import { PromiseUtil } from '@neon.id/utils/promise'
|
|
69
|
+
import type {
|
|
70
|
+
TPersonaliaShiftModel,
|
|
71
|
+
Schema,
|
|
72
|
+
} from '@neutron.co.id/personalia-models'
|
|
73
|
+
|
|
74
|
+
const {
|
|
75
|
+
fields,
|
|
76
|
+
id,
|
|
77
|
+
initialValues,
|
|
78
|
+
values,
|
|
79
|
+
isLoading,
|
|
80
|
+
isChanged,
|
|
81
|
+
isReady,
|
|
82
|
+
isMain,
|
|
83
|
+
isNew,
|
|
84
|
+
syncOne,
|
|
85
|
+
saveOne,
|
|
86
|
+
discardChanges,
|
|
87
|
+
executeOne,
|
|
88
|
+
} = useSingle<Schema.Shift, TPersonaliaShiftModel>()
|
|
89
|
+
|
|
90
|
+
const { staff } = useOperasional()
|
|
91
|
+
</script>
|
|
92
|
+
<style scoped></style>
|
|
@@ -98,156 +98,154 @@ function getProfile(staff: Schema.Staff) {
|
|
|
98
98
|
</script>
|
|
99
99
|
|
|
100
100
|
<template>
|
|
101
|
-
<
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
:
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
/>
|
|
250
|
-
</NeonFormWrapper>
|
|
101
|
+
<OperasionalIdentitas
|
|
102
|
+
:user="values.user"
|
|
103
|
+
:profile="profile"
|
|
104
|
+
:conflict="conflict"
|
|
105
|
+
:roles="[
|
|
106
|
+
{ id: 'a6c43f08a59b4292e3d1357b', name: 'Admin Office' },
|
|
107
|
+
{ id: '641044c878ae4f8388b1d280', name: 'Admin Operasional' },
|
|
108
|
+
// { id: '64101f7078ae4f8388b1d1e8', name: 'Cabang Operasional' },
|
|
109
|
+
{ id: '641d357c78ae4f8388b1dbaf', name: 'Manager Cabang' },
|
|
110
|
+
{ id: '641d35b178ae4f8388b1dbd4', name: 'SDM Cabang' },
|
|
111
|
+
{ id: '6309c3c2e64a1324b8663dab', name: 'Karyawan' },
|
|
112
|
+
{ id: '646a42976af710fe3618af9a', name: 'Pengawas Pengajuan' },
|
|
113
|
+
{ id: '646a43106af710fe3618afca', name: 'Pengambil Keputusan' },
|
|
114
|
+
{ id: '654a0b3fb487f9f1087347aa', name: 'Poin' },
|
|
115
|
+
{ id: '654ad81bb487f9f1087347e7', name: 'Pengelola Poin' },
|
|
116
|
+
{ id: '6555a130fdd768dbbb18d717', name: 'Intelijen' },
|
|
117
|
+
// OPERASIONAL
|
|
118
|
+
{
|
|
119
|
+
id: '64a686ba3fe0bb481faa0f8b',
|
|
120
|
+
name: 'Pengelola SDM',
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
id: '64a687823fe0bb481faa0fba',
|
|
124
|
+
name: 'Penanggungjawab Cabang',
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
id: '64a687b93fe0bb481faa0fd6',
|
|
128
|
+
name: 'Pengawas SDM',
|
|
129
|
+
},
|
|
130
|
+
// {
|
|
131
|
+
// id: '64a687ed3fe0bb481faa0ff2',
|
|
132
|
+
// name: 'Pengelola Absensi',
|
|
133
|
+
// },
|
|
134
|
+
// END OPERASIONAL
|
|
135
|
+
{ id: '64e6e0669103ea42a4f7d4d0', name: 'Cabang KBM' },
|
|
136
|
+
{ id: '658f68314dec264ead160077', name: 'Cabang Tanya' },
|
|
137
|
+
{ id: '658f68884dec264ead160078', name: 'Cabang Rasionalisasi' },
|
|
138
|
+
// { id: '63e1734b78ae4f8388b1b313', name: 'Cabang Pendidikan' },
|
|
139
|
+
// Keuangan
|
|
140
|
+
// { id: '6309c39fe64a1324b8663da7', name: 'Konsumen' },
|
|
141
|
+
{ id: '6454a30dd760fc7b529d4c23', name: 'Karyawan FO Cabang' },
|
|
142
|
+
{ id: '6454a343d760fc7b529d4c64', name: 'Karyawan Kasir Cabang' },
|
|
143
|
+
{ id: '6454a368d760fc7b529d4c8e', name: 'karyawan Keuangan Cabang' },
|
|
144
|
+
{ id: '6454a387d760fc7b529d4cb1', name: 'Kasir Cabang' },
|
|
145
|
+
{
|
|
146
|
+
id: '6454a3cbd760fc7b529d4d01',
|
|
147
|
+
name: 'Pengawas Pengeluaran Lain Cabang',
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
id: '6454a3f3d760fc7b529d4d2a',
|
|
151
|
+
name: 'Pengawas Mutasi Lain Cabang',
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
id: '6454a414d760fc7b529d4d69',
|
|
155
|
+
name: 'Pengawas Hapus Tagihan Cabang',
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
id: '6454a439d760fc7b529d4d9e',
|
|
159
|
+
name: 'Pengawas Mutasi Tagihan Cabang',
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
id: '6454a39dd760fc7b529d4cd7',
|
|
163
|
+
name: 'Pengawas Pengembalian Tagihan Cabang',
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
id: '6454a40ad760fc7b529d4d4d',
|
|
167
|
+
name: 'Pengawas Pemasukan Tagihan Cabang',
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
id: '6454a441d760fc7b529d4db4',
|
|
171
|
+
name: 'Pengawas Pengurangan Tagihan Cabang',
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
id: '6454a486d760fc7b529d4dee',
|
|
175
|
+
name: 'Pengawas Penambahan Tagihan Cabang',
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
id: '6454a529d760fc7b529d4e1f',
|
|
179
|
+
name: 'Pengawas Pengeluaran Komponen Cabang',
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
id: '6454a557d760fc7b529d4e44',
|
|
183
|
+
name: 'Pengawas Pendapatan Lain Cabang',
|
|
184
|
+
},
|
|
185
|
+
// PEMASARAN
|
|
186
|
+
{
|
|
187
|
+
id: '6454a6c2d760fc7b529d4f4f',
|
|
188
|
+
name: 'Karyawan Marketing Cabang',
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
id: '652ce8e6b487f9f108733873',
|
|
192
|
+
name: 'Cabang FO',
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
id: '652ceb48b487f9f108733896',
|
|
196
|
+
name: 'Cabang Pemasaran',
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
id: '652ceb79b487f9f1087338bc',
|
|
200
|
+
name: 'Pengelola Penyebaran',
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
id: '652ceba2b487f9f1087338d9',
|
|
204
|
+
name: 'Pengelola Publikasi',
|
|
205
|
+
},
|
|
206
|
+
// INVENTORI
|
|
207
|
+
{
|
|
208
|
+
id: '64e7f2089103ea42a4f7d512',
|
|
209
|
+
name: 'Cabang Inventori',
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
id: '64e7f3629103ea42a4f7d535',
|
|
213
|
+
name: 'Cabang Outlet',
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
id: '64e7f3c39103ea42a4f7d552',
|
|
217
|
+
name: 'Pengadaan Inventori',
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
id: '64e7f4309103ea42a4f7d579',
|
|
221
|
+
name: 'Pengawasan Pengadaan Inventori',
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
id: '64e7f46d9103ea42a4f7d596',
|
|
225
|
+
name: 'Cabang Pengadaan',
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
id: '64e817419103ea42a4f7d5bd',
|
|
229
|
+
name: 'Pengelola Resep',
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
id: '64e9aa869103ea42a4f7d6a9',
|
|
233
|
+
name: 'Pengawas Inventori',
|
|
234
|
+
},
|
|
235
|
+
// Sentral
|
|
236
|
+
{
|
|
237
|
+
id: '650917b39103ea42a4f7e189',
|
|
238
|
+
name: 'Pengelola Export',
|
|
239
|
+
},
|
|
240
|
+
]"
|
|
241
|
+
:errors="errors"
|
|
242
|
+
:on-choose="onChoose"
|
|
243
|
+
:on-register="onRegister"
|
|
244
|
+
:on-connect="onConnect"
|
|
245
|
+
:on-disconnect="onDisconnect"
|
|
246
|
+
:on-delegate="onDelegate"
|
|
247
|
+
@no-conflict="conflict = undefined"
|
|
248
|
+
/>
|
|
251
249
|
</template>
|
|
252
250
|
|
|
253
251
|
<style scoped></style>
|
|
@@ -439,6 +439,7 @@ const {
|
|
|
439
439
|
isReady,
|
|
440
440
|
isMain,
|
|
441
441
|
isNew,
|
|
442
|
+
refreshOne,
|
|
442
443
|
syncOne,
|
|
443
444
|
saveOne,
|
|
444
445
|
discardChanges,
|
|
@@ -542,22 +543,19 @@ async function setDefaultValues() {
|
|
|
542
543
|
const syncResolved = async () => {
|
|
543
544
|
await executeOne('resolvedSubmission', { submissionId: id.value })
|
|
544
545
|
await syncOne()
|
|
545
|
-
|
|
546
|
-
// window.location.href = `/pengajuan/audit-submission?peek=neu:personalia:submission:${id.value}:single-audit-view:m`
|
|
546
|
+
await refreshOne()
|
|
547
547
|
}
|
|
548
548
|
|
|
549
549
|
const syncDiscontinued = async () => {
|
|
550
550
|
await executeOne('discontinuedSubmission', { submissionId: id.value })
|
|
551
551
|
await syncOne()
|
|
552
|
-
|
|
553
|
-
// window.location.href = `/pengajuan/audit-submission?peek=neu:personalia:submission:${id.value}:single-audit-view:m`
|
|
552
|
+
await refreshOne()
|
|
554
553
|
}
|
|
555
554
|
|
|
556
555
|
const syncMonitored = async () => {
|
|
557
556
|
await executeOne('monitoredSubmission', { submissionId: id.value })
|
|
558
557
|
await syncOne()
|
|
559
|
-
|
|
560
|
-
// window.location.href = `/pengajuan/audit-submission?peek=neu:personalia:submission:${id.value}:single-audit-view:m`
|
|
558
|
+
await refreshOne()
|
|
561
559
|
}
|
|
562
560
|
|
|
563
561
|
const syncProcessed = async () => {
|
|
@@ -566,8 +564,7 @@ const syncProcessed = async () => {
|
|
|
566
564
|
staffId: staff.value?.id,
|
|
567
565
|
})
|
|
568
566
|
await syncOne()
|
|
569
|
-
|
|
570
|
-
// `/pengajuan/audit-submission?peek=neu:personalia:submission:${id.value}:single-audit-view:m`
|
|
567
|
+
await refreshOne()
|
|
571
568
|
}
|
|
572
569
|
|
|
573
570
|
const syncLowered = async () => {
|
|
@@ -576,8 +573,7 @@ const syncLowered = async () => {
|
|
|
576
573
|
staffId: staff.value?.id,
|
|
577
574
|
})
|
|
578
575
|
await syncOne()
|
|
579
|
-
|
|
580
|
-
// window.location.href = `/pengajuan/audit-submission?peek=neu:personalia:submission:${id.value}:single-audit-view:m`
|
|
576
|
+
await refreshOne()
|
|
581
577
|
}
|
|
582
578
|
|
|
583
579
|
const copyStaff = computed(() => {
|
|
@@ -391,6 +391,7 @@ const {
|
|
|
391
391
|
isReady,
|
|
392
392
|
isMain,
|
|
393
393
|
isNew,
|
|
394
|
+
refreshOne,
|
|
394
395
|
syncOne,
|
|
395
396
|
saveOne,
|
|
396
397
|
discardChanges,
|
|
@@ -496,8 +497,7 @@ const syncDelay = async () => {
|
|
|
496
497
|
staffId: staff.value?.id,
|
|
497
498
|
})
|
|
498
499
|
await syncOne()
|
|
499
|
-
|
|
500
|
-
// window.location.href = `/pengajuan/decision-submission?peek=neu:personalia:submission:${id.value}:single-decision-view:m`
|
|
500
|
+
await refreshOne()
|
|
501
501
|
}
|
|
502
502
|
|
|
503
503
|
const syncApproved = async () => {
|
|
@@ -506,8 +506,7 @@ const syncApproved = async () => {
|
|
|
506
506
|
staffId: staff.value?.id,
|
|
507
507
|
})
|
|
508
508
|
await syncOne()
|
|
509
|
-
|
|
510
|
-
// window.location.href = `/pengajuan/decision-submission?peek=neu:personalia:submission:${id.value}:single-decision-view:m`
|
|
509
|
+
await refreshOne()
|
|
511
510
|
}
|
|
512
511
|
|
|
513
512
|
const copyStaff = computed(() => {
|
|
@@ -340,10 +340,12 @@ const {
|
|
|
340
340
|
isReady,
|
|
341
341
|
isMain,
|
|
342
342
|
isNew,
|
|
343
|
+
refreshOne,
|
|
343
344
|
syncOne,
|
|
344
345
|
saveOne,
|
|
345
346
|
discardChanges,
|
|
346
347
|
executeOne,
|
|
348
|
+
setDefaultValues,
|
|
347
349
|
} = useSingle<Schema.Submission, TPersonaliaSubmissionModel>()
|
|
348
350
|
|
|
349
351
|
const { staff } = useOperasional()
|
|
@@ -407,37 +409,53 @@ const roleDecideStaffOptions = computed(() => {
|
|
|
407
409
|
],
|
|
408
410
|
}
|
|
409
411
|
})
|
|
410
|
-
|
|
411
|
-
const staffId = staff.value?.id || ''
|
|
412
412
|
const branchIds = staff.value?.branchIds || []
|
|
413
413
|
const branchDisplay = staff.value?.branches || []
|
|
414
414
|
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
async function setDefaultValues() {
|
|
418
|
-
if (!isNew.value) return
|
|
419
|
-
await PromiseUtil.wait(500)
|
|
420
|
-
|
|
421
|
-
const defaultValues = {
|
|
422
|
-
submissionStaffIds: [staffId],
|
|
423
|
-
submissionStaffs: [{ id: staffId, flag: staff.value?.flag }],
|
|
424
|
-
branchIds: [branchIds[0]],
|
|
425
|
-
branches: [branchDisplay[0]],
|
|
426
|
-
preparedAt: new Date().toISOString(),
|
|
427
|
-
} satisfies Schema.Submission
|
|
428
|
-
|
|
429
|
-
values.value.preparedAt = defaultValues.preparedAt
|
|
430
|
-
|
|
431
|
-
if (staff?.value?.id) {
|
|
432
|
-
values.value.submissionStaffIds = defaultValues.submissionStaffIds
|
|
433
|
-
values.value.submissionStaffs = defaultValues.submissionStaffs
|
|
434
|
-
}
|
|
415
|
+
console.log('staff :', staff.value)
|
|
435
416
|
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
417
|
+
watch(
|
|
418
|
+
isNew,
|
|
419
|
+
async (isNew) => {
|
|
420
|
+
if (!isNew) return
|
|
421
|
+
|
|
422
|
+
setDefaultValues({
|
|
423
|
+
submissionStaffs: [{ id: staff?.value?.id, flag: staff?.value?.flag }],
|
|
424
|
+
branches: [branchDisplay[0]],
|
|
425
|
+
})
|
|
426
|
+
|
|
427
|
+
await PromiseUtil.wait(1000)
|
|
428
|
+
values.value.submissionStaffIds = staff?.value?.id ? [staff.value.id] : []
|
|
429
|
+
values.value.branchIds = [branchIds[0]]
|
|
430
|
+
values.value.preparedAt = new Date().toISOString()
|
|
431
|
+
},
|
|
432
|
+
{ immediate: true },
|
|
433
|
+
)
|
|
434
|
+
|
|
435
|
+
// async function () {
|
|
436
|
+
// if (!isNew.value) return
|
|
437
|
+
// await PromiseUtil.wait(500)
|
|
438
|
+
|
|
439
|
+
// const defaultValues = {
|
|
440
|
+
// submissionStaffIds: staff?.value?.id ? [staffId] : ,
|
|
441
|
+
// submissionStaffs: [{ id: staffId, flag: staff.value?.flag }],
|
|
442
|
+
// branchIds: [branchIds[0]],
|
|
443
|
+
// branches: [branchDisplay[0]],
|
|
444
|
+
// preparedAt: new Date().toISOString(),
|
|
445
|
+
// } satisfies Schema.Submission
|
|
446
|
+
|
|
447
|
+
// values.value.preparedAt = defaultValues.preparedAt
|
|
448
|
+
|
|
449
|
+
// if (staff?.value?.id) {
|
|
450
|
+
// values.value.submissionStaffIds = defaultValues.submissionStaffIds
|
|
451
|
+
// values.value.submissionStaffs = defaultValues.submissionStaffs
|
|
452
|
+
// }
|
|
453
|
+
|
|
454
|
+
// if (staff?.value?.branchIds) {
|
|
455
|
+
// values.value.branchIds = defaultValues.branchIds
|
|
456
|
+
// values.value.branches = defaultValues.branches
|
|
457
|
+
// }
|
|
458
|
+
// }
|
|
441
459
|
|
|
442
460
|
const syncRaise = async () => {
|
|
443
461
|
await executeOne('raiseSubmission', {
|
|
@@ -445,9 +463,7 @@ const syncRaise = async () => {
|
|
|
445
463
|
staffId: staff.value?.id,
|
|
446
464
|
})
|
|
447
465
|
await syncOne()
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
// `/pengajuan/staff-submission?peek=neu:personalia:submission:${id.value}:single-staff-view:m`
|
|
466
|
+
await refreshOne()
|
|
451
467
|
}
|
|
452
468
|
|
|
453
469
|
const copyStaff = computed(() => {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as OfficeSingleSync } from './OfficeSingleSync.vue';
|