added page to turn on or off worklist notification and add indecator in my profile
parent
99cdc67d56
commit
e7f39ba02f
@ -0,0 +1,32 @@
|
|||||||
|
<ion-header>
|
||||||
|
<ion-toolbar class="header-toolbar">
|
||||||
|
<ion-title color="light">{{ 'worklist, worklist-setting' | translate}} </ion-title>
|
||||||
|
<ion-buttons slot="primary">
|
||||||
|
<ion-button style="background: none !important;" (click)="dismiss()">
|
||||||
|
<ion-icon slot="icon-only" name="close"></ion-icon>
|
||||||
|
</ion-button>
|
||||||
|
</ion-buttons>
|
||||||
|
</ion-toolbar>
|
||||||
|
</ion-header>
|
||||||
|
|
||||||
|
<ion-content>
|
||||||
|
<div style="padding: 5px;">
|
||||||
|
<h3 style="font-weight: bold;">{{ 'worklist, turn-on-notification' | translate}}</h3>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<ion-list>
|
||||||
|
<ion-item *ngFor="let data of notificationList">
|
||||||
|
<ion-label>
|
||||||
|
<p *ngIf="direction == 'ltr'" style="color: black">{{data.nameEn}}</p>
|
||||||
|
<p *ngIf="direction == 'rtl'" style="color: black">{{data.nameAr}}</p>
|
||||||
|
</ion-label>
|
||||||
|
<ion-toggle [checked]="data.isChecked"></ion-toggle>
|
||||||
|
</ion-item>
|
||||||
|
<br>
|
||||||
|
</ion-list>
|
||||||
|
</ion-content>
|
||||||
|
|
||||||
|
<ion-footer>
|
||||||
|
<ion-button style="font-size: 16px !important; width:371px; --background: #259CB8; background: white;" expand="block" (click)='dismiss()'>{{ 'worklist, save-changes' | translate}}</ion-button>
|
||||||
|
</ion-footer>
|
||||||
@ -0,0 +1,7 @@
|
|||||||
|
.header-toolbar{
|
||||||
|
--background: #269DB8;
|
||||||
|
}
|
||||||
|
|
||||||
|
ion-toggle{
|
||||||
|
--background-checked: #269DB8;
|
||||||
|
}
|
||||||
@ -0,0 +1,27 @@
|
|||||||
|
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||||
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { WorklistSettingComponent } from './worklist-setting.component';
|
||||||
|
|
||||||
|
describe('WorklistSettingComponent', () => {
|
||||||
|
let component: WorklistSettingComponent;
|
||||||
|
let fixture: ComponentFixture<WorklistSettingComponent>;
|
||||||
|
|
||||||
|
beforeEach(async(() => {
|
||||||
|
TestBed.configureTestingModule({
|
||||||
|
declarations: [ WorklistSettingComponent ],
|
||||||
|
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
}));
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
fixture = TestBed.createComponent(WorklistSettingComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
@ -0,0 +1,60 @@
|
|||||||
|
import { Component, OnInit } from '@angular/core';
|
||||||
|
import { ModalController } from '@ionic/angular';
|
||||||
|
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-worklist-setting',
|
||||||
|
templateUrl: './worklist-setting.component.html',
|
||||||
|
styleUrls: ['./worklist-setting.component.scss'],
|
||||||
|
})
|
||||||
|
export class WorklistSettingComponent implements OnInit {
|
||||||
|
|
||||||
|
notificationList = [
|
||||||
|
{
|
||||||
|
id: 0,
|
||||||
|
nameEn: "Human Resource (HR)",
|
||||||
|
nameAr: "الموارد البشرية (HR)",
|
||||||
|
isChecked: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 1,
|
||||||
|
nameEn: "Purchase Order (PO)",
|
||||||
|
nameAr: "امر شراء (PO)",
|
||||||
|
isChecked: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 2,
|
||||||
|
nameEn: "Purchase Requesr (PR)",
|
||||||
|
nameAr: "طلب شراء (PR)",
|
||||||
|
isChecked: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 3,
|
||||||
|
nameEn: "Move Request (MR)",
|
||||||
|
nameAr: "طلب نقل (MR)",
|
||||||
|
isChecked: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 4,
|
||||||
|
nameEn: "Item Creation (IC)",
|
||||||
|
nameAr: "انشاء عنصر (IC)",
|
||||||
|
isChecked: false
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
public direction: string;
|
||||||
|
|
||||||
|
constructor(public modalController: ModalController, public ts: TranslatorService) { }
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
this.direction = TranslatorService.getCurrentDirection();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
dismiss() {
|
||||||
|
this.modalController.dismiss({
|
||||||
|
'dismissed': true
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue