@bizdoc/core 1.13.28 → 1.13.31

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.
@@ -2113,6 +2113,7 @@ const STRINGS = {
2113
2113
  ReplyingTo: '{0} replying to {1}',
2114
2114
  YouRepliedTo: 'You replied {0}',
2115
2115
  ReplyingToYou: '{0} in reply to you',
2116
+ YouBy: 'You by {0}',
2116
2117
  ByYou: '{0} by you',
2117
2118
  ActionBy: '{0} by {1}',
2118
2119
  ActionByBy: '{0} by {1} on behalf of {2}',
@@ -2369,6 +2370,7 @@ const STRINGS = {
2369
2370
  ChatHelp: 'Communicate with other users privately',
2370
2371
  ShowAs: 'Show as {0}',
2371
2372
  Unauthorized: 'Unauthorized access',
2373
+ NotAcceptable: 'Unauthorized access',
2372
2374
  LicenseErr: 'License',
2373
2375
  RemoveAsk: 'Are you sure?',
2374
2376
  Comments: 'Comments',
@@ -2507,6 +2509,7 @@ const STRINGS = {
2507
2509
  Color: 'צבע',
2508
2510
  FontSize: 'גודל פונט',
2509
2511
  Unauthorized: 'לא מורשה',
2512
+ NotAcceptable: 'לא מורשה',
2510
2513
  Add: 'הוסף/י',
2511
2514
  Check: 'בחר/י',
2512
2515
  Help: 'עזרה',
@@ -2800,6 +2803,9 @@ const STRINGS = {
2800
2803
  YouRepliedTo: '{0}השבת ל',
2801
2804
  ReplyingToYou: '{0} השיב לך',
2802
2805
  ByYou: '{0} דרכך',
2806
+ YouByMale: 'אתה דרך {0}',
2807
+ YouByFemale: 'את דרך {0}',
2808
+ YouBy: 'את/ה דרך {0}',
2803
2809
  ActionByYou: '{0} דרכך',
2804
2810
  ActionByBy: '{0} דרך {1} בשם {2}',
2805
2811
  ActionBy: '{0} דרך {1}',
@@ -6631,7 +6637,7 @@ function errResource(error) {
6631
6637
  case 426:
6632
6638
  return 'LicenseErr';
6633
6639
  case 406:
6634
- return 'Unauthorized';
6640
+ return 'NotAcceptable';
6635
6641
  }
6636
6642
  return null;
6637
6643
  }
@@ -13545,7 +13551,11 @@ class WorkflowComponent {
13545
13551
  this.diagram.serializationSettings = {};
13546
13552
  const obj = JSON.parse(this.diagram.saveDiagram());
13547
13553
  this._form.workflow.connectors = obj.connectors;
13548
- this._form.workflow.nodes = obj.nodes.filter(n => n.id !== 'version');
13554
+ this._form.workflow.nodes = obj.nodes.filter(n => n.id !== 'version').map((n) => {
13555
+ n.offsetX = Math.round(n.offsetX);
13556
+ n.offsetY = Math.round(n.offsetY);
13557
+ return n;
13558
+ });
13549
13559
  this.saving = true;
13550
13560
  return this._service.save(this._form).toPromise().then(v => {
13551
13561
  this.ps.toast('ChangesSaved');
@@ -13967,7 +13977,7 @@ class FlowViewComponent extends TraceBase {
13967
13977
  content: this._tooltip(tooltip),
13968
13978
  position: 'TopCenter'
13969
13979
  },
13970
- constraints: NodeConstraints.Default | NodeConstraints.Tooltip,
13980
+ constraints: Object.keys(tooltip).length ? NodeConstraints.Default : NodeConstraints.Default & ~NodeConstraints.Tooltip,
13971
13981
  addInfo: {
13972
13982
  tooltip,
13973
13983
  recipient,
@@ -14442,7 +14452,6 @@ class TraceViewComponent extends TraceBase {
14442
14452
  sameDay: `[${this._translate.get('Today')}] HH:mm`,
14443
14453
  sameElse: 'MMM D HH:mm'
14444
14454
  };
14445
- this._showMode = 'everything';
14446
14455
  this._showMode = localStorage.getItem('traceMode') || 'everything';
14447
14456
  }
14448
14457
  ngOnChanges(_changes) {
@@ -14451,11 +14460,15 @@ class TraceViewComponent extends TraceBase {
14451
14460
  async _initialize() {
14452
14461
  const { issued, log, recipients, attachments } = this.model;
14453
14462
  const me = this;
14463
+ /**
14464
+ * account info as promise
14465
+ * @param id
14466
+ */
14454
14467
  function profileOf(id) {
14455
14468
  return me._accounts.get(id).toPromise();
14456
14469
  }
14457
14470
  /**
14458
- * user name, chat anchor tag or You
14471
+ * user name, chat anchor tag
14459
14472
  * @param user
14460
14473
  */
14461
14474
  function nameOf(user) {
@@ -14527,38 +14540,44 @@ class TraceViewComponent extends TraceBase {
14527
14540
  step.role = this._roleName(recipient.role);
14528
14541
  step.fyi = recipient.fyi;
14529
14542
  if (recipient.substituteId) {
14530
- let substituting = await profileOf(recipient.substituteId);
14531
14543
  if (recipient.byId) {
14532
- if (recipient.byId === this._session.userId) {
14544
+ if (recipient.byId === this._session.userId && !this._session.isImpersonating) {
14533
14545
  let who = await profileOf(recipient.userId);
14534
- if (recipient.substituteId === this._session.userId)
14546
+ if (recipient.substituteId === this._session.userId && !this._session.isImpersonating)
14535
14547
  step.name = this._translate.get('ByYou', nameOf(who));
14536
- else
14548
+ else {
14549
+ let substituting = await profileOf(recipient.substituteId);
14537
14550
  step.name = this._translate.personalize('SubstitutingByYou', who.gender, nameOf(who), nameOf(substituting));
14551
+ }
14538
14552
  if (action)
14539
14553
  step.action = await actionBy(action, You, recipient.id);
14540
14554
  }
14541
14555
  else {
14542
14556
  let by = await profileOf(recipient.byId);
14543
14557
  let who = await profileOf(recipient.userId);
14558
+ let substituting = await profileOf(recipient.substituteId);
14544
14559
  step.name = this._translate.get('SubstitutingBy', nameOf(who), nameOf(substituting), nameOf(by));
14545
14560
  if (by.role)
14546
14561
  step.role = by.role;
14547
14562
  if (action)
14548
- step.action = await actionBy(action, by.gender);
14563
+ step.action = await actionBy(action, by.gender, recipient.id);
14549
14564
  }
14550
14565
  }
14551
14566
  else {
14552
- let who = await profileOf(recipient.userId);
14553
- if (recipient.substituteId === this._session.userId) {
14554
- step.name = this._translate.personalize('SubstitutingForYou', who.gender, nameOf(who));
14567
+ if (recipient.userId === this._session.userId && !this._session.isImpersonating) {
14568
+ let substituting = await profileOf(recipient.substituteId);
14569
+ step.name = this._translate.personalize('YouSubstitute', this._session.profile.byGender, nameOf(substituting));
14570
+ if (action)
14571
+ step.action = await actionBy(action, this._session.gender, recipient.id);
14555
14572
  }
14556
- else if (recipient.userId === this._session.userId) {
14557
- step.name = this._translate.personalize('YouSubstitute', this._session.profile.byGender, nameOf(who));
14573
+ else if (recipient.substituteId === this._session.userId && !this._session.isImpersonating) {
14574
+ let who = await profileOf(recipient.userId);
14575
+ step.name = this._translate.personalize('SubstitutingForYou', who.gender, nameOf(who));
14558
14576
  if (action)
14559
14577
  step.action = await actionBy(action, who.gender, recipient.id);
14560
14578
  }
14561
14579
  else {
14580
+ let who = await profileOf(recipient.userId), substituting = await profileOf(recipient.substituteId);
14562
14581
  step.name = this._translate.personalize('Substituting', who.gender, nameOf(who), nameOf(substituting));
14563
14582
  if (who.role)
14564
14583
  step.role = who.role;
@@ -14568,20 +14587,35 @@ class TraceViewComponent extends TraceBase {
14568
14587
  }
14569
14588
  }
14570
14589
  else if (recipient.byId) {
14571
- let who = await profileOf(recipient.userId), by = await profileOf(recipient.byId);
14572
- if (recipient.byId === this._session.userId)
14573
- step.name = this._translate.get('ByYou', nameOf(who));
14590
+ if (recipient.userId === this._session.userId && !this._session.isImpersonating) {
14591
+ let by = await profileOf(recipient.byId);
14592
+ step.name = this._translate.get('YouBy', nameOf(by));
14593
+ if (action)
14594
+ step.action = await actionBy(action, by.gender, recipient.id);
14595
+ }
14574
14596
  else {
14575
- step.name = this._translate.get('By', nameOf(who), nameOf(by));
14576
- if (by.role)
14577
- step.role = by.role;
14597
+ let who = await profileOf(recipient.userId);
14598
+ if (recipient.byId === this._session.userId && !this._session.isImpersonating) {
14599
+ step.name = this._translate.get('ByYou', nameOf(who));
14600
+ if (action)
14601
+ step.action = await actionBy(action, You, recipient.id);
14602
+ }
14603
+ else {
14604
+ let by = await profileOf(recipient.byId);
14605
+ step.name = this._translate.get('By', nameOf(who), nameOf(by));
14606
+ if (by.role)
14607
+ step.role = by.role;
14608
+ if (action)
14609
+ step.action = await actionBy(action, by.gender, recipient.id);
14610
+ }
14578
14611
  }
14579
- if (action)
14580
- step.action = await actionBy(action, by.gender, recipient.id);
14581
14612
  }
14582
14613
  else {
14583
- if (recipient.userId === this._session.userId)
14614
+ if (recipient.userId === this._session.userId && !this._session.isImpersonating) {
14584
14615
  step.name = this._translate.get('You');
14616
+ if (action)
14617
+ step.action = await actionBy(action, You, recipient.id);
14618
+ }
14585
14619
  else {
14586
14620
  let who = await profileOf(recipient.userId);
14587
14621
  step.name = nameOf(who);
@@ -14593,15 +14627,27 @@ class TraceViewComponent extends TraceBase {
14593
14627
  }
14594
14628
  }
14595
14629
  else {
14596
- if (l.userId === this._session.profile.userId)
14597
- step.name = this._session.isImpersonating ? this._session.profile.name : this._translate.get('You');
14630
+ if (l.userId === this._session.profile.userId) {
14631
+ if (this._session.isImpersonating) {
14632
+ if (l.userId === this._session.profile.byId)
14633
+ step.name = this._translate.get('ByYou', this._session.profile.name);
14634
+ else
14635
+ step.name = this._session.profile.name;
14636
+ }
14637
+ else
14638
+ step.name = this._translate.get('You');
14639
+ }
14598
14640
  else {
14599
14641
  let who = await profileOf(l.userId);
14600
14642
  if (who.role)
14601
14643
  step.role = who.role;
14602
14644
  if (l.byId) {
14603
- let by = await profileOf(l.byId);
14604
- step.name = this._translate.get('By', nameOf(who), nameOf(by));
14645
+ if (l.byId === this._session.profile.byId)
14646
+ step.name = this._translate.get('ByYou', nameOf(who));
14647
+ else {
14648
+ let by = await profileOf(l.byId);
14649
+ step.name = this._translate.get('By', nameOf(who), nameOf(by));
14650
+ }
14605
14651
  }
14606
14652
  else
14607
14653
  step.name = nameOf(who);
@@ -14712,8 +14758,7 @@ class TraceViewComponent extends TraceBase {
14712
14758
  this.data = this._data.filter(l => l.time >= this.model.issued);
14713
14759
  break;
14714
14760
  case 'route':
14715
- this.data = this._data.filter(l => l.type === 'ActionTaken'
14716
- || l.type === 'Estimate' || l.type === 'Pending');
14761
+ this.data = this._data.filter(l => l.type === 'ActionTaken' || l.type === 'Estimate' || l.type === 'Pending');
14717
14762
  break;
14718
14763
  default:
14719
14764
  this.data = this._data;
@@ -20840,7 +20885,10 @@ let AssignActionComponent = class AssignActionComponent {
20840
20885
  const me = this._session.userId;
20841
20886
  this.users$ = this.userIds.valueChanges.
20842
20887
  pipe(debounceTime$1(200), takeUntil(this._destroy), switchMap(v => this._accounts.findAll(v, { take: 20 }).
20843
- pipe(map(r => r.filter(u => u.id !== me)))));
20888
+ pipe(map(r => {
20889
+ const userIds = this.form.controls['userIds'].value || [];
20890
+ return r.filter(u => u.id !== me && userIds.indexOf(u.id) < 0);
20891
+ }))));
20844
20892
  }
20845
20893
  /**
20846
20894
  *
@@ -22094,6 +22142,7 @@ let CompareDepartmentsWidget = CompareDepartmentsWidget_1 = class CompareDepartm
22094
22142
  labelStyle: {
22095
22143
  size: '0px'
22096
22144
  },
22145
+ title: this._translate.get('Duration'),
22097
22146
  lineStyle: { width: 0 },
22098
22147
  minorTickLines: { width: 0 }
22099
22148
  };
@@ -26732,7 +26781,11 @@ let CubeCompareWidget = CubeCompareWidget_1 = class CubeCompareWidget {
26732
26781
  skeleton: 'duration',
26733
26782
  labelStyle: {
26734
26783
  size: '0px'
26784
+ }, visible: true,
26785
+ titleStyle: {
26786
+ fontFamily: FONT_FAMILY
26735
26787
  },
26788
+ title: this._translate.get('Duration'),
26736
26789
  lineStyle: { width: 0 },
26737
26790
  minorTickLines: { width: 0 }
26738
26791
  };