Deployment 20.4

This commit is contained in:
Nguyen Ha Khue
2023-04-20 19:43:12 +07:00
parent 2649368c8e
commit 4f027eb3ed
3 changed files with 215 additions and 92 deletions
+206 -85
View File
File diff suppressed because it is too large Load Diff
+3 -1
View File
@@ -86,7 +86,8 @@ export class EditVendorComponent implements OnInit {
}
ngOnInit() {
const shopId = +this.route.snapshot.paramMap.get('id')!;
const shopId = +this.route.snapshot.paramMap.get("id")!;
console.log(shopId);
this.getAllDistrict().then(() => {
this.shopService.getShopById(shopId).subscribe((data => this.fillFormToUpdate(data)))
}).catch(error => { });
@@ -120,6 +121,7 @@ export class EditVendorComponent implements OnInit {
}
fillFormToUpdate(response: Shop) {
console.log(response)
this.isHaveDistrict = false;
this.isEnabled = response.isEnabled;
this.userImg = response.user.imageUrl;
@@ -6,7 +6,7 @@
</div>
<!-- Container-fluid starts-->
<div class="container-fluid" *ngIf="shops.length">
<div class="container-fluid" *ngIf="shops?.length">
<div class="card">
<!-- <div class="card-header">
<h5>Vendor Details</h5>
@@ -35,13 +35,13 @@
<tr *ngFor="let shop of shops, let idx = index">
<th>{{ idx + 1}}</th>
<td scope="row">
<img [src]="shop.imageUrl" class="imgTable" style="width: 20px">
<img [src]="shop?.imageUrl" class="imgTable" style="width: 20px">
</td>
<td scope="row">
<span>{{shop.name}}</span>
<span>{{shop?.name}}</span>
</td>
<td>
{{shop.description}}
{{shop?.description}}
</td>
<td>
<span class="text-size"
@@ -49,7 +49,7 @@
{{ shop.isEnabled ? 'Đang hoạt động' : 'Đang tạm ngưng' }}
</span>
</td>
<td>{{ shop.isStudent ? 'Cửa hàng sinh viên' : 'Cửa hàng thường' }}</td>
<td>{{ shop?.isStudent ? 'Cửa hàng sinh viên' : 'Cửa hàng thường' }}</td>
<!-- <td>{{shop.userId}}</td> -->
<td>
<a style="cursor: pointer" title="Xem">
@@ -58,7 +58,7 @@
</a>
</a>&nbsp;
<a style="cursor: pointer">
<a title="Chỉnh sửa" [routerLink]="['/vendors','edit',shop.id]">
<a title="Chỉnh sửa" [routerLink]="['/vendors','edit', shop.id]">
<i class='fa fa-edit f-12'></i>
</a>
</a>&nbsp;