fixed error message on command modal shows everytime

This commit is contained in:
Yubing325
2020-11-02 09:56:19 -06:00
parent 565d41c329
commit fbcd9fa568
3 changed files with 20 additions and 32 deletions
@@ -14,7 +14,7 @@
<ng-container *psDataGridColHeader>ID</ng-container>
<psbx-ds-text-filter *psDataGridCellFilter [dataSource]="merchantDataSource" path="id"></psbx-ds-text-filter>
<psbx-ds-sorting *psDataGridColSort [dataSource]="merchantDataSource" path="id"></psbx-ds-sorting>
<ng-container *psDataGridCell="let model">{{model.id}}</ng-container>
<ng-container *psDataGridCell="let model">{{model.id}}</ng-container>
</ng-container>
<ng-container psDataGridCol="name">
@@ -53,21 +53,13 @@
<ng-container *psDataGridCell="let model">
<div class="btn-group">
<button class="btn-info btn" psbxCommandModal [commandTitle]="'Change ' + model.name + ' name'"
commandText="Update" [dataSource]="merchantDataSource" command="changeMerchant" [model]="model"
[template]="theModal">Change</button>
<button class="btn-danger btn"
psbxCommand
[dataSource]="merchantDataSource"
command="removeMerchant"
[model]="model"
[confirm]="true"
yesClass="warning"
noClass = "secondary"
noText = "Cancel Delete"
yesText = "Delete It"
confirmMessage="Are you sure you want to delete this merchant?"
>RemoveIt</button></div>
commandText="Update" [dataSource]="merchantDataSource" command="changeMerchant" [model]="model"
[template]="theModal">Change</button>
<button class="btn-danger btn" psbxCommand [dataSource]="merchantDataSource" command="removeMerchant"
[model]="model" [confirm]="true" yesClass="warning" noClass="secondary" noText="Cancel Delete"
yesText="Delete It"
confirmMessage="Are you sure you want to delete this merchant?">RemoveIt</button></div>
</ng-container>
</ng-container>
<ng-container *psDataGridFooter>
@@ -78,17 +70,16 @@
<ng-template #theModal let-command let-loading="loading">
<label for="name">Name</label>
<input type="text" required [(ngModel)]="command.name" placeholder="Enter a merchant name"
class="form-control">
<input type="text" required [(ngModel)]="command.name" placeholder="Enter a merchant name" class="form-control">
<label for="address">Address</label>
<input type="text" required [(ngModel)]="command.address"
placeholder="Enter the merchant's address" class="form-control">
<input type="text" required [(ngModel)]="command.address" placeholder="Enter the merchant's address"
class="form-control">
<label for="address">Priority</label>
<input type="number" required [(ngModel)]="command.ordering"
placeholder="Enter the merchant's Priority" class="form-control">
<input type="number" required [(ngModel)]="command.ordering" placeholder="Enter the merchant's Priority"
class="form-control">
<label for="address">Priority</label>
<input type="date" required [(ngModel)]="command.openDate"
placeholder="Enter the merchant's Priority" class="form-control">
<input type="date" required [(ngModel)]="command.openDate" placeholder="Enter the merchant's Priority"
class="form-control">
</ng-template>
@@ -99,7 +90,4 @@
<button type="button" class="btn btn-default">Yes</button>
<button type="button" class="btn btn-primary">No</button>
</div>
</ng-template>
</ng-template>