PR fix design
parent
594a67cc96
commit
a8457cc11e
@ -0,0 +1,21 @@
|
||||
<ion-content>
|
||||
<div>
|
||||
<div id="notificationDynamicFields">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ion-footer>
|
||||
<ion-row style="text-align: center;">
|
||||
<ion-col>
|
||||
<ion-button color="customnavy" class="confirmBtn" (click)="applyAction()"> {{ts.trPK('general','confirm')}}
|
||||
</ion-button>
|
||||
</ion-col>
|
||||
|
||||
<ion-col>
|
||||
<ion-button color="customnavy" class="cancelBtn" (click)="closeModel()"> {{ts.trPK('general','cancel')}}
|
||||
</ion-button>
|
||||
</ion-col>
|
||||
|
||||
</ion-row>
|
||||
</ion-footer>
|
||||
</ion-content>
|
||||
@ -0,0 +1 @@
|
||||
|
||||
@ -0,0 +1,27 @@
|
||||
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { ApplyActionModalComponent } from './apply-action-modal.component';
|
||||
|
||||
describe('ApplyActionModalComponent', () => {
|
||||
let component: ApplyActionModalComponent;
|
||||
let fixture: ComponentFixture<ApplyActionModalComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ ApplyActionModalComponent ],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(ApplyActionModalComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,81 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ModalController } from '@ionic/angular';
|
||||
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
|
||||
import { WorklistMainService } from '../service/work-list.main.service';
|
||||
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
|
||||
import { TextAreaInput } from 'src/app/uI-elements/text-area.input';
|
||||
|
||||
@Component({
|
||||
selector: 'app-apply-action-modal',
|
||||
templateUrl: './apply-action-modal.component.html',
|
||||
styleUrls: ['./apply-action-modal.component.scss'],
|
||||
})
|
||||
export class ApplyActionModalComponent implements OnInit {
|
||||
private textArea: TextAreaInput;
|
||||
getpassResAttr: any;
|
||||
getPassNotificationDetails: any;
|
||||
getPassNotification: any;
|
||||
|
||||
constructor( private ts: TranslatorService,private modalCtrl: ModalController, private cs: CommonService,public worklistMainService: WorklistMainService,
|
||||
) {
|
||||
|
||||
this.getPassNotificationDetails = this.cs.sharedService.getSharedData('passNotificationInfo');
|
||||
this.getpassResAttr = this.cs.sharedService.getSharedData('passResAttr');
|
||||
this.getPassNotification = this.cs.sharedService.getSharedData('ApplyActionModalPage');
|
||||
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
document.getElementById("notificationDynamicFields").innerHTML="";
|
||||
console.log(this.getPassNotificationDetails);
|
||||
//this.applyAction(this.getPassNotificationDetails);
|
||||
this.notificationDynamicFields(this.getpassResAttr);
|
||||
}
|
||||
|
||||
applyAction() {
|
||||
this.worklistMainService
|
||||
.actionButton(this.getPassNotification)
|
||||
.subscribe((result: any) => {
|
||||
this.handleApplayActionResult(result);
|
||||
});
|
||||
}
|
||||
|
||||
handleApplayActionResult(result) {
|
||||
if (this.cs.validResponse(result)) {
|
||||
if (result.MessageStatus == 1) {
|
||||
// this.navCtrl.push("HomePage");
|
||||
//this.common.openHome();
|
||||
//this.common.openNotificationPage();
|
||||
// for( var i = 0; i < this.notificationArray.length; i++){
|
||||
// if ( this.notificationArray[i].ROW_NUM === this.getPassNotificationDetails.ROW_NUM) {
|
||||
// this.notificationArray.splice(i, 1);
|
||||
// }
|
||||
// }
|
||||
////////////// this.getNotificationCountAfterSubmit();
|
||||
///////////// this.nextNotfification();
|
||||
}
|
||||
} // valid it
|
||||
}
|
||||
|
||||
notificationDynamicFields(notificationAttr){
|
||||
const containerId = 'notificationDynamicFields';
|
||||
for(let i=0;i<notificationAttr.length;i++){
|
||||
if(notificationAttr[i].ATTRIBUTE_TYPE=="VARCHAR2"){
|
||||
this.textArea = new TextAreaInput(notificationAttr[i].ATTRIBUTE_DISPLAY_NAME, notificationAttr[i].ATTRIBUTE_NAME, "", containerId,"","","");
|
||||
}else if(notificationAttr[i].ATTRIBUTE_TYPE=="ROLE"){
|
||||
|
||||
}else if(notificationAttr[i].ATTRIBUTE_TYPE=="DATE"){
|
||||
|
||||
}else if(notificationAttr[i].ATTRIBUTE_TYPE=="NUMBER"){
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
closeModel() {
|
||||
this.modalCtrl.dismiss();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 516 B |
Loading…
Reference in New Issue