|
@@ -6,47 +6,29 @@
|
|
|
>
|
|
|
<h1 class="bold">Create Order</h1>
|
|
|
<div class="form-input" fxLayout="column" fxLayoutAlign="start stretch">
|
|
|
- <label for="country">
|
|
|
- <span>Request Title <span class="red">*</span></span>
|
|
|
+ <label for="requestType">
|
|
|
+ <span>Request Type <span class="red">*</span></span>
|
|
|
</label>
|
|
|
- <input type="text" placeholder="Request Title" id="request_title" />
|
|
|
- </div>
|
|
|
- <div class="gap-20" fxLayout="wrap row" fxLayoutAlign="start start">
|
|
|
- <div
|
|
|
- class="form-input"
|
|
|
- fxLayout="column"
|
|
|
- fxLayoutAlign="start stretch"
|
|
|
- fxFlex.lt-md="100"
|
|
|
- fxFlex.gt-sm="48"
|
|
|
- >
|
|
|
- <label for="country">
|
|
|
- <span>Request Start Date <span class="red">*</span></span>
|
|
|
- </label>
|
|
|
- <input
|
|
|
- type="date"
|
|
|
- placeholder="Request Start Date"
|
|
|
- id="request_start_date"
|
|
|
- />
|
|
|
- </div>
|
|
|
- <div
|
|
|
- class="form-input"
|
|
|
- fxLayout="column"
|
|
|
- fxLayoutAlign="start stretch"
|
|
|
- fxFlex.lt-md="100"
|
|
|
- fxFlex.gt-sm="48"
|
|
|
+ <select
|
|
|
+ id="requestType"
|
|
|
+ [value]="selectedType"
|
|
|
+ (change)="onChangeType($event)"
|
|
|
>
|
|
|
- <label for="country">
|
|
|
- <span>Request End Date <span class="red">*</span></span>
|
|
|
- </label>
|
|
|
- <input type="date" placeholder="Request End Date" id="request_end_date" />
|
|
|
- </div>
|
|
|
+ <option disabled selected>Select your type</option>
|
|
|
+ <option value="1">Leaves</option>
|
|
|
+ <option value="2">Overtime</option>
|
|
|
+ <option value="3">Medical</option>
|
|
|
+ <option value="4">Business Trip</option>
|
|
|
+ </select>
|
|
|
</div>
|
|
|
- <div class="form-input" fxLayout="column" fxLayoutAlign="start stretch">
|
|
|
- <label for="country">
|
|
|
- <span>Request Description</span>
|
|
|
- </label>
|
|
|
- <!-- <input type="text" placeholder="Request Title" id="last_name" /> -->
|
|
|
- <textarea rows="8" cols="5"></textarea>
|
|
|
+
|
|
|
+ <div [ngSwitch]="selectedType">
|
|
|
+ <app-leaves-form *ngSwitchCase="1"></app-leaves-form>
|
|
|
+ <app-overtime-form *ngSwitchCase="2"></app-overtime-form>
|
|
|
+ <app-business-trip-form *ngSwitchCase="4"></app-business-trip-form>
|
|
|
+ <app-medical-form *ngSwitchCase="3"></app-medical-form>
|
|
|
</div>
|
|
|
- <button type="submit">Create</button>
|
|
|
+
|
|
|
+ <button type="submit" class="mt-2">Create</button>
|
|
|
+ <button type="button" class="cancel" mat-dialog-close>Cancel</button>
|
|
|
</form>
|