Add Time card & Edit date element & change icons

production
Mohamed Mekawy 6 years ago
parent 2a1ca91daa
commit ba0d53011b

@ -661,7 +661,7 @@ export class AddEitComponent implements OnInit {
this.eitService.getDefaultValue(body).subscribe((result: any) => {
let elem = this.getElementByName(segmentName);
console.log(elem);
// console.log(elem);
// if(elem.dataset.hiddenval){
// elem.dataset.hiddenval="";
// return false;
@ -694,7 +694,7 @@ export class AddEitComponent implements OnInit {
if (isSelectElement) {
let elem = this.getSelectElementByName(segmentName);
elem = document.getElementById(elem),
alert(elem.length);
//alert(elem.length);
// var firstoption = document.createElement("option");
// firstoption.text = text;
// firstoption.value = val;
@ -703,11 +703,11 @@ export class AddEitComponent implements OnInit {
//elem.text=text;
}else{
console.log("else - " + elem.value);
// console.log("else - " + elem.value);
elem.value = val;
elem.innerText = text;
elem.setAttribute("value", val);
console.log("else - " + elem.value);
// console.log("else - " + elem.value);
}
}
if (isHidden || isReadOnlyList) {

@ -24,8 +24,8 @@ export class ConnectorService {
public static timeOut = 30 * 1000;
// public static host = 'http://10.50.100.113:6060/'; // development service
public static host = "https://uat.hmgwebservices.com/";
// public static host = 'https://hmgwebservices.com/';
public static host = "https://uat.hmgwebservices.com/";
//public static host = 'https://hmgwebservices.com/';
// public static host = 'http://10.50.100.198:6060/';
// public static host = 'http://10.50.100.113:6060/'; // development service
/* public static host = 'http://10.50.100.198:6060/';

@ -25,8 +25,7 @@ export class HomeComponent implements OnInit {
public payslipService:PayslipService,
public ts: TranslatorService,
public common: CommonService,
public sharedData: SharedDataService,
public authService: AuthenticationService
public sharedData: SharedDataService
) {}
ngOnInit() {

@ -0,0 +1,27 @@
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { HomeComponent } from './home.component';
describe('HomeComponent', () => {
let component: HomeComponent;
let fixture: ComponentFixture<HomeComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ HomeComponent ],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(HomeComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

@ -0,0 +1,14 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-home',
templateUrl: './home.component.html',
styleUrls: ['./home.component.scss'],
})
export class HomeComponent implements OnInit {
constructor() { }
ngOnInit() {}
}

@ -0,0 +1,27 @@
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { TimeCardDetailsComponent } from './time-card-details.component';
describe('TimeCardDetailsComponent', () => {
let component: TimeCardDetailsComponent;
let fixture: ComponentFixture<TimeCardDetailsComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ TimeCardDetailsComponent ],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(TimeCardDetailsComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

@ -0,0 +1,14 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-time-card-details',
templateUrl: './time-card-details.component.html',
styleUrls: ['./time-card-details.component.scss'],
})
export class TimeCardDetailsComponent implements OnInit {
constructor() { }
ngOnInit() {}
}

@ -6,11 +6,23 @@ import { Routes, RouterModule } from '@angular/router';
import { IonicModule } from '@ionic/angular';
import { TimeCardPage } from './time-card.page';
import { TimeCardDetailsComponent } from './time-card-details/time-card-details.component';
import { HomeComponent } from './home/home.component';
const routes: Routes = [
{
path: '',
component: TimeCardPage
component: TimeCardPage,
children: [
{
path: 'home',
component: HomeComponent
},
{
path: 'time-card-details',
component: TimeCardDetailsComponent
}
]
}
];
@ -21,6 +33,10 @@ const routes: Routes = [
IonicModule,
RouterModule.forChild(routes)
],
declarations: [TimeCardPage]
declarations: [
TimeCardPage,
HomeComponent,
TimeCardDetailsComponent
]
})
export class TimeCardPageModule {}

@ -1,9 +1,3 @@
<ion-header>
<ion-toolbar>
<ion-title>time-card</ion-title>
</ion-toolbar>
</ion-header>
<ion-content>
</ion-content>
<ion-router-outlet></ion-router-outlet>
</ion-content>

@ -45,7 +45,7 @@ export class DateTimeInput extends UiElement {
"<ion-item>" +
" <ion-label style='font-size: medium !important;' class='daynamicForm-Label " + requiredClass + "' id='title' >" + this.label + "</ion-label>" +
// " <div class='daynamicForm-DateTime " + disaledClass + "' id='" + this.elementId + "' data-dtvalue='" + this.value + "' " + this.disabled + ">" + this.value + "</div>" +
"<ion-datetime displayFormat='DD/MM/YYYY' value='" + this.value + "' id='" + this.elementId + "' data-dtvalue='" + this.value + "' " + this.disabled + "></ion-datetime>" +
"<ion-datetime min='1900' max='2100' displayFormat='DD/MM/YYYY' value='" + this.value + "' id='" + this.elementId + "' data-dtvalue='" + this.value + "' " + this.disabled + "></ion-datetime>" +
// " <input class='daynamicForm-DateTime' type='text' id='" + this.elementId + "' value='" + this.value + "' "+this.disabled+" (click)='showDateTimePicker()'/>"+
// " <input class='daynamicForm-DateTime' type='date' id='" + this.elementId + "' value='" + dateValue+ "' "+this.disabled+" />"+
// " <input class='daynamicForm-DateTime' type='time' id='" + this.elementId + "Time' value='" + timeValue + "' "+this.disabled+" />"+

@ -44,7 +44,7 @@ export class DateInput extends UiElement {
"<ion-item>" +
" <ion-label style='font-size: medium !important;' class='daynamicForm-Label " + requiredClass + "' id='title' >" + this.label + "</ion-label>" +
// " <div class='daynamicForm-DateTime " + disaledClass + "' id='" + this.elementId + "' data-dtvalue='" + this.value + "' " + this.disabled + ">" + this.value + "</div>" +
"<ion-datetime class='onic-date' (ionChange)='setDate()' displayFormat='MMM/DD/YYYY' value='" + this.value + "' id='" + this.elementId + "' data-dtvalue='" + this.value + "' " + this.disabled + " ></ion-datetime>" +
"<ion-datetime min='1900' max='2100' class='onic-date' (ionChange)='setDate()' displayFormat='MMM/DD/YYYY' value='" + this.value + "' id='" + this.elementId + "' data-dtvalue='" + this.value + "' " + this.disabled + " ></ion-datetime>" +
// " <input class='daynamicForm-DateTime' type='text' id='" + this.elementId + "' value='" + this.value + "' "+this.disabled+" (click)='showDateTimePicker()'/>"+
// " <input class='daynamicForm-DateTime' type='date' id='" + this.elementId + "' value='" + dateValue+ "' "+this.disabled+" />"+
// " <input class='daynamicForm-DateTime' type='time' id='" + this.elementId + "Time' value='" + timeValue + "' "+this.disabled+" />"+

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Loading…
Cancel
Save