Skip to content

Commit ed4d5a0

Browse files
committed
fix some bug and add loading handle create org
1 parent 8336934 commit ed4d5a0

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/app/features/organization/pages/organization-management/organization-management.component.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,13 @@ export class OrganizationManagementComponent implements OnInit, OnDestroy {
163163
let orgs = res.result.data;
164164

165165
// nếu bật filter thì chỉ giữ lại org có id = myOrgId
166-
if (onlyMyOrg && this.myOrgId) {
167-
orgs = orgs.filter((o) => o.id === this.myOrgId);
166+
if (onlyMyOrg) {
167+
if (this.myOrgId) {
168+
orgs = orgs.filter((o) => o.id === this.myOrgId);
169+
} else {
170+
// Không có myOrgId mà vẫn tick filter → danh sách rỗng
171+
orgs = [];
172+
}
168173
}
169174

170175
this.orgs = orgs;

0 commit comments

Comments
 (0)