@smarterplan/ngx-smarterplan-admin 0.1.49 → 0.1.51
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/README.md +24 -24
- package/esm2020/lib/chevron/chevron.component.mjs +1 -1
- package/esm2020/lib/ngx-smarterplan-admin.service.mjs +1 -1
- package/esm2020/lib/organisation/organisation.component.mjs +1 -1
- package/esm2020/lib/user/form-mission/form-mission.component.mjs +26 -14
- package/esm2020/public-api.mjs +1 -1
- package/fesm2015/smarterplan-ngx-smarterplan-admin.mjs +22 -10
- package/fesm2015/smarterplan-ngx-smarterplan-admin.mjs.map +1 -1
- package/fesm2020/smarterplan-ngx-smarterplan-admin.mjs +22 -10
- package/fesm2020/smarterplan-ngx-smarterplan-admin.mjs.map +1 -1
- package/lib/user/form-mission/form-mission.component.d.ts +1 -1
- package/package.json +2 -2
|
@@ -298,12 +298,22 @@ class FormMissionComponent {
|
|
|
298
298
|
else {
|
|
299
299
|
this.initEmptyForm();
|
|
300
300
|
}
|
|
301
|
+
setTimeout(() => {
|
|
302
|
+
// this.zonesForSpace.forEach((element) => {
|
|
303
|
+
// console.log('this is my zones elements' + JSON.stringify(element));
|
|
304
|
+
// });
|
|
305
|
+
this.zonesForSpace.forEach((element) => {
|
|
306
|
+
console.log('this is my zones elements' + element.name);
|
|
307
|
+
});
|
|
308
|
+
console.log('this is my zones elements filtered' +
|
|
309
|
+
this.zonesForSpace.filter((zone) => !zone.audioID));
|
|
310
|
+
// console.log(' all my zones: ' + JSON.stringify(this.zonesForSpace));
|
|
311
|
+
}, 5000);
|
|
312
|
+
//.layer.name); ?? AUDIO
|
|
301
313
|
}
|
|
302
314
|
updateUserInfo() {
|
|
303
|
-
this.availableRoles =
|
|
304
|
-
|
|
305
|
-
this.availableLevels =
|
|
306
|
-
this.userService.getAvalableLevelsForCurrentUser();
|
|
315
|
+
this.availableRoles = this.userService.getAvailableRolesForCurrentUser();
|
|
316
|
+
this.availableLevels = this.userService.getAvalableLevelsForCurrentUser();
|
|
307
317
|
this.isGuide = this.userService.isGuide();
|
|
308
318
|
}
|
|
309
319
|
async setDomains() {
|
|
@@ -316,10 +326,10 @@ class FormMissionComponent {
|
|
|
316
326
|
this.availableHashtags = await this.hashtagService.getHashtagsForSpace(spaceID);
|
|
317
327
|
}
|
|
318
328
|
get spaceID() {
|
|
319
|
-
return this.missionForm.get(
|
|
329
|
+
return this.missionForm.get('space');
|
|
320
330
|
}
|
|
321
331
|
get role() {
|
|
322
|
-
return this.missionForm.get(
|
|
332
|
+
return this.missionForm.get('role');
|
|
323
333
|
}
|
|
324
334
|
async initFormForEdit() {
|
|
325
335
|
let startDate = null;
|
|
@@ -363,7 +373,7 @@ class FormMissionComponent {
|
|
|
363
373
|
this.defaultZone = zones.find((zone) => !zone.parentID);
|
|
364
374
|
const indexOfDefaultZone = zones.indexOf(this.defaultZone);
|
|
365
375
|
zones.splice(indexOfDefaultZone, 1);
|
|
366
|
-
this.zonesForSpace = zones;
|
|
376
|
+
this.zonesForSpace = zones.filter((zone) => !zone.audioID);
|
|
367
377
|
await this.setHashtags(this.spaceID.value);
|
|
368
378
|
}
|
|
369
379
|
async initEmptyForm() {
|
|
@@ -378,7 +388,7 @@ class FormMissionComponent {
|
|
|
378
388
|
orderedOrganisationID: this.currentUserOrganisation.id,
|
|
379
389
|
space: ['', Validators.required],
|
|
380
390
|
zone: [''],
|
|
381
|
-
description: [
|
|
391
|
+
description: ['', [textValidator(), noEmptyValidator()]],
|
|
382
392
|
domains: [null],
|
|
383
393
|
locale: [this.currentLocale],
|
|
384
394
|
startDate: [null, [floatValidator()]],
|
|
@@ -394,7 +404,8 @@ class FormMissionComponent {
|
|
|
394
404
|
}
|
|
395
405
|
}
|
|
396
406
|
hashtagAdded(hashtag) {
|
|
397
|
-
return (this.addedHashtags.find((_hashtag) => _hashtag.id === hashtag.id) !==
|
|
407
|
+
return (this.addedHashtags.find((_hashtag) => _hashtag.id === hashtag.id) !==
|
|
408
|
+
undefined);
|
|
398
409
|
}
|
|
399
410
|
removeHashtag(hashtag) {
|
|
400
411
|
this.addedHashtags.splice(this.addedHashtags.indexOf(hashtag), 1);
|
|
@@ -482,7 +493,8 @@ class FormMissionComponent {
|
|
|
482
493
|
const endDate = DateTime.fromMillis(dateHourEndNumber);
|
|
483
494
|
endDateString = endDate.toISO();
|
|
484
495
|
}
|
|
485
|
-
if (endDateString &&
|
|
496
|
+
if (endDateString &&
|
|
497
|
+
startDateString &&
|
|
486
498
|
endDateString <= startDateString) {
|
|
487
499
|
this.dateError = true;
|
|
488
500
|
resolve({ error: true });
|