@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.
@@ -312,13 +312,23 @@ class FormMissionComponent {
312
312
  else {
313
313
  this.initEmptyForm();
314
314
  }
315
+ setTimeout(() => {
316
+ // this.zonesForSpace.forEach((element) => {
317
+ // console.log('this is my zones elements' + JSON.stringify(element));
318
+ // });
319
+ this.zonesForSpace.forEach((element) => {
320
+ console.log('this is my zones elements' + element.name);
321
+ });
322
+ console.log('this is my zones elements filtered' +
323
+ this.zonesForSpace.filter((zone) => !zone.audioID));
324
+ // console.log(' all my zones: ' + JSON.stringify(this.zonesForSpace));
325
+ }, 5000);
326
+ //.layer.name); ?? AUDIO
315
327
  });
316
328
  }
317
329
  updateUserInfo() {
318
- this.availableRoles =
319
- this.userService.getAvailableRolesForCurrentUser();
320
- this.availableLevels =
321
- this.userService.getAvalableLevelsForCurrentUser();
330
+ this.availableRoles = this.userService.getAvailableRolesForCurrentUser();
331
+ this.availableLevels = this.userService.getAvalableLevelsForCurrentUser();
322
332
  this.isGuide = this.userService.isGuide();
323
333
  }
324
334
  setDomains() {
@@ -335,10 +345,10 @@ class FormMissionComponent {
335
345
  });
336
346
  }
337
347
  get spaceID() {
338
- return this.missionForm.get("space");
348
+ return this.missionForm.get('space');
339
349
  }
340
350
  get role() {
341
- return this.missionForm.get("role");
351
+ return this.missionForm.get('role');
342
352
  }
343
353
  initFormForEdit() {
344
354
  return __awaiter(this, void 0, void 0, function* () {
@@ -385,7 +395,7 @@ class FormMissionComponent {
385
395
  this.defaultZone = zones.find((zone) => !zone.parentID);
386
396
  const indexOfDefaultZone = zones.indexOf(this.defaultZone);
387
397
  zones.splice(indexOfDefaultZone, 1);
388
- this.zonesForSpace = zones;
398
+ this.zonesForSpace = zones.filter((zone) => !zone.audioID);
389
399
  yield this.setHashtags(this.spaceID.value);
390
400
  });
391
401
  }
@@ -402,7 +412,7 @@ class FormMissionComponent {
402
412
  orderedOrganisationID: this.currentUserOrganisation.id,
403
413
  space: ['', Validators.required],
404
414
  zone: [''],
405
- description: ["", [textValidator(), noEmptyValidator()]],
415
+ description: ['', [textValidator(), noEmptyValidator()]],
406
416
  domains: [null],
407
417
  locale: [this.currentLocale],
408
418
  startDate: [null, [floatValidator()]],
@@ -419,7 +429,8 @@ class FormMissionComponent {
419
429
  }
420
430
  }
421
431
  hashtagAdded(hashtag) {
422
- return (this.addedHashtags.find((_hashtag) => _hashtag.id === hashtag.id) !== undefined);
432
+ return (this.addedHashtags.find((_hashtag) => _hashtag.id === hashtag.id) !==
433
+ undefined);
423
434
  }
424
435
  removeHashtag(hashtag) {
425
436
  this.addedHashtags.splice(this.addedHashtags.indexOf(hashtag), 1);
@@ -509,7 +520,8 @@ class FormMissionComponent {
509
520
  const endDate = DateTime.fromMillis(dateHourEndNumber);
510
521
  endDateString = endDate.toISO();
511
522
  }
512
- if (endDateString && startDateString &&
523
+ if (endDateString &&
524
+ startDateString &&
513
525
  endDateString <= startDateString) {
514
526
  this.dateError = true;
515
527
  resolve({ error: true });