@sprucelabs/spruce-calendar-components 22.10.100 → 22.10.101
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.
|
@@ -18,6 +18,7 @@ export default class PersonSelectToolViewController extends AbstractViewControll
|
|
|
18
18
|
waitForSave(): Promise<void | undefined>;
|
|
19
19
|
private ListVc;
|
|
20
20
|
private renderRow;
|
|
21
|
+
private isPersonLoggedIn;
|
|
21
22
|
private handleChangeMode;
|
|
22
23
|
getModeButtonBar(): ButtonBarViewController;
|
|
23
24
|
load(): Promise<void>;
|
|
@@ -79,6 +79,12 @@ export default class PersonSelectToolViewController extends AbstractViewControll
|
|
|
79
79
|
ListVc() {
|
|
80
80
|
const team = this.people.getTeam();
|
|
81
81
|
team.sort((a, b) => {
|
|
82
|
+
if (this.isPersonLoggedIn(b)) {
|
|
83
|
+
return 1;
|
|
84
|
+
}
|
|
85
|
+
if (this.isPersonLoggedIn(a)) {
|
|
86
|
+
return -1;
|
|
87
|
+
}
|
|
82
88
|
return a.casualName > b.casualName ? 1 : -1;
|
|
83
89
|
});
|
|
84
90
|
return this.Controller('list', {
|
|
@@ -96,7 +102,7 @@ export default class PersonSelectToolViewController extends AbstractViewControll
|
|
|
96
102
|
},
|
|
97
103
|
{
|
|
98
104
|
text: {
|
|
99
|
-
content:
|
|
105
|
+
content: this.isPersonLoggedIn(person) ? 'You' : person.casualName,
|
|
100
106
|
},
|
|
101
107
|
},
|
|
102
108
|
{
|
|
@@ -113,6 +119,9 @@ export default class PersonSelectToolViewController extends AbstractViewControll
|
|
|
113
119
|
],
|
|
114
120
|
};
|
|
115
121
|
}
|
|
122
|
+
isPersonLoggedIn(person) {
|
|
123
|
+
return person.id === this.loggedInPersonId;
|
|
124
|
+
}
|
|
116
125
|
handleChangeMode() {
|
|
117
126
|
return __awaiter(this, void 0, void 0, function* () {
|
|
118
127
|
yield this.people.setVisibilityMode(this.getMode());
|
|
@@ -18,6 +18,7 @@ export default class PersonSelectToolViewController extends AbstractViewControll
|
|
|
18
18
|
waitForSave(): Promise<void | undefined>;
|
|
19
19
|
private ListVc;
|
|
20
20
|
private renderRow;
|
|
21
|
+
private isPersonLoggedIn;
|
|
21
22
|
private handleChangeMode;
|
|
22
23
|
getModeButtonBar(): ButtonBarViewController;
|
|
23
24
|
load(): Promise<void>;
|
|
@@ -70,6 +70,12 @@ class PersonSelectToolViewController extends heartwood_view_controllers_1.Abstra
|
|
|
70
70
|
ListVc() {
|
|
71
71
|
const team = this.people.getTeam();
|
|
72
72
|
team.sort((a, b) => {
|
|
73
|
+
if (this.isPersonLoggedIn(b)) {
|
|
74
|
+
return 1;
|
|
75
|
+
}
|
|
76
|
+
if (this.isPersonLoggedIn(a)) {
|
|
77
|
+
return -1;
|
|
78
|
+
}
|
|
73
79
|
return a.casualName > b.casualName ? 1 : -1;
|
|
74
80
|
});
|
|
75
81
|
return this.Controller('list', {
|
|
@@ -87,7 +93,7 @@ class PersonSelectToolViewController extends heartwood_view_controllers_1.Abstra
|
|
|
87
93
|
},
|
|
88
94
|
{
|
|
89
95
|
text: {
|
|
90
|
-
content:
|
|
96
|
+
content: this.isPersonLoggedIn(person) ? 'You' : person.casualName,
|
|
91
97
|
},
|
|
92
98
|
},
|
|
93
99
|
{
|
|
@@ -104,6 +110,9 @@ class PersonSelectToolViewController extends heartwood_view_controllers_1.Abstra
|
|
|
104
110
|
],
|
|
105
111
|
};
|
|
106
112
|
}
|
|
113
|
+
isPersonLoggedIn(person) {
|
|
114
|
+
return person.id === this.loggedInPersonId;
|
|
115
|
+
}
|
|
107
116
|
async handleChangeMode() {
|
|
108
117
|
await this.people.setVisibilityMode(this.getMode());
|
|
109
118
|
}
|