Skip to content

Commit 172efbc

Browse files
committed
removed no-people template
1 parent 2702773 commit 172efbc

File tree

3 files changed

+26
-30
lines changed

3 files changed

+26
-30
lines changed

src/components/mgt-agenda/mgt-agenda.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ export class MgtAgenda extends MgtTemplatedComponent {
256256
return this.renderTemplate('loading', null) || this.renderLoading();
257257
}
258258

259-
if (this.events) {
259+
if (this.events && this.events.length) {
260260
const events = this.showMax && this.showMax > 0 ? this.events.slice(0, this.showMax) : this.events;
261261

262262
const renderedTemplate = this.renderTemplate('default', { events });

src/components/mgt-people/mgt-people.ts

Lines changed: 24 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -119,36 +119,32 @@ export class MgtPeople extends MgtTemplatedComponent {
119119
*/
120120

121121
protected render() {
122-
if (this.people) {
123-
if (this.people.length) {
124-
return (
125-
this.renderTemplate('default', { people: this.people }) ||
126-
html`
127-
<ul class="people-list">
128-
${this.people.slice(0, this.showMax).map(
129-
person =>
130-
html`
131-
<li class="people-person">
132-
${this.renderTemplate('person', { person }, person.displayName) || this.renderPerson(person)}
133-
</li>
134-
`
135-
)}
136-
${this.people.length > this.showMax
137-
? this.renderTemplate('overflow', {
138-
extra: this.people.length - this.showMax,
139-
max: this.showMax,
140-
people: this.people
141-
}) ||
142-
html`
122+
if (this.people && this.people.length) {
123+
return (
124+
this.renderTemplate('default', { people: this.people }) ||
125+
html`
126+
<ul class="people-list">
127+
${this.people.slice(0, this.showMax).map(
128+
person =>
129+
html`
130+
<li class="people-person">
131+
${this.renderTemplate('person', { person }, person.displayName) || this.renderPerson(person)}
132+
</li>
133+
`
134+
)}
135+
${this.people.length > this.showMax
136+
? this.renderTemplate('overflow', {
137+
extra: this.people.length - this.showMax,
138+
max: this.showMax,
139+
people: this.people
140+
}) ||
141+
html`
143142
<li class="overflow"><span>+${this.people.length - this.showMax}<span></li>
144143
`
145-
: null}
146-
</ul>
147-
`
148-
);
149-
} else {
150-
return this.renderTemplate('no-people', null) || html``;
151-
}
144+
: null}
145+
</ul>
146+
`
147+
);
152148
} else {
153149
return this.renderTemplate('no-data', null) || html``;
154150
}

src/components/mgt-tasks/mgt-tasks.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1071,7 +1071,7 @@ export class MgtTasks extends MgtTemplatedComponent {
10711071
: [];
10721072

10731073
const noPeopleTemplate = html`
1074-
<template data-type="no-people">
1074+
<template data-type="no-data">
10751075
<i class="login-icon ms-Icon ms-Icon--Contact"></i>
10761076
</template>
10771077
`;

0 commit comments

Comments
 (0)