@yoobic/yobi 8.5.0-76 → 8.5.0-78
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/cjs/design-system.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{swiper-9f95d970.js → swiper-14a9aa6e.js} +1 -1
- package/dist/cjs/yoo-form-autocomplete.cjs.entry.js +0 -2
- package/dist/cjs/yoo-form-capture.cjs.entry.js +1 -1
- package/dist/cjs/yoo-form-image-tagging.cjs.entry.js +12 -15
- package/dist/cjs/yoo-form-phone-number.cjs.entry.js +1 -1
- package/dist/cjs/yoo-form-todo-mission.cjs.entry.js +21 -18
- package/dist/cjs/yoo-form-todo.cjs.entry.js +1 -1
- package/dist/cjs/yoo-ion-scroll.cjs.entry.js +0 -7
- package/dist/cjs/{yoo-ion-slides-91aed68c.js → yoo-ion-slides-ac7389aa.js} +3 -3
- package/dist/cjs/yoo-ion-slides.cjs.entry.js +1 -1
- package/dist/cjs/yoo-mission-todo.cjs.entry.js +2 -2
- package/dist/collection/components/2.molecules/scroll/scroll.js +0 -12
- package/dist/collection/components/2.molecules/slide/slide.css +2 -2
- package/dist/collection/components/2.molecules/slides/slides.css +2 -2
- package/dist/collection/components/form/form-autocomplete/form-autocomplete.js +0 -16
- package/dist/collection/components/form/form-capture/form-capture.js +1 -1
- package/dist/collection/components/form/form-image-tagging/form-image-tagging.css +16 -28
- package/dist/collection/components/form/form-image-tagging/form-image-tagging.js +12 -15
- package/dist/collection/components/form/form-todo/form-todo.js +1 -1
- package/dist/collection/components/form/form-todo-mission/form-todo-mission.js +39 -19
- package/dist/collection/feature-operate/mission/mission-todo/mission-todo.js +3 -3
- package/dist/design-system/design-system.esm.js +1 -1
- package/dist/{esm/swiper-c4c9ef69.js → design-system/swiper-98ab4ffc.js} +2 -2
- package/dist/design-system/yoo-form-autocomplete.entry.js +0 -2
- package/dist/design-system/yoo-form-capture.entry.js +2 -2
- package/dist/design-system/yoo-form-image-tagging.entry.js +12 -15
- package/dist/design-system/yoo-form-phone-number.entry.js +1 -1
- package/dist/design-system/yoo-form-todo-mission.entry.js +21 -18
- package/dist/design-system/yoo-form-todo.entry.js +1 -1
- package/dist/design-system/yoo-ion-scroll.entry.js +0 -7
- package/dist/{esm/yoo-ion-slides-1c623349.js → design-system/yoo-ion-slides-fb2b42e7.js} +3 -3
- package/dist/design-system/yoo-ion-slides.entry.js +1 -1
- package/dist/design-system/yoo-mission-todo.entry.js +2 -2
- package/dist/esm/design-system.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/{design-system/swiper-c4c9ef69.js → esm/swiper-98ab4ffc.js} +2 -2
- package/dist/esm/yoo-form-autocomplete.entry.js +0 -2
- package/dist/esm/yoo-form-capture.entry.js +2 -2
- package/dist/esm/yoo-form-image-tagging.entry.js +12 -15
- package/dist/esm/yoo-form-phone-number.entry.js +1 -1
- package/dist/esm/yoo-form-todo-mission.entry.js +21 -18
- package/dist/esm/yoo-form-todo.entry.js +1 -1
- package/dist/esm/yoo-ion-scroll.entry.js +0 -7
- package/dist/{design-system/yoo-ion-slides-1c623349.js → esm/yoo-ion-slides-fb2b42e7.js} +3 -3
- package/dist/esm/yoo-ion-slides.entry.js +1 -1
- package/dist/esm/yoo-mission-todo.entry.js +2 -2
- package/dist/types/components/2.molecules/scroll/scroll.d.ts +0 -1
- package/dist/types/components/form/form-autocomplete/form-autocomplete.d.ts +0 -1
- package/dist/types/components/form/form-image-tagging/form-image-tagging.d.ts +1 -1
- package/dist/types/components/form/form-todo-mission/form-todo-mission.d.ts +3 -1
- package/dist/types/components.d.ts +6 -5
- package/dist/types/feature-operate/mission/mission-todo/mission-todo.d.ts +1 -1
- package/package.json +1 -1
@@ -13,13 +13,18 @@ export class YooFormTodoMissionComponent {
|
|
13
13
|
this.schedule.emit(value);
|
14
14
|
forceUpdate(this);
|
15
15
|
};
|
16
|
+
this.isAssignedToSomeoneElse = (task) => {
|
17
|
+
var _a, _b, _c, _d;
|
18
|
+
return (((_a = task.user) === null || _a === void 0 ? void 0 : _a.value) && task.user.value._id !== ((_b = this.currentUser) === null || _b === void 0 ? void 0 : _b._id)) ||
|
19
|
+
(!((_c = task.user) === null || _c === void 0 ? void 0 : _c.value) && this.assigneeId && this.assigneeId !== ((_d = this.currentUser) === null || _d === void 0 ? void 0 : _d._id));
|
20
|
+
};
|
16
21
|
this.updateSelfAssignee = (task, index) => {
|
17
22
|
var _a, _b, _c, _d, _e;
|
18
23
|
const isPhotoInProgress = ((_a = task.hasphoto) === null || _a === void 0 ? void 0 : _a.value) && (((_b = task.showPhotos) === null || _b === void 0 ? void 0 : _b.value) || task.imageData);
|
19
24
|
const isTaskInProgress = (this.status[index] !== 'unmarked') || ((_c = task.showComments) === null || _c === void 0 ? void 0 : _c.value) || isPhotoInProgress;
|
20
25
|
if (isTaskInProgress) {
|
21
26
|
if (!((_d = task.user) === null || _d === void 0 ? void 0 : _d.value)) {
|
22
|
-
task.user = { value: pick(this.
|
27
|
+
task.user = { value: pick(this.currentUser, IUser.getSimpleFields()), selfAssigned: true };
|
23
28
|
}
|
24
29
|
}
|
25
30
|
else if ((_e = task.user) === null || _e === void 0 ? void 0 : _e.selfAssigned) {
|
@@ -103,13 +108,13 @@ export class YooFormTodoMissionComponent {
|
|
103
108
|
return this.status[index];
|
104
109
|
}
|
105
110
|
getEditableOptions(task, index) {
|
106
|
-
var _a
|
107
|
-
if (this.readonly ||
|
111
|
+
var _a;
|
112
|
+
if (this.readonly || this.isAssignedToSomeoneElse(task)) {
|
108
113
|
return [this.scheduleButton(task, index)];
|
109
114
|
}
|
110
115
|
else {
|
111
116
|
return compact([
|
112
|
-
((
|
117
|
+
((_a = task.isphotorequired) === null || _a === void 0 ? void 0 : _a.value) ? null : this.photoButton(task, index),
|
113
118
|
this.commentsButton(task, index),
|
114
119
|
this.scheduleButton(task, index),
|
115
120
|
this.status[index] === 'unable-to-complete' ? null : this.markAsUnableButton(index)
|
@@ -117,8 +122,7 @@ export class YooFormTodoMissionComponent {
|
|
117
122
|
}
|
118
123
|
}
|
119
124
|
onIconClicked(task, index) {
|
120
|
-
|
121
|
-
if (this.readonly || (((_a = task.user) === null || _a === void 0 ? void 0 : _a.value) && task.user.value._id !== ((_b = this.user) === null || _b === void 0 ? void 0 : _b._id))) {
|
125
|
+
if (this.readonly || this.isAssignedToSomeoneElse(task)) {
|
122
126
|
return;
|
123
127
|
}
|
124
128
|
const updatedTask = this.values[index];
|
@@ -172,7 +176,7 @@ export class YooFormTodoMissionComponent {
|
|
172
176
|
status = 'unable-to-complete';
|
173
177
|
task.finished = { value: false, date: new Date() };
|
174
178
|
if (!((_b = task.user) === null || _b === void 0 ? void 0 : _b.value)) {
|
175
|
-
task.user = { value: pick(this.
|
179
|
+
task.user = { value: pick(this.currentUser, IUser.getSimpleFields()), selfAssigned: true };
|
176
180
|
}
|
177
181
|
}
|
178
182
|
this.status[index] = status;
|
@@ -180,9 +184,9 @@ export class YooFormTodoMissionComponent {
|
|
180
184
|
this.emitUpdate({ task, index });
|
181
185
|
}
|
182
186
|
renderCommentsField(task, index, userComments) {
|
183
|
-
var _a, _b
|
184
|
-
const readonlyComments = this.readonly || (
|
185
|
-
const renderComments = readonlyComments ? (((
|
187
|
+
var _a, _b;
|
188
|
+
const readonlyComments = this.readonly || this.isAssignedToSomeoneElse(task) ? true : false;
|
189
|
+
const renderComments = readonlyComments ? (((_a = task.showComments) === null || _a === void 0 ? void 0 : _a.value) && (userComments === null || userComments === void 0 ? void 0 : userComments.length)) : (_b = task.showComments) === null || _b === void 0 ? void 0 : _b.value;
|
186
190
|
return (!!renderComments &&
|
187
191
|
h("section", { id: "comments", ...{ editModeComments: !readonlyComments } }, h("comments-header", null, h("p", { class: "comments-title" }, translate('COMMENTNOUN').toUpperCase()), h("p", { class: "comments-optional" }, "(", translate('OPTIONAL'), ")")), h("yoo-form-text-area", { value: userComments, resizable: "none", size: "small", placeholder: translate('ADDCOMMENTS'), disableEnter: true, validateInput: false, disableTab: true, onInputChanged: (ev) => {
|
188
192
|
const updatedTask = this.values[index];
|
@@ -191,20 +195,20 @@ export class YooFormTodoMissionComponent {
|
|
191
195
|
}, readonly: readonlyComments })));
|
192
196
|
}
|
193
197
|
renderPhotoField(task, index) {
|
194
|
-
var _a, _b, _c, _d, _e
|
198
|
+
var _a, _b, _c, _d, _e;
|
195
199
|
const isphotorequired = (_a = task.isphotorequired) === null || _a === void 0 ? void 0 : _a.value;
|
196
|
-
const isAssignedToSomeoneElse = (
|
200
|
+
const isAssignedToSomeoneElse = this.isAssignedToSomeoneElse(task);
|
197
201
|
const readonlyPhoto = this.readonly || isAssignedToSomeoneElse;
|
198
202
|
const disabled = isAssignedToSomeoneElse && !task.imageData && !this.completed;
|
199
203
|
let renderPhotoField;
|
200
204
|
if (readonlyPhoto) {
|
201
|
-
renderPhotoField = (isphotorequired && !this.completed) || (((
|
205
|
+
renderPhotoField = (isphotorequired && !this.completed) || (((_b = task.hasphoto) === null || _b === void 0 ? void 0 : _b.value) && task.imageData);
|
202
206
|
}
|
203
207
|
else {
|
204
|
-
renderPhotoField = isphotorequired || ((
|
208
|
+
renderPhotoField = isphotorequired || ((_c = task.showPhotos) === null || _c === void 0 ? void 0 : _c.value);
|
205
209
|
}
|
206
210
|
return (!!renderPhotoField &&
|
207
|
-
h("section", { id: "photo", ...{ editModePhoto: !readonlyPhoto } }, h("photo-header", { ...{ withComments: (
|
211
|
+
h("section", { id: "photo", ...{ editModePhoto: !readonlyPhoto } }, h("photo-header", { ...{ withComments: (_d = task.showComments) === null || _d === void 0 ? void 0 : _d.value } }, h("p", { class: "photo-title" }, translate('YOOBICPHOTO').toUpperCase()), !isphotorequired && h("p", { class: "photo-optional" }, "(", translate('OPTIONAL'), ")")), h("yoo-form-capture", { value: task.imageData, allowLibrary: !!((_e = task.allowLibrary) === null || _e === void 0 ? void 0 : _e.value), disabled: disabled, readonly: readonlyPhoto && !disabled, size: readonlyPhoto && !disabled ? 'extra-small' : 'medium', type: "photo", onInputChanged: (event) => {
|
208
212
|
const updatedTask = this.values[index];
|
209
213
|
updatedTask.hasphoto = { value: true };
|
210
214
|
updatedTask.imageData = event.detail;
|
@@ -240,8 +244,7 @@ export class YooFormTodoMissionComponent {
|
|
240
244
|
return (h("yoo-button", { shape: "circular", size: "small", color: "stable-alt", fill: "transparent", slot: "end", ref: (el) => (plusButtonRef = el), onClick: (ev) => showActionSheet(this.getEditableOptions(task, index), null, null, plusButtonRef, ev) }, h("yoo-icon", { name: "circle-plus", color: "app-color", size: "medium" })));
|
241
245
|
}
|
242
246
|
renderIcon(task, index) {
|
243
|
-
|
244
|
-
const isAssignedAnother = ((_a = task.user) === null || _a === void 0 ? void 0 : _a.value) && (task.user.value._id !== ((_b = this.user) === null || _b === void 0 ? void 0 : _b._id));
|
247
|
+
const isAssignedToSomeoneElse = this.isAssignedToSomeoneElse(task);
|
245
248
|
let iconName;
|
246
249
|
let iconColor;
|
247
250
|
if (this.status[index] === 'finished') {
|
@@ -252,7 +255,7 @@ export class YooFormTodoMissionComponent {
|
|
252
255
|
iconName = 'circle-minor';
|
253
256
|
iconColor = 'danger';
|
254
257
|
}
|
255
|
-
else if (this.readonly ||
|
258
|
+
else if (this.readonly || isAssignedToSomeoneElse) {
|
256
259
|
iconName = 'lock';
|
257
260
|
iconColor = 'stable-alt';
|
258
261
|
}
|
@@ -348,7 +351,7 @@ export class YooFormTodoMissionComponent {
|
|
348
351
|
"attribute": "completed",
|
349
352
|
"reflect": false
|
350
353
|
},
|
351
|
-
"
|
354
|
+
"currentUser": {
|
352
355
|
"type": "unknown",
|
353
356
|
"mutable": false,
|
354
357
|
"complexType": {
|
@@ -368,6 +371,23 @@ export class YooFormTodoMissionComponent {
|
|
368
371
|
"text": ""
|
369
372
|
}
|
370
373
|
},
|
374
|
+
"assigneeId": {
|
375
|
+
"type": "string",
|
376
|
+
"mutable": false,
|
377
|
+
"complexType": {
|
378
|
+
"original": "string",
|
379
|
+
"resolved": "string",
|
380
|
+
"references": {}
|
381
|
+
},
|
382
|
+
"required": false,
|
383
|
+
"optional": true,
|
384
|
+
"docs": {
|
385
|
+
"tags": [],
|
386
|
+
"text": ""
|
387
|
+
},
|
388
|
+
"attribute": "assignee-id",
|
389
|
+
"reflect": false
|
390
|
+
},
|
371
391
|
"overallDuedate": {
|
372
392
|
"type": "unknown",
|
373
393
|
"mutable": false,
|
@@ -24,13 +24,13 @@ export class YooMissionTodoComponent {
|
|
24
24
|
}
|
25
25
|
}
|
26
26
|
render() {
|
27
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
27
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
28
28
|
const cleanPriority = ((_b = (_a = this.mission) === null || _a === void 0 ? void 0 : _a.todo) === null || _b === void 0 ? void 0 : _b.priority) === ((_c = this.mission) === null || _c === void 0 ? void 0 : _c.priority) || !isPresent((_d = this.mission) === null || _d === void 0 ? void 0 : _d.priority);
|
29
29
|
const slidesTodo = cleanupTodoSlides(this.slidesTodo, cleanPriority, this.isPdf);
|
30
30
|
return (h(Host, null, h("yoo-form-dynamic", { class: "inline inline-row-narrow no-border-collapsible", scrollable: false, slides: slidesTodo, data: (_e = this.mission) === null || _e === void 0 ? void 0 : _e.todo, showRecap: false, showTabs: false, forceReadonly: true, animated: this.animated }), !!((_h = (_g = (_f = this.mission) === null || _f === void 0 ? void 0 : _f.todo) === null || _g === void 0 ? void 0 : _g.values) === null || _h === void 0 ? void 0 : _h.length) && [
|
31
31
|
(!!((_j = this.mission.todo.description) === null || _j === void 0 ? void 0 : _j.length) && !!((_k = this.mission.todo.documents) === null || _k === void 0 ? void 0 : _k.length) || !this.isTodoCampaign) &&
|
32
32
|
h("div", { class: { 'line': true, 'todo-campaign': this.isTodoCampaign } }),
|
33
|
-
h("yoo-form-todo-mission", { ref: (el) => (this.formTodoMission = el), values: (_m = (_l = this.mission) === null || _l === void 0 ? void 0 : _l.todo) === null || _m === void 0 ? void 0 : _m.values,
|
33
|
+
h("yoo-form-todo-mission", { ref: (el) => (this.formTodoMission = el), values: (_m = (_l = this.mission) === null || _l === void 0 ? void 0 : _l.todo) === null || _m === void 0 ? void 0 : _m.values, currentUser: this.currentUser, assigneeId: (_o = this.mission) === null || _o === void 0 ? void 0 : _o.ownerRef, overallDuedate: (_p = this.mission) === null || _p === void 0 ? void 0 : _p.duedate, readonly: this.readonly, completed: ((_q = this.mission) === null || _q === void 0 ? void 0 : _q.status) === 'finished', onAssignUser: (ev) => { var _a; return this.assignTask.emit((_a = ev.detail) === null || _a === void 0 ? void 0 : _a.task); }, onSchedule: (ev) => this.onUpdateTask(ev, true), onUpdate: (ev) => this.onUpdateTask(ev, false) })
|
34
34
|
]));
|
35
35
|
}
|
36
36
|
static get is() { return "yoo-mission-todo"; }
|
@@ -67,7 +67,7 @@ export class YooMissionTodoComponent {
|
|
67
67
|
"text": ""
|
68
68
|
}
|
69
69
|
},
|
70
|
-
"
|
70
|
+
"currentUser": {
|
71
71
|
"type": "unknown",
|
72
72
|
"mutable": false,
|
73
73
|
"complexType": {
|