<div class="modal fade" id="AddCategory" tabindex="1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="false">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header py-4">
<h5 *ngIf="editCategory" class="modal-title" id="exampleModalLabel">تعديل تصنيف </h5>
<h5 *ngIf="addCat" class="modal-title" id="exampleModalLabel">اضافه تصنيف </h5>
<button type="button" class="close p-0 m-0" data-dismiss="modal" aria-label="Close">
<span aria-hidden="false">×</span>
</button>
</div>
<div class="modal-body">
<form [formGroup]="addCat_Form" (ngSubmit)="saveCat()">
<div class="row no-gutters">
<div class="col-lg-11">
<div class="form-group">
<span class="required ml-2 ">*</span>
<label> التصنيف الرئيسي</label>
<select (change)="maxCode_subCat()" class="form-control px-3" formControlName="Related_CATKeyField" name="Related_CATKeyField">
<option > </option>
<option *ngFor=
"let maincat of mainCategory" value=
"{{maincat.id}}">{{maincat.CATArbName}}
</option> </select>
<div *ngIf="Related_CATKeyField.touched && Related_CATKeyField.invalid" class=" p-0 errormassage mt-1">
ادخل التصنيف الرئيسي
</div>
</div>
</div>
<div class="col-lg-1">
<button (click)="MainCat_Modal()" type="button" class="btn_add_tax text-white text-center" style="cursor: pointer">+</button>
</div>
</div>
<div class="form-group">
<span class="required ml-2 ">*</span>
<label> تصنيف المنتج الفرعي</label>
<input type="text" class="form-control" formControlName="CATArbName" name="CATArbName">
<div *ngIf="CATArbName.touched && CATArbName.invalid" class=" p-0 errormassage mt-1">
ادخل التصنيف الفرعي
</div>
</div>
<div class="form-group">
<img [src]="defaultCatImg" style="width: 250px;height:200px">
<div class="productimg p-2">
<label for="upload" class="d-block text-center file-upload__label"> صوره تصنيف المنتج الفرعي </label>
<input id="upload" class=" file-upload__input " formControlName="CATPicture" (change)="handelCatImgInput($event.target.files)" type="file" accept="image/*">
</div>
</div>
<div class="row no-gutters">
<div class="col-lg-11">
<div class="form-group">
<label> قيمه الضريبه</label>
<select class="form-control px-3 " formControlName="CATTax_TADKeyField" name="CATTax_TADKeyField">
<option> </option>
<option [value]="Tax.id" *ngFor="let Tax of taxs">{{Tax.TADArbName}}</option>
</select>
</div>
</div>
<div class="col-lg-1">
<button (click)="tax_Modal()" type="button" class="btn_add_tax text-white text-center" style="cursor: pointer">+</button>
</div>
</div>
<div class="modal-footer">
<button type="submit" [disabled]="addCat_Form.invalid" class="btn btn-save ml-3">حفظ </button>
</div>
</form>
</div>
</div>
</div>
</div>