@bizdoc/core 1.13.0-next.7 → 1.13.0-next.8

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.
@@ -13740,99 +13740,104 @@ class FlowViewComponent extends TraceBase {
13740
13740
  const tooltip = {};
13741
13741
  let annotation;
13742
13742
  // you
13743
- if ((recipient.byId || recipient.userId) === this._session.userId) {
13744
- annotation = this._session.isImpersonating ? this._session.profile.name : this._translate.get('You');
13745
- if (recipient.replied) {
13746
- const time = this._fromNow(recipient.replied);
13747
- if (recipient.byId) {
13748
- if (recipient.byId === this._session.profile.byId) {
13749
- const action = this._action(recipient.action, this._session.gender);
13743
+ if (recipient.userId === this._session.userId) {
13744
+ if (this._session.isImpersonating)
13745
+ annotation = this._session.profile.name;
13746
+ else
13747
+ annotation = this._translate.get('You');
13748
+ if (recipient.role) {
13749
+ const role = this._session.profile.roles.find(o => o.name === recipient.role);
13750
+ if (role)
13751
+ tooltip.role = `- ${role.title}`;
13752
+ }
13753
+ }
13754
+ else
13755
+ // someone else
13756
+ {
13757
+ const who = yield this._accounts.get(recipient.userId).toPromise();
13758
+ annotation = who.name;
13759
+ if (who.role)
13760
+ tooltip.role = `- ${who.role}`;
13761
+ else if (recipient.role) {
13762
+ const role = this._session.profile.roles.find(o => o.name === recipient.role);
13763
+ if (role)
13764
+ tooltip.role = `- ${role.title}`;
13765
+ }
13766
+ }
13767
+ if (recipient.replied) {
13768
+ const time = this._fromNow(recipient.replied);
13769
+ if (recipient.byId) {
13770
+ if (recipient.byId === this._session.profile.byId) {
13771
+ const action = this._action(recipient.action, this._session.gender);
13772
+ if (recipient.toId) {
13773
+ const to = yield this._accounts.get(recipient.toId).toPromise();
13774
+ tooltip.note = this._translate.get('ActionTakenByYouTo', action, to.name, this._session.profile.name, time);
13775
+ }
13776
+ else
13777
+ tooltip.note = this._translate.get('ActionTakenByYou', action, this._session.profile.name, time);
13778
+ }
13779
+ else {
13780
+ const by = yield this._accounts.get(recipient.byId).toPromise();
13781
+ const action = this._action(recipient.action, by.gender);
13782
+ if (recipient.userId === this._session.profile.userId) {
13750
13783
  if (recipient.toId) {
13751
13784
  const to = yield this._accounts.get(recipient.toId).toPromise();
13752
- tooltip.note = this._translate.get('ActionTakenByYouTo', action, to.name, this._session.profile.name, time);
13785
+ tooltip.note = this._translate.get('YouTakenActionByTo', by.name, action, to.name, time);
13753
13786
  }
13754
13787
  else
13755
- tooltip.note = this._translate.get('ActionTakenByYou', action, this._session.profile.name, time);
13788
+ tooltip.note = this._translate.get('YouTakenActionBy', by.name, action, time);
13756
13789
  }
13757
13790
  else {
13758
- const by = yield this._accounts.get(recipient.byId).toPromise();
13759
- const action = this._action(recipient.action, by.gender);
13791
+ const who = yield this._accounts.get(recipient.userId).toPromise();
13760
13792
  if (recipient.toId) {
13761
13793
  const to = yield this._accounts.get(recipient.toId).toPromise();
13762
- tooltip.note = this._translate.get('YouTakenActionByTo', by.name, action, to.name, time);
13794
+ tooltip.note = this._translate.get('ActionTakenByTo', by.name, action, to.name, who.name, time);
13763
13795
  }
13764
13796
  else
13765
- tooltip.note = this._translate.get('YouTakenActionBy', by.name, action, time);
13797
+ tooltip.note = this._translate.get('ActionTakenBy', by.name, action, who.name, time);
13766
13798
  }
13767
13799
  }
13768
- else if (recipient.toId) {
13769
- const to = yield this._accounts.get(recipient.toId).toPromise();
13800
+ }
13801
+ else if (recipient.toId) {
13802
+ const to = yield this._accounts.get(recipient.toId).toPromise();
13803
+ if (recipient.userId === this._session.profile.userId) {
13770
13804
  const action = this._action(recipient.action, this._session.profile.gender);
13771
13805
  if (this._session.isImpersonating)
13772
13806
  tooltip.note = this._translate.get('ActionTakenTo', this._session.profile.name, action, to.name, time);
13773
13807
  else
13774
13808
  tooltip.note = this._translate.get('YouTakenActionTo', action, to.name, time);
13775
13809
  }
13776
- else if (this._session.isImpersonating) {
13777
- const action = this._action(recipient.action, this._session.profile.gender);
13778
- tooltip.note = this._translate.get('ActionTaken', this._session.profile.name, action, time);
13779
- }
13780
13810
  else {
13781
- const action = this._action(recipient.action, You);
13782
- tooltip.note = this._translate.get('YouTakenAction', action, time);
13811
+ const who = yield this._accounts.get(recipient.userId).toPromise();
13812
+ const action = this._action(recipient.action, who.gender);
13813
+ tooltip.note = this._translate.get('ActionTakenTo', who.name, action, to.name);
13783
13814
  }
13784
13815
  }
13785
- else if (!node.estimate) {
13786
- const time = this._fromNow(recipient.received);
13787
- if (this._session.isImpersonating)
13788
- tooltip.note = this._translate.personalize('ReceivedBy', this._session.profile.gender, this._session.profile.name, time);
13789
- else
13790
- tooltip.note = this._translate.get('YouReceived', time);
13816
+ else if (this._session.isImpersonating) {
13817
+ const action = this._action(recipient.action, this._session.profile.gender);
13818
+ tooltip.note = this._translate.get('ActionTaken', this._session.profile.name, action, time);
13791
13819
  }
13792
- if (recipient.role) {
13793
- const crole = this._session.profile.roles.find(o => o.name === recipient.role);
13794
- if (crole)
13795
- tooltip.role = `- ${crole.title}`;
13820
+ else if (recipient.userId === this._session.profile.userId) {
13821
+ const action = this._action(recipient.action, You);
13822
+ tooltip.note = this._translate.get('YouTakenAction', action, time);
13823
+ }
13824
+ else {
13825
+ const who = yield this._accounts.get(recipient.userId).toPromise();
13826
+ const action = this._action(recipient.action, who.gender);
13827
+ tooltip.note = this._translate.get('ActionTaken', who.name, action, time);
13796
13828
  }
13797
13829
  }
13798
- else
13799
- // someone else
13800
- {
13830
+ else if (!node.estimate) {
13831
+ const time = this._fromNow(recipient.received);
13832
+ if (this._session.isImpersonating)
13833
+ tooltip.note = this._translate.personalize('ReceivedBy', this._session.profile.gender, this._session.profile.name, time);
13834
+ else
13835
+ tooltip.note = this._translate.get('YouReceived', time);
13836
+ }
13837
+ else if (!recipient.estimate) {
13801
13838
  const who = yield this._accounts.get(recipient.userId).toPromise();
13802
- annotation = who.name;
13803
- if (who.role)
13804
- tooltip.role = `- ${who.role}`;
13805
- else if (recipient.role) {
13806
- const crole = this._session.profile.roles.find(o => o.name === recipient.role);
13807
- if (crole)
13808
- tooltip.role = `- ${crole.title}`;
13809
- }
13810
- if (recipient.replied) {
13811
- const time = this._fromNow(recipient.replied);
13812
- if (recipient.byId) {
13813
- const by = yield this._accounts.get(recipient.byId).toPromise();
13814
- const action = this._action(recipient.action, by.gender);
13815
- if (recipient.toId) {
13816
- const to = yield this._accounts.get(recipient.toId).toPromise();
13817
- tooltip.note = this._translate.get('ActionTakenByTo', by.name, action, to.name, who.name, time);
13818
- }
13819
- else
13820
- tooltip.note = this._translate.get('ActionTakenBy', by.name, action, who.name, time);
13821
- }
13822
- else if (recipient.toId) {
13823
- const to = yield this._accounts.get(recipient.toId).toPromise();
13824
- const action = this._action(recipient.action, who.gender);
13825
- tooltip.note = this._translate.get('ActionTakenTo', who.name, action, to.name);
13826
- }
13827
- else {
13828
- const action = this._action(recipient.action, who.gender);
13829
- tooltip.note = this._translate.get('ActionTaken', who.name, action, time);
13830
- }
13831
- }
13832
- else if (!recipient.estimate) {
13833
- const time = this._fromNow(recipient.received);
13834
- tooltip.note = this._translate.personalize('ReceivedTime', who.gender, time);
13835
- }
13839
+ const time = this._fromNow(recipient.received);
13840
+ tooltip.note = this._translate.personalize('ReceivedTime', who.gender, time);
13836
13841
  }
13837
13842
  if (recipient.substitutingId) {
13838
13843
  if (recipient.substitutingId === this._session.userId)