瀏覽代碼

status component UI changes

master
kj1352 3 年之前
父節點
當前提交
832370aaaf
共有 3 個檔案被更改,包括 12 行新增81 行删除
  1. +4
    -11
      src/app/check-status/check-status.component.html
  2. +0
    -43
      src/app/check-status/check-status.component.scss
  3. +8
    -27
      src/app/check-status/check-status.component.ts

+ 4
- 11
src/app/check-status/check-status.component.html 查看文件

@@ -6,15 +6,8 @@




<div class="search-input-container"> <div class="search-input-container">
<ng-container>
<section class="search-input">
<input type="text" placeholder="Enter the Application Number" [(ngModel)]="applicationId">
<button (click)="checkStatus()"> Check </button>
</section>
<section class="form-message" [ngClass]="{'error' : error.type === 'DANGER', 'warning' : error.type === 'WARNING' }" *ngIf="error">
<h5> {{ error.header }} </h5>
<p> {{ error.message }} </p>
</section>
</ng-container>
<section class="form-message" [ngClass]="{'error' : error.type === 'DANGER', 'warning' : error.type === 'WARNING' }" *ngIf="error">
<p> <strong> Assigned To: </strong> {{ error.assignedTo }} </p>
<h5> {{ error.status }} </h5>
</section>
</div> </div>

+ 0
- 43
src/app/check-status/check-status.component.scss 查看文件

@@ -3,49 +3,6 @@
margin: 0 auto; margin: 0 auto;
text-align: center; text-align: center;


.search-input {
display: flex;
align-items: center;
justify-content: flex-start;
background-color: white;
border-radius: 4rem;
height: 5.5rem;
border: 1px solid var(--border-grey);
width: 80%;
margin: 4rem auto 3rem;
overflow: hidden;
input {
border: none;
background-color: transparent;
padding: 0 3rem;
font-size: 1.5rem;
color: var(--dark-grey);
letter-spacing: 0.5px;
flex-grow: 1;
&::placeholder {
font-weight: 300;
}
}
button {
height: 100%;
border: none;
background-color: var(--highlight);
padding: 0 4rem;
color: white;
font-size: 1.6rem;
letter-spacing: 0.5px;
border-radius: 4rem;
transition: opacity 0.3s;

&:disabled {
opacity: 0.5;
}
}
}

.form-message { .form-message {
margin: 6rem auto 2rem; margin: 6rem auto 2rem;
line-height: 1.6; line-height: 1.6;


+ 8
- 27
src/app/check-status/check-status.component.ts 查看文件

@@ -6,39 +6,20 @@ import { Component, OnInit } from '@angular/core';
styleUrls: ['./check-status.component.scss'] styleUrls: ['./check-status.component.scss']
}) })
export class CheckStatusComponent implements OnInit { export class CheckStatusComponent implements OnInit {
applicationId: string = '398248899';

error?: { error?: {
header: string,
message: string,
status: string,
assignedTo: string,
type: 'SUCCESS' | 'WARNING' | 'DANGER', type: 'SUCCESS' | 'WARNING' | 'DANGER',
}; };


constructor() { } constructor() { }


ngOnInit(): void { ngOnInit(): void {
this.error = {
status: 'In Progress',
assignedTo: 'Mr Miyagi',
type: 'WARNING'
};
} }

checkStatus() {
if (this.applicationId === '398248899') {
this.error = {
header: 'Approved',
message: 'Your application has been approved, please view the notification to continue futher in the process',
type: 'SUCCESS'
};
} else if (this.applicationId === '100') {
this.error = {
header: 'Pending',
message: 'You\'ll be notified when there is a change in the status',
type: 'WARNING'
};
} else {
this.error = {
header: 'Rejected',
message: 'Please view the notifications to get more details regarding the rejection',
type: 'DANGER'
};
}
}

} }

Loading…
取消
儲存