<div bsModal #createOrEditModal="bs-modal" (onShown)="onShown()" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="createOrEditModal" aria-hidden="true" [config]="{backdrop: 'static', keyboard: !saving}">
    <div class="modal-dialog modal-md">
        <div class="modal-content">
            <form *ngIf="active" #userForm="ngForm" novalidate (ngSubmit)="save()" autocomplete="off">
                <div class="modal-header">
                    <h4 class="modal-title">
                        <span>{{"OrderStatusCreate" | localize}}</span>
                    </h4>
                    <button type="button" class="close" (click)="close()" [attr.aria-label]="l('Close')" [disabled]="saving">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body">
    
                    <div class="form-group m-form__group align-items-center">
                        <label for="TagType">{{"OrderId" | localize}} *</label>
                        <select class="form-control kt-select2" style="width:100%" id="Order" [(ngModel)]="orderFilter" name="order"  #orderCtrl="ngModel" >
                            <option *ngFor="let order of filteredOrder"  [(value)]="order.id">
                                {{order.id}}
                            </option>
                        </select>

                        <!-- <p-autoComplete [(ngModel)]="orderFilter"
                            id="Order"
                            [suggestions]="filteredOrder"
                            (completeMethod)="filterOrder($event)"
                            field="id"
                            [minLength]="1"
                            name="order"
                            dropdown="true"
                            placeholder="Select order id.."
                            #orderCtrl="ngModel"
                            required
                            [style]="{'width':'100%'}"
                            [inputStyle]="{'width':'92%','height':'33px'}">
                        </p-autoComplete> -->
                        <validation-messages [formCtrl]="orderCtrl"></validation-messages>
                    </div>

                    <div class="form-group m-form__group align-items-center">
                        <label for="TagType">{{"OrderStatusType" | localize}} *</label>
                        <select class="form-control kt-select2" style="width:100%" id="StatusType" [(ngModel)]="statusType" name="status"  #statusCtrl="ngModel" >
                            <option *ngFor="let status of filteredType"  [(value)]="status.id">
                                {{status.description}}
                            </option>
                        </select>
                        <!-- <p-autoComplete [(ngModel)]="statusType"
                            id="StatusType"
                            [suggestions]="filteredType"
                            (completeMethod)="filterStatusType($event)"
                            field="description"
                            [minLength]="1"
                            name="status"
                            dropdown="true"
                            placeholder="Select status.."
                            #statusCtrl="ngModel"
                            required
                            [style]="{'width':'100%'}"
                            [inputStyle]="{'width':'92%','height':'33px'}">
                        </p-autoComplete> -->
                        <validation-messages [formCtrl]="statusCtrl"></validation-messages>
                    </div>
                    <div class="form-group">
                        <label for="Name">{{"Note" | localize}} *</label>
                        <input id="Name" #name="ngModel" type="text" name="Name" class="form-control" [(ngModel)]="note" required/>
                        <validation-messages [formCtrl]="name"></validation-messages>
                    </div>

                </div>
                <div class="modal-footer">
                    <button [disabled]="saving" type="button" class="btn btn-default btn-elevate btn-pill" (click)="close()">{{"Cancel" | localize}}</button>
                    <button type="submit" class="btn btn-primary btn-elevate btn-pill btn-elevate-air" [disabled]="!userForm.form.valid" [buttonBusy]="saving" [busyText]="l('SavingWithThreeDot')"><i class="fa fa-save"></i> <span>{{"Save" | localize}}</span></button>
                </div>
            </form>
        </div>
    </div>
</div>
