Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/xd-153 - Label Components properly in Create Case Page with CSS #203

Closed
wants to merge 5 commits into from
Closed
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#caseForm="ngForm"
(submit)="onSubmit(caseForm)"
>

<!-- Facility Selection -->
<ix-select
id="facilitySelection"
(valueChange)="onFacilityChange($event)"
Expand All @@ -17,41 +17,63 @@
<ix-select-item
[label]="facility.heading"
[value]="facility.id"
></ix-select-item>
/>
}
</ix-select>
<ix-input-group class="absolute pointer-events-none" id="input-facilitySelection">


<!-- TODO: Find better solution for select validation -->
<ix-input-group
class="absolute pointer-events-none"
id="input-facilitySelection"
>
<input
[(ngModel)]="createCaseForm.selectFacility"
placeholder="{{facilityPlaceholder()}}"
name="selectFacility"
required
/>
<span slot="input-end"><ix-icon name="chevron-down" size="16"></ix-icon></span>
<span slot="input-end">
<ix-icon name="chevron-down" size="16"/>
</span>
</ix-input-group>

<!-- Case Title -->
<ix-input-group>
<span slot="input-start">Title:</span>
<input type="text" name="title" [(ngModel)]="createCaseForm.title" required />
<div class="invalid-feedback">Please insert a title</div>
<label>Title</label>
<input
type="text"
name="title"
[(ngModel)]="createCaseForm.title"
required
/>
<div class="valid-feedback">Looks good!</div>
<div class="invalid-feedback">Title is required</div>
</ix-input-group>

<textarea
class="pl-2"
placeholder="Enter your Description"
name="text"
[(ngModel)]="createCaseForm.text"
required
></textarea>
<!-- Case Description -->
<ix-input-group>
<label>Description</label>
<textarea
class="pl-2"
name="text"
[(ngModel)]="createCaseForm.text"
required
></textarea>
<div class="valid-feedback">Looks good!</div>
<div class="invalid-feedback">Description is required</div>
</ix-input-group>

<div class="flex flex-row gap-4">
<!-- Date Selection -->
<lib-date-dropdown-wrapper
[(ngModel)]="createCaseForm.dueDate"
name="dueDate"
required
></lib-date-dropdown-wrapper>
/>

<div class="flex flex-col">
<!-- Case Type Selection -->
<ix-select
id="typeSelection"
(valueChange)="onTypeChange($event)"
Expand All @@ -61,19 +83,23 @@
<ix-select-item label="INCIDENT" [value]="caseType.INCIDENT"></ix-select-item>
<ix-select-item label="ANNOTATION" [value]="caseType.ANNOTATION"></ix-select-item>
</ix-select>


<!-- TODO: Find better solution for select validation -->
<ix-input-group class="absolute pointer-events-none" id="input-typeSelection">
<input
[(ngModel)]="createCaseForm.selectType"
placeholder="{{typePlaceholder()}}"
name="selectType"
required
/>
<span slot="input-end"><ix-icon name="chevron-down" size="16"></ix-icon></span>
<span slot="input-end">
<ix-icon name="chevron-down" size="16"/>
</span>
</ix-input-group>
</div>

<div class="flex flex-col">
<!-- Case Priority Selection -->
<ix-select
id="prioritySelection"
(valueChange)="onPriorityChange($event)"
Expand All @@ -84,21 +110,24 @@
<ix-select-item label="HIGH" [value]="casePriority.HIGH"></ix-select-item>
<ix-select-item label="EMERGENCY" [value]="casePriority.EMERGENCY"></ix-select-item>
</ix-select>
<!-- TODO: Find better solution for select validation -->
<ix-input-group class="absolute pointer-events-none" id="input-prioritySelection">
<input
[(ngModel)]="createCaseForm.selectPriority"
placeholder="{{priorityPlaceholder()}}"
name="selectPriority"
required
/>
<span slot="input-end"><ix-icon name="chevron-down" size="16"></ix-icon></span>
<span slot="input-end">
<ix-icon name="chevron-down" size="16"/>
</span>
</ix-input-group>
</div>
</div>


<!-- Case Email Input -->
<ix-input-group>
<span slot="input-start">Email:</span>
<label>Email address</label>
<input
placeholder="[email protected]"
type="email"
Expand All @@ -110,6 +139,7 @@
<div class="invalid-feedback">Please provide a valid email address</div>
</ix-input-group>

<!-- Case Creation Button -->
<ix-button type="submit">Create Case</ix-button>
</form>

Expand All @@ -119,8 +149,13 @@
<div class="mt-7 text-l">{{ facility.subheading }}</div>
</ix-tile>

<ix-tile class="mt-2" size="small">Location: {{ facility.location }}</ix-tile>
<ix-tile class="mt-2" size="small">Number of pumps: {{ facility.pumps }}</ix-tile>
<ix-tile class="mt-2" size="small">
Location: {{ facility.location }}
</ix-tile>

<ix-tile class="mt-2" size="small">
Number of pumps: {{ facility.pumps }}
</ix-tile>

<ix-button
class="mt-4"
Expand Down