@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.
@@ -2118,6 +2118,7 @@ const STRINGS = {
2118
2118
  ReplyingTo: '{0} replying to {1}',
2119
2119
  YouRepliedTo: 'You replied {0}',
2120
2120
  ReplyingToYou: '{0} in reply to you',
2121
+ YouBy: 'You by {0}',
2121
2122
  ByYou: '{0} by you',
2122
2123
  ActionBy: '{0} by {1}',
2123
2124
  ActionByBy: '{0} by {1} on behalf of {2}',
@@ -2374,6 +2375,7 @@ const STRINGS = {
2374
2375
  ChatHelp: 'Communicate with other users privately',
2375
2376
  ShowAs: 'Show as {0}',
2376
2377
  Unauthorized: 'Unauthorized access',
2378
+ NotAcceptable: 'Unauthorized access',
2377
2379
  LicenseErr: 'License',
2378
2380
  RemoveAsk: 'Are you sure?',
2379
2381
  Comments: 'Comments',
@@ -2512,6 +2514,7 @@ const STRINGS = {
2512
2514
  Color: 'צבע',
2513
2515
  FontSize: 'גודל פונט',
2514
2516
  Unauthorized: 'לא מורשה',
2517
+ NotAcceptable: 'לא מורשה',
2515
2518
  Add: 'הוסף/י',
2516
2519
  Check: 'בחר/י',
2517
2520
  Help: 'עזרה',
@@ -2805,6 +2808,9 @@ const STRINGS = {
2805
2808
  YouRepliedTo: '{0}השבת ל',
2806
2809
  ReplyingToYou: '{0} השיב לך',
2807
2810
  ByYou: '{0} דרכך',
2811
+ YouByMale: 'אתה דרך {0}',
2812
+ YouByFemale: 'את דרך {0}',
2813
+ YouBy: 'את/ה דרך {0}',
2808
2814
  ActionByYou: '{0} דרכך',
2809
2815
  ActionByBy: '{0} דרך {1} בשם {2}',
2810
2816
  ActionBy: '{0} דרך {1}',
@@ -6655,7 +6661,7 @@ function errResource(error) {
6655
6661
  case 426:
6656
6662
  return 'LicenseErr';
6657
6663
  case 406:
6658
- return 'Unauthorized';
6664
+ return 'NotAcceptable';
6659
6665
  }
6660
6666
  return null;
6661
6667
  }
@@ -13608,7 +13614,11 @@ class WorkflowComponent {
13608
13614
  this.diagram.serializationSettings = {};
13609
13615
  const obj = JSON.parse(this.diagram.saveDiagram());
13610
13616
  this._form.workflow.connectors = obj.connectors;
13611
- this._form.workflow.nodes = obj.nodes.filter(n => n.id !== 'version');
13617
+ this._form.workflow.nodes = obj.nodes.filter(n => n.id !== 'version').map((n) => {
13618
+ n.offsetX = Math.round(n.offsetX);
13619
+ n.offsetY = Math.round(n.offsetY);
13620
+ return n;
13621
+ });
13612
13622
  this.saving = true;
13613
13623
  return this._service.save(this._form).toPromise().then(v => {
13614
13624
  this.ps.toast('ChangesSaved');
@@ -14033,7 +14043,7 @@ class FlowViewComponent extends TraceBase {
14033
14043
  content: this._tooltip(tooltip),
14034
14044
  position: 'TopCenter'
14035
14045
  },
14036
- constraints: NodeConstraints.Default | NodeConstraints.Tooltip,
14046
+ constraints: Object.keys(tooltip).length ? NodeConstraints.Default : NodeConstraints.Default & ~NodeConstraints.Tooltip,
14037
14047
  addInfo: {
14038
14048
  tooltip,
14039
14049
  recipient,
@@ -14515,7 +14525,6 @@ class TraceViewComponent extends TraceBase {
14515
14525
  sameDay: `[${this._translate.get('Today')}] HH:mm`,
14516
14526
  sameElse: 'MMM D HH:mm'
14517
14527
  };
14518
- this._showMode = 'everything';
14519
14528
  this._showMode = localStorage.getItem('traceMode') || 'everything';
14520
14529
  }
14521
14530
  ngOnChanges(_changes) {
@@ -14528,11 +14537,15 @@ class TraceViewComponent extends TraceBase {
14528
14537
  return __awaiter(this, void 0, void 0, function* () {
14529
14538
  const { issued, log, recipients, attachments } = this.model;
14530
14539
  const me = this;
14540
+ /**
14541
+ * account info as promise
14542
+ * @param id
14543
+ */
14531
14544
  function profileOf(id) {
14532
14545
  return me._accounts.get(id).toPromise();
14533
14546
  }
14534
14547
  /**
14535
- * user name, chat anchor tag or You
14548
+ * user name, chat anchor tag
14536
14549
  * @param user
14537
14550
  */
14538
14551
  function nameOf(user) {
@@ -14606,38 +14619,44 @@ class TraceViewComponent extends TraceBase {
14606
14619
  step.role = this._roleName(recipient.role);
14607
14620
  step.fyi = recipient.fyi;
14608
14621
  if (recipient.substituteId) {
14609
- let substituting = yield profileOf(recipient.substituteId);
14610
14622
  if (recipient.byId) {
14611
- if (recipient.byId === this._session.userId) {
14623
+ if (recipient.byId === this._session.userId && !this._session.isImpersonating) {
14612
14624
  let who = yield profileOf(recipient.userId);
14613
- if (recipient.substituteId === this._session.userId)
14625
+ if (recipient.substituteId === this._session.userId && !this._session.isImpersonating)
14614
14626
  step.name = this._translate.get('ByYou', nameOf(who));
14615
- else
14627
+ else {
14628
+ let substituting = yield profileOf(recipient.substituteId);
14616
14629
  step.name = this._translate.personalize('SubstitutingByYou', who.gender, nameOf(who), nameOf(substituting));
14630
+ }
14617
14631
  if (action)
14618
14632
  step.action = yield actionBy(action, You, recipient.id);
14619
14633
  }
14620
14634
  else {
14621
14635
  let by = yield profileOf(recipient.byId);
14622
14636
  let who = yield profileOf(recipient.userId);
14637
+ let substituting = yield profileOf(recipient.substituteId);
14623
14638
  step.name = this._translate.get('SubstitutingBy', nameOf(who), nameOf(substituting), nameOf(by));
14624
14639
  if (by.role)
14625
14640
  step.role = by.role;
14626
14641
  if (action)
14627
- step.action = yield actionBy(action, by.gender);
14642
+ step.action = yield actionBy(action, by.gender, recipient.id);
14628
14643
  }
14629
14644
  }
14630
14645
  else {
14631
- let who = yield profileOf(recipient.userId);
14632
- if (recipient.substituteId === this._session.userId) {
14633
- step.name = this._translate.personalize('SubstitutingForYou', who.gender, nameOf(who));
14646
+ if (recipient.userId === this._session.userId && !this._session.isImpersonating) {
14647
+ let substituting = yield profileOf(recipient.substituteId);
14648
+ step.name = this._translate.personalize('YouSubstitute', this._session.profile.byGender, nameOf(substituting));
14649
+ if (action)
14650
+ step.action = yield actionBy(action, this._session.gender, recipient.id);
14634
14651
  }
14635
- else if (recipient.userId === this._session.userId) {
14636
- step.name = this._translate.personalize('YouSubstitute', this._session.profile.byGender, nameOf(who));
14652
+ else if (recipient.substituteId === this._session.userId && !this._session.isImpersonating) {
14653
+ let who = yield profileOf(recipient.userId);
14654
+ step.name = this._translate.personalize('SubstitutingForYou', who.gender, nameOf(who));
14637
14655
  if (action)
14638
14656
  step.action = yield actionBy(action, who.gender, recipient.id);
14639
14657
  }
14640
14658
  else {
14659
+ let who = yield profileOf(recipient.userId), substituting = yield profileOf(recipient.substituteId);
14641
14660
  step.name = this._translate.personalize('Substituting', who.gender, nameOf(who), nameOf(substituting));
14642
14661
  if (who.role)
14643
14662
  step.role = who.role;
@@ -14647,20 +14666,35 @@ class TraceViewComponent extends TraceBase {
14647
14666
  }
14648
14667
  }
14649
14668
  else if (recipient.byId) {
14650
- let who = yield profileOf(recipient.userId), by = yield profileOf(recipient.byId);
14651
- if (recipient.byId === this._session.userId)
14652
- step.name = this._translate.get('ByYou', nameOf(who));
14669
+ if (recipient.userId === this._session.userId && !this._session.isImpersonating) {
14670
+ let by = yield profileOf(recipient.byId);
14671
+ step.name = this._translate.get('YouBy', nameOf(by));
14672
+ if (action)
14673
+ step.action = yield actionBy(action, by.gender, recipient.id);
14674
+ }
14653
14675
  else {
14654
- step.name = this._translate.get('By', nameOf(who), nameOf(by));
14655
- if (by.role)
14656
- step.role = by.role;
14676
+ let who = yield profileOf(recipient.userId);
14677
+ if (recipient.byId === this._session.userId && !this._session.isImpersonating) {
14678
+ step.name = this._translate.get('ByYou', nameOf(who));
14679
+ if (action)
14680
+ step.action = yield actionBy(action, You, recipient.id);
14681
+ }
14682
+ else {
14683
+ let by = yield profileOf(recipient.byId);
14684
+ step.name = this._translate.get('By', nameOf(who), nameOf(by));
14685
+ if (by.role)
14686
+ step.role = by.role;
14687
+ if (action)
14688
+ step.action = yield actionBy(action, by.gender, recipient.id);
14689
+ }
14657
14690
  }
14658
- if (action)
14659
- step.action = yield actionBy(action, by.gender, recipient.id);
14660
14691
  }
14661
14692
  else {
14662
- if (recipient.userId === this._session.userId)
14693
+ if (recipient.userId === this._session.userId && !this._session.isImpersonating) {
14663
14694
  step.name = this._translate.get('You');
14695
+ if (action)
14696
+ step.action = yield actionBy(action, You, recipient.id);
14697
+ }
14664
14698
  else {
14665
14699
  let who = yield profileOf(recipient.userId);
14666
14700
  step.name = nameOf(who);
@@ -14672,15 +14706,27 @@ class TraceViewComponent extends TraceBase {
14672
14706
  }
14673
14707
  }
14674
14708
  else {
14675
- if (l.userId === this._session.profile.userId)
14676
- step.name = this._session.isImpersonating ? this._session.profile.name : this._translate.get('You');
14709
+ if (l.userId === this._session.profile.userId) {
14710
+ if (this._session.isImpersonating) {
14711
+ if (l.userId === this._session.profile.byId)
14712
+ step.name = this._translate.get('ByYou', this._session.profile.name);
14713
+ else
14714
+ step.name = this._session.profile.name;
14715
+ }
14716
+ else
14717
+ step.name = this._translate.get('You');
14718
+ }
14677
14719
  else {
14678
14720
  let who = yield profileOf(l.userId);
14679
14721
  if (who.role)
14680
14722
  step.role = who.role;
14681
14723
  if (l.byId) {
14682
- let by = yield profileOf(l.byId);
14683
- step.name = this._translate.get('By', nameOf(who), nameOf(by));
14724
+ if (l.byId === this._session.profile.byId)
14725
+ step.name = this._translate.get('ByYou', nameOf(who));
14726
+ else {
14727
+ let by = yield profileOf(l.byId);
14728
+ step.name = this._translate.get('By', nameOf(who), nameOf(by));
14729
+ }
14684
14730
  }
14685
14731
  else
14686
14732
  step.name = nameOf(who);
@@ -14792,8 +14838,7 @@ class TraceViewComponent extends TraceBase {
14792
14838
  this.data = this._data.filter(l => l.time >= this.model.issued);
14793
14839
  break;
14794
14840
  case 'route':
14795
- this.data = this._data.filter(l => l.type === 'ActionTaken'
14796
- || l.type === 'Estimate' || l.type === 'Pending');
14841
+ this.data = this._data.filter(l => l.type === 'ActionTaken' || l.type === 'Estimate' || l.type === 'Pending');
14797
14842
  break;
14798
14843
  default:
14799
14844
  this.data = this._data;
@@ -20979,7 +21024,10 @@ let AssignActionComponent = class AssignActionComponent {
20979
21024
  const me = this._session.userId;
20980
21025
  this.users$ = this.userIds.valueChanges.
20981
21026
  pipe(debounceTime$1(200), takeUntil(this._destroy), switchMap(v => this._accounts.findAll(v, { take: 20 }).
20982
- pipe(map(r => r.filter(u => u.id !== me)))));
21027
+ pipe(map(r => {
21028
+ const userIds = this.form.controls['userIds'].value || [];
21029
+ return r.filter(u => u.id !== me && userIds.indexOf(u.id) < 0);
21030
+ }))));
20983
21031
  }
20984
21032
  /**
20985
21033
  *
@@ -22243,6 +22291,7 @@ let CompareDepartmentsWidget = CompareDepartmentsWidget_1 = class CompareDepartm
22243
22291
  labelStyle: {
22244
22292
  size: '0px'
22245
22293
  },
22294
+ title: this._translate.get('Duration'),
22246
22295
  lineStyle: { width: 0 },
22247
22296
  minorTickLines: { width: 0 }
22248
22297
  };
@@ -26919,7 +26968,11 @@ let CubeCompareWidget = CubeCompareWidget_1 = class CubeCompareWidget {
26919
26968
  skeleton: 'duration',
26920
26969
  labelStyle: {
26921
26970
  size: '0px'
26971
+ }, visible: true,
26972
+ titleStyle: {
26973
+ fontFamily: FONT_FAMILY
26922
26974
  },
26975
+ title: this._translate.get('Duration'),
26923
26976
  lineStyle: { width: 0 },
26924
26977
  minorTickLines: { width: 0 }
26925
26978
  };