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() { ngOnInit() {
const shopId = +this.route.snapshot.paramMap.get('id')!; const shopId = +this.route.snapshot.paramMap.get("id")!;
console.log(shopId);
this.getAllDistrict().then(() => { this.getAllDistrict().then(() => {
this.shopService.getShopById(shopId).subscribe((data => this.fillFormToUpdate(data))) this.shopService.getShopById(shopId).subscribe((data => this.fillFormToUpdate(data)))
}).catch(error => { }); }).catch(error => { });
@@ -120,6 +121,7 @@ export class EditVendorComponent implements OnInit {
} }
fillFormToUpdate(response: Shop) { fillFormToUpdate(response: Shop) {
console.log(response)
this.isHaveDistrict = false; this.isHaveDistrict = false;
this.isEnabled = response.isEnabled; this.isEnabled = response.isEnabled;
this.userImg = response.user.imageUrl; this.userImg = response.user.imageUrl;
@@ -6,7 +6,7 @@
</div> </div>
<!-- Container-fluid starts--> <!-- Container-fluid starts-->
<div class="container-fluid" *ngIf="shops.length"> <div class="container-fluid" *ngIf="shops?.length">
<div class="card"> <div class="card">
<!-- <div class="card-header"> <!-- <div class="card-header">
<h5>Vendor Details</h5> <h5>Vendor Details</h5>
@@ -35,13 +35,13 @@
<tr *ngFor="let shop of shops, let idx = index"> <tr *ngFor="let shop of shops, let idx = index">
<th>{{ idx + 1}}</th> <th>{{ idx + 1}}</th>
<td scope="row"> <td scope="row">
<img [src]="shop.imageUrl" class="imgTable" style="width: 20px"> <img [src]="shop?.imageUrl" class="imgTable" style="width: 20px">
</td> </td>
<td scope="row"> <td scope="row">
<span>{{shop.name}}</span> <span>{{shop?.name}}</span>
</td> </td>
<td> <td>
{{shop.description}} {{shop?.description}}
</td> </td>
<td> <td>
<span class="text-size" <span class="text-size"
@@ -49,7 +49,7 @@
{{ shop.isEnabled ? 'Đang hoạt động' : 'Đang tạm ngưng' }} {{ shop.isEnabled ? 'Đang hoạt động' : 'Đang tạm ngưng' }}
</span> </span>
</td> </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>{{shop.userId}}</td> -->
<td> <td>
<a style="cursor: pointer" title="Xem"> <a style="cursor: pointer" title="Xem">
@@ -58,7 +58,7 @@
</a> </a>
</a>&nbsp; </a>&nbsp;
<a style="cursor: pointer"> <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> <i class='fa fa-edit f-12'></i>
</a> </a>
</a>&nbsp; </a>&nbsp;