@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.
package/fesm2020/bizdoc-core.mjs
CHANGED
@@ -13676,99 +13676,104 @@ class FlowViewComponent extends TraceBase {
|
|
13676
13676
|
const tooltip = {};
|
13677
13677
|
let annotation;
|
13678
13678
|
// you
|
13679
|
-
if (
|
13680
|
-
|
13681
|
-
|
13682
|
-
|
13683
|
-
|
13684
|
-
|
13685
|
-
|
13679
|
+
if (recipient.userId === this._session.userId) {
|
13680
|
+
if (this._session.isImpersonating)
|
13681
|
+
annotation = this._session.profile.name;
|
13682
|
+
else
|
13683
|
+
annotation = this._translate.get('You');
|
13684
|
+
if (recipient.role) {
|
13685
|
+
const role = this._session.profile.roles.find(o => o.name === recipient.role);
|
13686
|
+
if (role)
|
13687
|
+
tooltip.role = `- ${role.title}`;
|
13688
|
+
}
|
13689
|
+
}
|
13690
|
+
else
|
13691
|
+
// someone else
|
13692
|
+
{
|
13693
|
+
const who = await this._accounts.get(recipient.userId).toPromise();
|
13694
|
+
annotation = who.name;
|
13695
|
+
if (who.role)
|
13696
|
+
tooltip.role = `- ${who.role}`;
|
13697
|
+
else if (recipient.role) {
|
13698
|
+
const role = this._session.profile.roles.find(o => o.name === recipient.role);
|
13699
|
+
if (role)
|
13700
|
+
tooltip.role = `- ${role.title}`;
|
13701
|
+
}
|
13702
|
+
}
|
13703
|
+
if (recipient.replied) {
|
13704
|
+
const time = this._fromNow(recipient.replied);
|
13705
|
+
if (recipient.byId) {
|
13706
|
+
if (recipient.byId === this._session.profile.byId) {
|
13707
|
+
const action = this._action(recipient.action, this._session.gender);
|
13708
|
+
if (recipient.toId) {
|
13709
|
+
const to = await this._accounts.get(recipient.toId).toPromise();
|
13710
|
+
tooltip.note = this._translate.get('ActionTakenByYouTo', action, to.name, this._session.profile.name, time);
|
13711
|
+
}
|
13712
|
+
else
|
13713
|
+
tooltip.note = this._translate.get('ActionTakenByYou', action, this._session.profile.name, time);
|
13714
|
+
}
|
13715
|
+
else {
|
13716
|
+
const by = await this._accounts.get(recipient.byId).toPromise();
|
13717
|
+
const action = this._action(recipient.action, by.gender);
|
13718
|
+
if (recipient.userId === this._session.profile.userId) {
|
13686
13719
|
if (recipient.toId) {
|
13687
13720
|
const to = await this._accounts.get(recipient.toId).toPromise();
|
13688
|
-
tooltip.note = this._translate.get('
|
13721
|
+
tooltip.note = this._translate.get('YouTakenActionByTo', by.name, action, to.name, time);
|
13689
13722
|
}
|
13690
13723
|
else
|
13691
|
-
tooltip.note = this._translate.get('
|
13724
|
+
tooltip.note = this._translate.get('YouTakenActionBy', by.name, action, time);
|
13692
13725
|
}
|
13693
13726
|
else {
|
13694
|
-
const
|
13695
|
-
const action = this._action(recipient.action, by.gender);
|
13727
|
+
const who = await this._accounts.get(recipient.userId).toPromise();
|
13696
13728
|
if (recipient.toId) {
|
13697
13729
|
const to = await this._accounts.get(recipient.toId).toPromise();
|
13698
|
-
tooltip.note = this._translate.get('
|
13730
|
+
tooltip.note = this._translate.get('ActionTakenByTo', by.name, action, to.name, who.name, time);
|
13699
13731
|
}
|
13700
13732
|
else
|
13701
|
-
tooltip.note = this._translate.get('
|
13733
|
+
tooltip.note = this._translate.get('ActionTakenBy', by.name, action, who.name, time);
|
13702
13734
|
}
|
13703
13735
|
}
|
13704
|
-
|
13705
|
-
|
13736
|
+
}
|
13737
|
+
else if (recipient.toId) {
|
13738
|
+
const to = await this._accounts.get(recipient.toId).toPromise();
|
13739
|
+
if (recipient.userId === this._session.profile.userId) {
|
13706
13740
|
const action = this._action(recipient.action, this._session.profile.gender);
|
13707
13741
|
if (this._session.isImpersonating)
|
13708
13742
|
tooltip.note = this._translate.get('ActionTakenTo', this._session.profile.name, action, to.name, time);
|
13709
13743
|
else
|
13710
13744
|
tooltip.note = this._translate.get('YouTakenActionTo', action, to.name, time);
|
13711
13745
|
}
|
13712
|
-
else if (this._session.isImpersonating) {
|
13713
|
-
const action = this._action(recipient.action, this._session.profile.gender);
|
13714
|
-
tooltip.note = this._translate.get('ActionTaken', this._session.profile.name, action, time);
|
13715
|
-
}
|
13716
13746
|
else {
|
13717
|
-
const
|
13718
|
-
|
13747
|
+
const who = await this._accounts.get(recipient.userId).toPromise();
|
13748
|
+
const action = this._action(recipient.action, who.gender);
|
13749
|
+
tooltip.note = this._translate.get('ActionTakenTo', who.name, action, to.name);
|
13719
13750
|
}
|
13720
13751
|
}
|
13721
|
-
else if (
|
13722
|
-
const
|
13723
|
-
|
13724
|
-
tooltip.note = this._translate.personalize('ReceivedBy', this._session.profile.gender, this._session.profile.name, time);
|
13725
|
-
else
|
13726
|
-
tooltip.note = this._translate.get('YouReceived', time);
|
13752
|
+
else if (this._session.isImpersonating) {
|
13753
|
+
const action = this._action(recipient.action, this._session.profile.gender);
|
13754
|
+
tooltip.note = this._translate.get('ActionTaken', this._session.profile.name, action, time);
|
13727
13755
|
}
|
13728
|
-
if (recipient.
|
13729
|
-
const
|
13730
|
-
|
13731
|
-
|
13756
|
+
else if (recipient.userId === this._session.profile.userId) {
|
13757
|
+
const action = this._action(recipient.action, You);
|
13758
|
+
tooltip.note = this._translate.get('YouTakenAction', action, time);
|
13759
|
+
}
|
13760
|
+
else {
|
13761
|
+
const who = await this._accounts.get(recipient.userId).toPromise();
|
13762
|
+
const action = this._action(recipient.action, who.gender);
|
13763
|
+
tooltip.note = this._translate.get('ActionTaken', who.name, action, time);
|
13732
13764
|
}
|
13733
13765
|
}
|
13734
|
-
else
|
13735
|
-
|
13736
|
-
|
13766
|
+
else if (!node.estimate) {
|
13767
|
+
const time = this._fromNow(recipient.received);
|
13768
|
+
if (this._session.isImpersonating)
|
13769
|
+
tooltip.note = this._translate.personalize('ReceivedBy', this._session.profile.gender, this._session.profile.name, time);
|
13770
|
+
else
|
13771
|
+
tooltip.note = this._translate.get('YouReceived', time);
|
13772
|
+
}
|
13773
|
+
else if (!recipient.estimate) {
|
13737
13774
|
const who = await this._accounts.get(recipient.userId).toPromise();
|
13738
|
-
|
13739
|
-
|
13740
|
-
tooltip.role = `- ${who.role}`;
|
13741
|
-
else if (recipient.role) {
|
13742
|
-
const crole = this._session.profile.roles.find(o => o.name === recipient.role);
|
13743
|
-
if (crole)
|
13744
|
-
tooltip.role = `- ${crole.title}`;
|
13745
|
-
}
|
13746
|
-
if (recipient.replied) {
|
13747
|
-
const time = this._fromNow(recipient.replied);
|
13748
|
-
if (recipient.byId) {
|
13749
|
-
const by = await this._accounts.get(recipient.byId).toPromise();
|
13750
|
-
const action = this._action(recipient.action, by.gender);
|
13751
|
-
if (recipient.toId) {
|
13752
|
-
const to = await this._accounts.get(recipient.toId).toPromise();
|
13753
|
-
tooltip.note = this._translate.get('ActionTakenByTo', by.name, action, to.name, who.name, time);
|
13754
|
-
}
|
13755
|
-
else
|
13756
|
-
tooltip.note = this._translate.get('ActionTakenBy', by.name, action, who.name, time);
|
13757
|
-
}
|
13758
|
-
else if (recipient.toId) {
|
13759
|
-
const to = await this._accounts.get(recipient.toId).toPromise();
|
13760
|
-
const action = this._action(recipient.action, who.gender);
|
13761
|
-
tooltip.note = this._translate.get('ActionTakenTo', who.name, action, to.name);
|
13762
|
-
}
|
13763
|
-
else {
|
13764
|
-
const action = this._action(recipient.action, who.gender);
|
13765
|
-
tooltip.note = this._translate.get('ActionTaken', who.name, action, time);
|
13766
|
-
}
|
13767
|
-
}
|
13768
|
-
else if (!recipient.estimate) {
|
13769
|
-
const time = this._fromNow(recipient.received);
|
13770
|
-
tooltip.note = this._translate.personalize('ReceivedTime', who.gender, time);
|
13771
|
-
}
|
13775
|
+
const time = this._fromNow(recipient.received);
|
13776
|
+
tooltip.note = this._translate.personalize('ReceivedTime', who.gender, time);
|
13772
13777
|
}
|
13773
13778
|
if (recipient.substitutingId) {
|
13774
13779
|
if (recipient.substitutingId === this._session.userId)
|