diff --git a/api/application/config/constants.php b/api/application/config/constants.php
index 39168c80..8cd2f240 100644
--- a/api/application/config/constants.php
+++ b/api/application/config/constants.php
@@ -125,6 +125,10 @@ defined('FREQUENCYID') OR define('FREQUENCYID','frequency_id');
defined('CUSTOMERBEHAVIOUR') OR define('CUSTOMERBEHAVIOUR','m_customer_behaviour');
defined('CUSTOMERBEHAVIOURID') OR define('CUSTOMERBEHAVIOURID','customer_behaviour_id');
+defined('CUSTOMERSEGMENT') OR define('CUSTOMERSEGMENT','m_customer_segment');
+defined('CUSTOMERSEGMENTID') OR define('CUSTOMERSEGMENTID','customer_segment_id');
+
+
defined('REGIONS') OR define('REGIONS','m_regions');
defined('REGIONSID') OR define('REGIONSID','region_id');
@@ -137,10 +141,19 @@ defined('CITYID') OR define('CITYID','city_id');
defined('BRANCH') OR define('BRANCH','m_branch');
defined('BRANCHID') OR define('BRANCHID','branch_id');
+defined('PDALLOCATIONTYPE') OR define('PDALLOCATIONTYPE','m_pd_allocation_type');
+defined('PDALLOCATIONTYPEID') OR define('PDALLOCATIONTYPEID','pd_allocation_type_id');
+
defined('PDLOCATIONAPPROACH') OR define('PDLOCATIONAPPROACH','m_pd_location_approach');
defined('PDLOCATIONAPPROACHID') OR define('PDLOCATIONAPPROACHID','pd_location_approach_id');
-defined('LISTOFMASTERS') OR define('LISTOFMASTERS','m_list_of_masters');
+defined('PDSTATUS') OR define('PDSTATUS','m_pd_status');
+defined('PDSTATUSID') OR define('PDSTATUSID','pd_status_id');
+
+defined('PDTYPE') OR define('PDTYPE','m_pd_type');
+defined('PDTYPEID') OR define('PDTYPEID','pd_type_id');
+
+defined('LISTOFMASTERS') OR define('LISTOFMASTERS','c_list_of_masters');
defined('LISTOFMASTERSID') OR define('LISTOFMASTERSID','master_id');
defined('COMMENTSONLOCALITY') OR define('COMMENTSONLOCALITY','m_comments_on_locality');
diff --git a/api/application/controllers/Common_masters_Controller.php b/api/application/controllers/Common_Masters_Controller.php
similarity index 99%
rename from api/application/controllers/Common_masters_Controller.php
rename to api/application/controllers/Common_Masters_Controller.php
index 386eb852..86a549e8 100644
--- a/api/application/controllers/Common_masters_Controller.php
+++ b/api/application/controllers/Common_Masters_Controller.php
@@ -981,7 +981,7 @@ class Common_Masters_Controller extends REST_Controller {
//echo $table_name;
$result = $this->Common_Masters_Model->selectRecords(constant($table_name));
//print_r($result);
- die();
+ //die();
if(count($result) > 0)
{
$data['dataStatus'] = true;
diff --git a/api/application/libraries/SPARQ_Model.php b/api/application/libraries/SPARQ_Model.php
index 9be45c5e..e44a5197 100644
--- a/api/application/libraries/SPARQ_Model.php
+++ b/api/application/libraries/SPARQ_Model.php
@@ -27,11 +27,11 @@ class SPARQ_Model extends CI_Model {
public function selectRecords($table_name,$where_condition_array = array(),$print_query = '')
{
- echo $print_query;
- echo $table_name;
+ // echo $print_query;
+ // echo $table_name;
$data = $this->db->get_where($table_name,$where_condition_array)->result_array();//only AND condition
- print_r($data);
+ //print_r($data);
if($print_query == 1)
{
print_r($this->db->last_query());
diff --git a/api/application/models/Entity_Management_Model.php b/api/application/models/Entity_Management_Model.php
index 3b909d32..c1750f34 100644
--- a/api/application/models/Entity_Management_Model.php
+++ b/api/application/models/Entity_Management_Model.php
@@ -14,7 +14,7 @@ class Entity_Management_Model extends SPARQ_Model {
{
$result_data = array();
- $this->db->SELECT('ENTITY.entity_id, ENTITY.full_name, ENTITY.short_name, ENTITY.fk_region,REGIONS.name as region_name, ENTITY.fk_state,STATE.name as state_name, ENTITY.fk_city,CITY.name as city_name, ENTITY.fk_branch,BRANCH.name as branch_name, ENTITY.addressline1, ENTITY.addressline2, ENTITY.official_email, ENTITY.alt_email, ENTITY.phone_number, ENTITY.mobile_no, ENTITY.remarks, ENTITY.createdon, ENTITY.fk_createdby,concat(USERPROFILE.first_name,' ',USERPROFILE.last_name) as createdby, ENTITY.updatedon, ENTITY.fk_updatedby,concat(USERPROFILE1.first_name,' ',USERPROFILE1.last_name) as updatedby, ENTITY.isactive, ENTITY.pan, ENTITY.gst_no, ENTITY.gst_state_code, addressline3, ENTITY.tat, ENTITY.fk_entity_type_id,ENTITYTYPE.name as entity_name');
+ $this->db->SELECT('ENTITY.entity_id, ENTITY.full_name, ENTITY.short_name, ENTITY.fk_region,REGIONS.name as region_name, ENTITY.fk_state,STATE.name as state_name, ENTITY.fk_city,CITY.name as city_name, ENTITY.fk_branch,BRANCH.name as branch_name, ENTITY.addressline1, ENTITY.addressline2, ENTITY.official_email, ENTITY.alt_email, ENTITY.phone_number, ENTITY.mobile_no, ENTITY.remarks, ENTITY.createdon, ENTITY.fk_createdby,concat(USERPROFILE.first_name," ",USERPROFILE.last_name) as createdby, ENTITY.updatedon, ENTITY.fk_updatedby,concat(USERPROFILE1.first_name," ",USERPROFILE1.last_name) as updatedby, ENTITY.isactive, ENTITY.pan, ENTITY.gst_no, ENTITY.gst_state_code, addressline3, ENTITY.tat, ENTITY.fk_entity_type_id,ENTITYTYPE.name as entity_name');
$this->db->FROM(ENTITY.' as ENTITY');
$this->db->JOIN(REGIONS.' as REGIONS','ENTITY.fk_region = REGIONS.region_id AND REGIONS.isactive = 1');
$this->db->JOIN(STATE.' as STATE','ENTITY.fk_state = STATE.state_id AND STATE.isactive = 1');
@@ -29,7 +29,7 @@ class Entity_Management_Model extends SPARQ_Model {
foreach($result as $key => $r)
{
- $this->db->SELECT('ENTITYCHILD.entity_child_id,ENTITYCHILD.contact_person,ENTITYCHILD.contact_email,ENTITYCHILD.contact_mobile_no,ENTITYCHILD.contact_person,ENTITYCHILD.isactive,ENTITYCHILD.createdon,ENTITYCHILD.fk_createdby,concat(USERPROFILE.first_name,' ',USERPROFILE.last_name) as createdby,ENTITYCHILD.updatedon,ENTITYCHILD.fk_updatedby,concat(USERPROFILE1.first_name,' ',USERPROFILE1.last_name) as updatedby');
+ $this->db->SELECT('ENTITYCHILD.entity_child_id,ENTITYCHILD.contact_person,ENTITYCHILD.contact_email,ENTITYCHILD.contact_mobile_no,ENTITYCHILD.contact_person,ENTITYCHILD.isactive,ENTITYCHILD.createdon,ENTITYCHILD.fk_createdby,concat(USERPROFILE.first_name," ",USERPROFILE.last_name) as createdby,ENTITYCHILD.updatedon,ENTITYCHILD.fk_updatedby,concat(USERPROFILE1.first_name," ",USERPROFILE1.last_name) as updatedby');
$this->db->FROM(ENTITYCHILD.' as ENTITYCHILD');
$this->db->JOIN(ENTITY.' as ENTITY','ENTITYCHILD.fk_entity_id = ENTITY.entity_id AND ENTITY.isactive = 1');
$this->db->JOIN(USERPROFILE.' as USERPROFILE','ENTITYCHILD.fk_createdby = USERPROFILE.userid AND USERPROFILE.isactive = 1');
diff --git a/sineedge_front/src/app/app.module.ts b/sineedge_front/src/app/app.module.ts
index 763034c7..a15a09d5 100755
--- a/sineedge_front/src/app/app.module.ts
+++ b/sineedge_front/src/app/app.module.ts
@@ -3,6 +3,7 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { RouterModule } from '@angular/router';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
+import { ReactiveFormsModule } from '@angular/forms';
import { HttpModule, Http } from '@angular/http';
import { PerfectScrollbarModule } from 'ngx-perfect-scrollbar';
@@ -21,6 +22,7 @@ import {MatListModule} from '@angular/material/list';
import {MatMenuModule} from '@angular/material/menu';
import {MatToolbarModule} from '@angular/material/toolbar';
import {MatTabsModule} from '@angular/material/tabs';
+import {MatTableModule} from '@angular/material';
import {MatCheckboxModule} from '@angular/material/checkbox';
import {MatProgressBarModule} from '@angular/material/progress-bar';
import {MatSelectModule} from '@angular/material/select';
@@ -54,9 +56,9 @@ const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = {
AdminLayoutComponent,
AuthLayoutComponent,
JazzDialogComponent,
-
+
NewPasswordDialog,ForgotPass,ChangePasswordDialog,
-
+
],
imports: [
BrowserModule,
@@ -66,6 +68,7 @@ const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = {
onSameUrlNavigation: 'reload'
}),
FormsModule,
+ ReactiveFormsModule,
HttpModule,
HttpClientModule,
MatSidenavModule,
@@ -94,7 +97,7 @@ const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = {
useClass:[{AwsService,SharedService}]
}
],
- entryComponents: [JazzDialogComponent, NewPasswordDialog,ForgotPass,ChangePasswordDialog ],
+ entryComponents: [JazzDialogComponent, NewPasswordDialog,ForgotPass,ChangePasswordDialog],
bootstrap: [AppComponent]
})
export class AppModule { }
diff --git a/sineedge_front/src/app/app.routing.ts b/sineedge_front/src/app/app.routing.ts
index 189c664e..07bd827c 100755
--- a/sineedge_front/src/app/app.routing.ts
+++ b/sineedge_front/src/app/app.routing.ts
@@ -19,7 +19,8 @@ export const AppRoutes: Routes = [{
},{
path:'settings',
loadChildren:'./settings/settings.module#SettingsModule'
- }]
+ }
+]
}, {
path: '',
component: AuthLayoutComponent,
diff --git a/sineedge_front/src/app/aws.service.ts b/sineedge_front/src/app/aws.service.ts
index 25263057..6c880a86 100755
--- a/sineedge_front/src/app/aws.service.ts
+++ b/sineedge_front/src/app/aws.service.ts
@@ -20,7 +20,7 @@ import 'rxjs/add/operator/map';
import { SharedService } from './shared.service';
-let apiurl = 'localhost/sineedge/sparqapi/api/';
+let apiurl = 'localhost/sparqapi/api/';
const sineedge_poolData = {
UserPoolId: "ap-south-1_y7dt3iEaX", //ap-south-1_qQ85yQZJO UserName :SPARQ_SINEEDGE_DEV
ClientId: "291qt4smn5pql6o8cc2hi201lj" // ClientName: SINEEDGE_DEV_WEB
@@ -48,7 +48,7 @@ const sineedgeIdentity = "ap-south-1:9a551eab-97cf-4991-b677-2f9bcd058961";//"ap
const lenderIdentity = "ap-south-1:ca22dabc-db59-4af5-9bb8-265f7ec95907";
const vendorIdenttiy = "";
// serviceProvider
-apiurl = "http://localhost/sineedge/sparqapi/api/";
+// apiurl = "http://localhost/sineedge/sparqapi/api/";
const currentdate = new Date().toJSON().slice(0,19).replace('T',' ');
@Injectable({
diff --git a/sineedge_front/src/app/settings/component/branch/branch-dialog/branch-dialog.component.html b/sineedge_front/src/app/settings/component/branch/branch-dialog/branch-dialog.component.html
new file mode 100644
index 00000000..62cd5c22
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/branch/branch-dialog/branch-dialog.component.html
@@ -0,0 +1,65 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/sineedge_front/src/app/settings/component/branch/branch-dialog/branch-dialog.component.scss b/sineedge_front/src/app/settings/component/branch/branch-dialog/branch-dialog.component.scss
new file mode 100644
index 00000000..7c5eb0db
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/branch/branch-dialog/branch-dialog.component.scss
@@ -0,0 +1,8 @@
+mat-form-field{
+ width:100%;
+}
+mat-dialog-container{
+ width:10% !important;
+}
+
+//style="width: 100%"
\ No newline at end of file
diff --git a/sineedge_front/src/app/settings/component/branch/branch-dialog/branch-dialog.component.spec.ts b/sineedge_front/src/app/settings/component/branch/branch-dialog/branch-dialog.component.spec.ts
new file mode 100644
index 00000000..17284f6c
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/branch/branch-dialog/branch-dialog.component.spec.ts
@@ -0,0 +1,25 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { BranchDialogComponent } from './branch-dialog.component';
+
+describe('BranchDialogComponent', () => {
+ let component: BranchDialogComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ BranchDialogComponent ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(BranchDialogComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/sineedge_front/src/app/settings/component/branch/branch-dialog/branch-dialog.component.ts b/sineedge_front/src/app/settings/component/branch/branch-dialog/branch-dialog.component.ts
new file mode 100644
index 00000000..a8448ef2
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/branch/branch-dialog/branch-dialog.component.ts
@@ -0,0 +1,78 @@
+import { Component, OnInit, Inject } from '@angular/core';
+import { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';
+import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
+import { MastersService } from '../../../service/master/masters.service';
+import { Branch,States,City } from '../../../model/branch';
+import { Observable } from 'rxjs/Observable';//for Datatables
+
+@Component({
+ selector: 'app-jazz-dialog',
+ templateUrl: './branch-dialog.component.html',
+ styleUrls: ['./branch-dialog.component.scss']
+})
+
+export class BranchDialogComponent implements OnInit {
+
+
+ public _branchForm: FormGroup;
+
+ citydatas: City[];
+ errorMessage:string;
+
+ constructor(private _formBuilder: FormBuilder,
+ private dialogRef: MatDialogRef,
+ private _mastersService: MastersService,
+ @Inject(MAT_DIALOG_DATA) public data: Branch) { }
+
+
+ ngOnInit() {
+
+ this._branchForm = this._formBuilder.group({
+ branch_id: [this.data.branch_id],
+ name: [this.data.name, Validators.compose([Validators.required])],
+ fk_city_id: [this.data.fk_city_id, Validators.compose([Validators.required])]
+ });
+ //console.log(this._branchForm);
+
+ this._mastersService.getAllCityData()
+ .subscribe(
+ data => {
+
+ this.citydatas = data;
+ this.citydatas = this.citydatas.filter(city=>city.isactive == 1 );
+
+ }, error => this.errorMessage = error);
+
+ }
+
+ /** For Popup Close Button */
+ onNoClick(): void {
+ this.dialogRef.close();
+ }
+
+ /** To Save/Edited Popup Data */
+ onSubmit() {
+
+ var BranchFormValues = this._branchForm.value;
+
+ if(isNaN(this.data.branch_id)) {
+
+ Object.keys(BranchFormValues)
+ .forEach((key) => ( BranchFormValues[key] == null) && delete BranchFormValues[key]);
+ //console.log(BranchFormValues);
+ this._mastersService.addMasterDetails(BranchFormValues,'BRANCH').subscribe();
+ this.dialogRef.close();
+ //alert("saved");
+ } else {
+ this._mastersService.editMasterDetails(BranchFormValues,'BRANCH').subscribe();
+ this.dialogRef.close();
+ //alert("edited");
+ }
+ }
+
+ /** To Reset Popup Data */
+ onReset(){
+ this._branchForm.reset();
+ }
+
+}
diff --git a/sineedge_front/src/app/settings/component/branch/branch-list/branch-list.component.html b/sineedge_front/src/app/settings/component/branch/branch-list/branch-list.component.html
new file mode 100644
index 00000000..c12256b7
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/branch/branch-list/branch-list.component.html
@@ -0,0 +1,88 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ ID
+ {{user.branch_id}}
+
+
+ fk_city_id
+ {{user.fk_city_id}}
+
+
+ Name
+ {{user.name}}
+
+
+ city name
+ {{user.cityname}}
+
+
+
+ createdon
+ {{user.createdon}}
+
+
+ createdby
+ {{user.fk_createdby}}
+
+
+ updated on
+ {{user.updatedon}}
+
+
+ updatedby
+ {{user.fk_updatedby}}
+
+
+ isactive
+ {{user.isactive}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/sineedge_front/src/app/settings/component/branch/branch-list/branch-list.component.scss b/sineedge_front/src/app/settings/component/branch/branch-list/branch-list.component.scss
new file mode 100644
index 00000000..01990255
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/branch/branch-list/branch-list.component.scss
@@ -0,0 +1,28 @@
+/* Structure */
+.example-container {
+ display: flex;
+ flex-direction: column;
+ min-width: 30px;
+ }
+
+ .example-header {
+ min-height: 64px;
+ padding: 8px 24px 0;
+ }
+
+ .mat-dialog-container{
+ width:40% !important;
+ }
+
+ //mat-cell{
+ .cell{
+ display:flex !important;
+ justify-content:center!important;
+
+ }
+
+ // mat-header-cell {
+ .header-cell{
+ display:flex;
+ justify-content:center;
+ }
\ No newline at end of file
diff --git a/sineedge_front/src/app/settings/component/branch/branch-list/branch-list.component.spec.ts b/sineedge_front/src/app/settings/component/branch/branch-list/branch-list.component.spec.ts
new file mode 100644
index 00000000..207c3d97
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/branch/branch-list/branch-list.component.spec.ts
@@ -0,0 +1,25 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { BranchListComponent } from './branch-list.component';
+
+describe('BranchListComponent', () => {
+ let component: BranchListComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ BranchListComponent ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(BranchListComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/sineedge_front/src/app/settings/component/branch/branch-list/branch-list.component.ts b/sineedge_front/src/app/settings/component/branch/branch-list/branch-list.component.ts
new file mode 100644
index 00000000..6514c81c
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/branch/branch-list/branch-list.component.ts
@@ -0,0 +1,83 @@
+import { Component, OnInit, OnDestroy, ViewChild } from '@angular/core';
+import { MatDialog, MatDialogRef, MatDialogConfig,MatPaginator, MatSort,MatTableDataSource } from '@angular/material';
+
+import { Observable, Subject } from 'rxjs';
+import { Http, Response } from '@angular/http';
+import 'rxjs/add/operator/map';
+
+import { DataSource } from '@angular/cdk/collections';
+import { map } from 'rxjs/operators';
+import { of as observableOf, merge } from 'rxjs';
+
+import { MastersService } from '../../../service/master/masters.service';
+import { BranchDialogComponent } from '../branch-dialog/branch-dialog.component';
+import { Branch,States,City } from '../../../model/branch';
+
+@Component({
+ selector: 'app-branch-list',
+ templateUrl: './branch-list.component.html',
+ styleUrls: ['./branch-list.component.scss']
+})
+export class BranchListComponent implements OnInit {
+
+
+ isPopupOpened = true;
+ isactive:number;
+
+
+ constructor(private dialog: MatDialog,
+ private _mastersService: MastersService) { }
+
+ ngOnInit() {}
+
+ displayedColumns = ['branch_id','name','fk_city_id','cname', 'isactive','actions'];
+ dataSource = new UserDataSource(this._mastersService);
+
+ /** Popup for ADD Branch */
+ addBranch() {
+ this.isPopupOpened = true;
+ const dialogRef = this.dialog.open(BranchDialogComponent, {
+ data: {}
+ });
+
+ dialogRef.afterClosed().subscribe(result => {
+ this.isPopupOpened = false;
+ });
+ }
+
+ /** Popup for EDIT Branch */
+ editBranch(arr: Branch[]) {
+ this.isPopupOpened = true;
+
+ const dialogRef = this.dialog.open(BranchDialogComponent, {
+ data: arr
+ });
+
+ dialogRef.afterClosed().subscribe(result => {
+ this.isPopupOpened = false;
+ });
+ }
+
+ /** Popup for EDIT Branch */
+ deleteBranch(id: number) {
+
+ this._mastersService.deleteMasterDetails(id,'BRANCH').subscribe();
+
+ }
+}
+
+export class UserDataSource extends DataSource {
+
+
+ constructor(private _ms: MastersService) {
+ super();
+ }
+
+ connect(): Observable {
+ //return this.userService.getUser();
+ //return this._bs.getAllBranch();
+ console.log(this._ms.getAllBranch());
+ return this._ms.getAllBranch();
+ }
+ disconnect() {}
+}
diff --git a/sineedge_front/src/app/settings/component/city/city-dialog/city-dialog.component.html b/sineedge_front/src/app/settings/component/city/city-dialog/city-dialog.component.html
new file mode 100644
index 00000000..ec9e1fcf
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/city/city-dialog/city-dialog.component.html
@@ -0,0 +1,56 @@
+
+
+
+
+
diff --git a/sineedge_front/src/app/settings/component/city/city-dialog/city-dialog.component.scss b/sineedge_front/src/app/settings/component/city/city-dialog/city-dialog.component.scss
new file mode 100644
index 00000000..3e80f0db
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/city/city-dialog/city-dialog.component.scss
@@ -0,0 +1,3 @@
+mat-form-field{
+ width:100%;
+}
\ No newline at end of file
diff --git a/sineedge_front/src/app/settings/component/city/city-dialog/city-dialog.component.spec.ts b/sineedge_front/src/app/settings/component/city/city-dialog/city-dialog.component.spec.ts
new file mode 100644
index 00000000..fbe710de
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/city/city-dialog/city-dialog.component.spec.ts
@@ -0,0 +1,25 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { CityDialogComponent } from './city-dialog.component';
+
+describe('CityDialogComponent', () => {
+ let component: CityDialogComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ CityDialogComponent ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(CityDialogComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/sineedge_front/src/app/settings/component/city/city-dialog/city-dialog.component.ts b/sineedge_front/src/app/settings/component/city/city-dialog/city-dialog.component.ts
new file mode 100644
index 00000000..7cde5489
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/city/city-dialog/city-dialog.component.ts
@@ -0,0 +1,68 @@
+import { Component, OnInit, Inject } from '@angular/core';
+import { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';
+import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
+
+import { MastersService } from '../../../service/master/masters.service';
+@Component({
+ selector: 'app-jazz-dialog',
+ templateUrl: './city-dialog.component.html',
+ styleUrls: ['./city-dialog.component.scss']
+})
+export class CityDialogComponent implements OnInit {
+
+
+ public _cityForm: FormGroup;
+
+ constructor(private _formBuilder: FormBuilder,
+ private dialogRef: MatDialogRef,
+ private _MastersService: MastersService,
+ @Inject(MAT_DIALOG_DATA) public data: any) { }
+
+ onNoClick(): void {
+ this.dialogRef.close();
+ }
+
+ ngOnInit() {
+
+ this._cityForm = this._formBuilder.group({
+ //City_id: any; fk_city_id: any;
+
+ city_id: [this.data.city_id],
+ name: [this.data.name, Validators.compose([Validators.required])],
+ fk_state_id: [this.data.fk_state_id, Validators.compose([Validators.required])]
+ });
+ //console.log(this._cityForm);
+ }
+
+ // onSubmit() {
+ // if (isNaN(this.data.ID)) {
+ // this._MastersService.addCity(this._cityForm.value);
+ // this.dialogRef.close();
+ // } else {
+ // this._MastersService.editCity(this._cityForm.value);
+ // this.dialogRef.close();
+ // }
+ // }
+
+ onSubmit() {
+ if(isNaN(this.data.city_id)) {
+ var my_array = this._cityForm.value;
+ Object.keys(my_array).forEach((key) => ( my_array[key] == null) && delete my_array[key]);
+ console.log(my_array);
+ this._MastersService.addMasterDetails(my_array,'CITY').subscribe();
+ this.dialogRef.close();
+ alert("saved");
+ } else {
+
+ this._MastersService.editMasterDetails(this._cityForm.value,'CITY').subscribe();
+ this.dialogRef.close();
+ alert("edited");
+ }
+ }
+
+
+
+ onReset(){
+ this._cityForm.reset();
+ }
+}
diff --git a/sineedge_front/src/app/settings/component/city/city-list/city-list.component.html b/sineedge_front/src/app/settings/component/city/city-list/city-list.component.html
new file mode 100644
index 00000000..373ca22d
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/city/city-list/city-list.component.html
@@ -0,0 +1,64 @@
+
+
+
+
+
+
+
+
+
+
+
+ Name
+ {{user.name}}
+
+
+ ID
+ {{user.city_id}}
+
+
+ state ID
+ {{user.fk_state_id}}
+
+
+ isactive
+ {{user.isactive}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/sineedge_front/src/app/settings/component/city/city-list/city-list.component.scss b/sineedge_front/src/app/settings/component/city/city-list/city-list.component.scss
new file mode 100644
index 00000000..e69de29b
diff --git a/sineedge_front/src/app/settings/component/city/city-list/city-list.component.spec.ts b/sineedge_front/src/app/settings/component/city/city-list/city-list.component.spec.ts
new file mode 100644
index 00000000..8f3c58ba
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/city/city-list/city-list.component.spec.ts
@@ -0,0 +1,25 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { CityListComponent } from './city-list.component';
+
+describe('CityListComponent', () => {
+ let component: CityListComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ CityListComponent ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(CityListComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/sineedge_front/src/app/settings/component/city/city-list/city-list.component.ts b/sineedge_front/src/app/settings/component/city/city-list/city-list.component.ts
new file mode 100644
index 00000000..6c59de8e
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/city/city-list/city-list.component.ts
@@ -0,0 +1,88 @@
+import { Component, OnInit, OnDestroy, ViewChild } from '@angular/core';
+import { MatDialog, MatDialogRef, MatDialogConfig,MatPaginator, MatSort,MatTableDataSource } from '@angular/material';
+
+import { Observable, Subject } from 'rxjs';
+import { Http, Response } from '@angular/http';
+import 'rxjs/add/operator/map';
+
+import { DataSource } from '@angular/cdk/collections';
+import { map } from 'rxjs/operators';
+import { of as observableOf, merge } from 'rxjs';
+
+
+import { MastersService } from '../../../service/master/masters.service';
+import { CityDialogComponent } from '../city-dialog/city-dialog.component';
+import { City } from '../../../model/city';
+
+
+@Component({
+ selector: 'app-city-list',
+ templateUrl: './city-list.component.html',
+ styleUrls: ['./city-list.component.scss']
+})
+export class CityListComponent implements OnInit {
+
+ isPopupOpened = true;
+ //, createdon, fk_createdby, updatedon, fk_updatedby, isactive
+ displayedColumns = ['city_id', 'fk_state_id', 'name', 'isactive','actions'];
+
+ @ViewChild(MatPaginator) paginator: MatPaginator;
+ @ViewChild(MatSort) sort: MatSort;
+
+ constructor(private dialog: MatDialog,
+ private _MastersService: MastersService) { }
+
+ // get CityList() {
+ // return this._MastersService.getAllCity();
+ // }
+
+ dataSource = new UserDataSource(this._MastersService);
+
+ ngOnInit() {
+ }
+
+
+ addCity() {
+ this.isPopupOpened = true;
+ const dialogRef = this.dialog.open(CityDialogComponent, {
+ data: {}
+ });
+
+
+ dialogRef.afterClosed().subscribe(result => {
+ this.isPopupOpened = false;
+ });
+ }
+
+ editCity(arr: any[]) {
+ this.isPopupOpened = true;
+ //const contact = this._MastersService.getAllCity().find(c => c.ID === id);
+ const dialogRef = this.dialog.open(CityDialogComponent, {
+ data: arr
+ });
+
+
+ dialogRef.afterClosed().subscribe(result => {
+ this.isPopupOpened = false;
+ });
+ }
+
+ deleteCity(id: number) {
+ this._MastersService.deleteMasterDetails(id,'CITY');
+ }
+}
+
+export class UserDataSource extends DataSource {
+
+
+ constructor(private _bs: MastersService) {
+ super();
+ }
+
+ connect(): Observable {
+ //return this.userService.getUser();
+ return this._bs.getAllCity();
+ }
+ disconnect() {}
+}
+
diff --git a/sineedge_front/src/app/settings/component/comments-on-locality/comments-on-locality-dialog/comments-on-locality-dialog.component.html b/sineedge_front/src/app/settings/component/comments-on-locality/comments-on-locality-dialog/comments-on-locality-dialog.component.html
new file mode 100644
index 00000000..971efad8
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/comments-on-locality/comments-on-locality-dialog/comments-on-locality-dialog.component.html
@@ -0,0 +1,42 @@
+
+
+
Comment On Locality
+
+
+
+
+
+
+
diff --git a/sineedge_front/src/app/settings/component/comments-on-locality/comments-on-locality-dialog/comments-on-locality-dialog.component.scss b/sineedge_front/src/app/settings/component/comments-on-locality/comments-on-locality-dialog/comments-on-locality-dialog.component.scss
new file mode 100644
index 00000000..3e80f0db
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/comments-on-locality/comments-on-locality-dialog/comments-on-locality-dialog.component.scss
@@ -0,0 +1,3 @@
+mat-form-field{
+ width:100%;
+}
\ No newline at end of file
diff --git a/sineedge_front/src/app/settings/component/comments-on-locality/comments-on-locality-dialog/comments-on-locality-dialog.component.spec.ts b/sineedge_front/src/app/settings/component/comments-on-locality/comments-on-locality-dialog/comments-on-locality-dialog.component.spec.ts
new file mode 100644
index 00000000..ea650445
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/comments-on-locality/comments-on-locality-dialog/comments-on-locality-dialog.component.spec.ts
@@ -0,0 +1,25 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { CommentsOnLocalityDialogComponent } from './comments-on-locality-dialog.component';
+
+describe('CommentsOnLocalityDialogComponent', () => {
+ let component: CommentsOnLocalityDialogComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ CommentsOnLocalityDialogComponent ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(CommentsOnLocalityDialogComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/sineedge_front/src/app/settings/component/comments-on-locality/comments-on-locality-dialog/comments-on-locality-dialog.component.ts b/sineedge_front/src/app/settings/component/comments-on-locality/comments-on-locality-dialog/comments-on-locality-dialog.component.ts
new file mode 100644
index 00000000..923b4854
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/comments-on-locality/comments-on-locality-dialog/comments-on-locality-dialog.component.ts
@@ -0,0 +1,58 @@
+import { Component, OnInit, Inject } from '@angular/core';
+import { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';
+import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
+import { MastersService } from '../../../service/master/masters.service';
+
+
+@Component({
+ selector: 'app-jazz-dialog',
+ templateUrl: './comments-on-locality-dialog.component.html',
+ styleUrls: ['./comments-on-locality-dialog.component.scss']
+})
+export class CommentsOnLocalityDialogComponent implements OnInit {
+
+
+ public _CommentOnLocalityForm: FormGroup;
+
+ constructor(private _formBuilder: FormBuilder,
+ private dialogRef: MatDialogRef,
+ private _MastersService: MastersService,
+ @Inject(MAT_DIALOG_DATA) public data: any) { }
+
+ onNoClick(): void {
+ this.dialogRef.close();
+ }
+
+ ngOnInit() {
+
+ this._CommentOnLocalityForm = this._formBuilder.group({
+ //branch_id: any; fk_city_id: any;
+ comments_on_locality_id: [this.data.comments_on_locality_id],
+ rating: [this.data.rating, Validators.compose([Validators.required])],
+ });
+
+ }
+
+
+ onSubmit() {
+ if(isNaN(this.data.comments_on_locality_id)) {
+ var my_array = this._CommentOnLocalityForm.value;
+ Object.keys(my_array).forEach((key) => ( my_array[key] == null) && delete my_array[key]);
+ console.log(my_array);
+ this._MastersService.addMasterDetails(my_array,'COMMENTSONLOCALITY').subscribe();
+ this.dialogRef.close();
+ alert("saved");
+ } else {
+
+ this._MastersService.editMasterDetails(this._CommentOnLocalityForm.value,'COMMENTSONLOCALITY').subscribe();
+ this.dialogRef.close();
+ alert("edited");
+ }
+ }
+
+
+
+ onReset(){
+ this._CommentOnLocalityForm.reset();
+ }
+}
diff --git a/sineedge_front/src/app/settings/component/comments-on-locality/comments-on-locality-list/comments-on-locality-list.component.html b/sineedge_front/src/app/settings/component/comments-on-locality/comments-on-locality-list/comments-on-locality-list.component.html
new file mode 100644
index 00000000..2aef00cc
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/comments-on-locality/comments-on-locality-list/comments-on-locality-list.component.html
@@ -0,0 +1,59 @@
+
+
+
+
+
+
+
+
+
+
+
+ No
+ {{user.comments_on_locality_id}}
+
+
+ Rating
+ {{user.rating}}
+
+
+ isactive
+ {{user.isactive}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/sineedge_front/src/app/settings/component/comments-on-locality/comments-on-locality-list/comments-on-locality-list.component.scss b/sineedge_front/src/app/settings/component/comments-on-locality/comments-on-locality-list/comments-on-locality-list.component.scss
new file mode 100644
index 00000000..e69de29b
diff --git a/sineedge_front/src/app/settings/component/comments-on-locality/comments-on-locality-list/comments-on-locality-list.component.spec.ts b/sineedge_front/src/app/settings/component/comments-on-locality/comments-on-locality-list/comments-on-locality-list.component.spec.ts
new file mode 100644
index 00000000..81bfc8c3
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/comments-on-locality/comments-on-locality-list/comments-on-locality-list.component.spec.ts
@@ -0,0 +1,25 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { CommentsOnLocalityListComponent } from './comments-on-locality-list.component';
+
+describe('CommentsOnLocalityListComponent', () => {
+ let component: CommentsOnLocalityListComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ CommentsOnLocalityListComponent ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(CommentsOnLocalityListComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/sineedge_front/src/app/settings/component/comments-on-locality/comments-on-locality-list/comments-on-locality-list.component.ts b/sineedge_front/src/app/settings/component/comments-on-locality/comments-on-locality-list/comments-on-locality-list.component.ts
new file mode 100644
index 00000000..7b2d48a4
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/comments-on-locality/comments-on-locality-list/comments-on-locality-list.component.ts
@@ -0,0 +1,86 @@
+import { Component, OnInit, OnDestroy, ViewChild } from '@angular/core';
+import { MatDialog, MatDialogRef, MatDialogConfig,MatPaginator, MatSort,MatTableDataSource } from '@angular/material';
+
+import { Observable, Subject } from 'rxjs';
+import { Http, Response } from '@angular/http';
+import 'rxjs/add/operator/map';
+
+import { DataSource } from '@angular/cdk/collections';
+import { map } from 'rxjs/operators';
+import { of as observableOf, merge } from 'rxjs';
+
+
+import { MastersService } from '../../../service/master/masters.service';
+import { CommentsOnLocalityDialogComponent } from '../comments-on-locality-dialog/comments-on-locality-dialog.component';
+import { CommentsOnLocality } from '../../../model/comments-on-locality';
+
+
+@Component({
+ selector: 'app-comments-on-locality-list',
+ templateUrl: './comments-on-locality-list.component.html',
+ styleUrls: ['./comments-on-locality-list.component.scss']
+})
+export class CommentsOnLocalityListComponent implements OnInit {
+
+ isPopupOpened = true;
+ displayedColumns = ['comments_on_locality_id','rating','isactive','actions'];
+
+ @ViewChild(MatPaginator) paginator: MatPaginator;
+ @ViewChild(MatSort) sort: MatSort;
+
+ constructor(private dialog: MatDialog,
+ private _MastersService: MastersService) { }
+
+ // get CommentsOnLocalityList() {
+ // return this._MastersService.getAllCommentsOnLocality();
+ // }
+
+ dataSource = new UserDataSource(this._MastersService);
+
+ ngOnInit() {
+ }
+
+
+ addCommentsOnLocality() {
+ this.isPopupOpened = true;
+ const dialogRef = this.dialog.open(CommentsOnLocalityDialogComponent, {
+ data: {}
+ });
+
+
+ dialogRef.afterClosed().subscribe(result => {
+ this.isPopupOpened = false;
+ });
+ }
+
+ editCommentsOnLocality(arr: any[]) {
+ this.isPopupOpened = true;
+ //const contact = this._MastersService.getAllCommentsOnLocality().find(c => c.ID === id);
+ const dialogRef = this.dialog.open(CommentsOnLocalityDialogComponent, {
+ data: arr
+ });
+
+
+ dialogRef.afterClosed().subscribe(result => {
+ this.isPopupOpened = false;
+ });
+ }
+
+ deleteCommentsOnLocality(id: number) {
+ this._MastersService.deleteMasterDetails(id,'COMMENTSONLOCALITY');
+ }
+}
+
+export class UserDataSource extends DataSource {
+
+
+ constructor(private _bs: MastersService) {
+ super();
+ }
+
+ connect(): Observable {
+ //return this.userService.getUser();
+ return this._bs.getAllCommentsOnLocality();
+ }
+ disconnect() {}
+}
diff --git a/sineedge_front/src/app/settings/component/company/company-dialog/company-dialog.component.html b/sineedge_front/src/app/settings/component/company/company-dialog/company-dialog.component.html
new file mode 100644
index 00000000..de1dfbda
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/company/company-dialog/company-dialog.component.html
@@ -0,0 +1,84 @@
+
+
Company
+
+
+
+
+
+
\ No newline at end of file
diff --git a/sineedge_front/src/app/settings/component/company/company-dialog/company-dialog.component.scss b/sineedge_front/src/app/settings/component/company/company-dialog/company-dialog.component.scss
new file mode 100644
index 00000000..e69de29b
diff --git a/sineedge_front/src/app/settings/component/company/company-dialog/company-dialog.component.spec.ts b/sineedge_front/src/app/settings/component/company/company-dialog/company-dialog.component.spec.ts
new file mode 100644
index 00000000..35920973
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/company/company-dialog/company-dialog.component.spec.ts
@@ -0,0 +1,25 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { CompanyDialogComponent } from './company-dialog.component';
+
+describe('CompanyDialogComponent', () => {
+ let component: CompanyDialogComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ CompanyDialogComponent ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(CompanyDialogComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/sineedge_front/src/app/settings/component/company/company-dialog/company-dialog.component.ts b/sineedge_front/src/app/settings/component/company/company-dialog/company-dialog.component.ts
new file mode 100644
index 00000000..46d322a2
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/company/company-dialog/company-dialog.component.ts
@@ -0,0 +1,77 @@
+
+import { Component, OnInit, Inject } from '@angular/core';
+import { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';
+import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
+//import { CompanyService } from '../../../service/company.service';
+import { MastersService } from '../../../service/master/masters.service';
+
+
+@Component({
+ selector: 'app-jazz-dialog',
+ templateUrl: './company-dialog.component.html',
+ styleUrls: ['./company-dialog.component.scss']
+})
+export class CompanyDialogComponent implements OnInit {
+
+
+ public _companyForm: FormGroup;
+
+ constructor(private _formBuilder: FormBuilder,
+ private dialogRef: MatDialogRef,
+ private _masterService: MastersService,
+ @Inject(MAT_DIALOG_DATA) public data: any) { }
+
+ onNoClick(): void {
+ this.dialogRef.close();
+ }
+
+ ngOnInit() {
+
+ this._companyForm = this._formBuilder.group({
+ //Company_id: any; fk_city_id: any;
+ //
+ company_id: [this.data.company_id],
+ name: [this.data.name, Validators.compose([Validators.required])],
+ addressline1: [this.data.addressline1, Validators.compose([Validators.required])],
+ addressline2: [this.data.addressline2, Validators.compose([Validators.required])],
+ addressline3: [this.data.addressline3, Validators.compose([Validators.required])],
+ city: [this.data.city, Validators.compose([Validators.required])],
+ state: [this.data.state, Validators.compose([Validators.required])],
+ pincode: [this.data.pincode, Validators.compose([Validators.required, Validators.minLength(5), Validators.maxLength(6)])],
+ logo : [this.data.logo, Validators.compose([Validators.required])]
+
+ });
+ }
+
+ // onSubmit() {
+ // if (isNaN(this.data.ID)) {
+ // this._companyService.addCompany(this._companyForm.value);
+ // this.dialogRef.close();
+ // } else {
+ // this._companyService.editCompany(this._companyForm.value);
+ // this.dialogRef.close();
+ // }
+ // }
+
+ onSubmit() {
+ if(isNaN(this.data.company_id)) {
+ var my_array = this._companyForm.value;
+ Object.keys(my_array).forEach((key) => ( my_array[key] == null) && delete my_array[key]);
+ console.log(my_array);
+ this._masterService.addMasterDetails(my_array,'COMPANY').subscribe();
+ this.dialogRef.close();
+ alert("saved");
+ } else {
+
+ this._masterService.editMasterDetails(this._companyForm.value,'COMPANY').subscribe();
+ this.dialogRef.close();
+ alert("edited");
+ }
+ }
+
+
+
+ onReset(){
+ this._companyForm.reset();
+ }
+}
diff --git a/sineedge_front/src/app/settings/component/company/company-list/company-list.component.html b/sineedge_front/src/app/settings/component/company/company-list/company-list.component.html
new file mode 100644
index 00000000..50993b34
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/company/company-list/company-list.component.html
@@ -0,0 +1,84 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+ {{user.company_id}}
+
+
+ Name
+ {{user.name}}
+
+
+ address
+ {{user.addressline1}}
+
+
+ address 2
+ {{user.addressline2}}
+
+
+ address 3
+ {{user.addressline3}}
+
+
+ city
+ {{user.city}}
+
+
+ state
+ {{user.state}}
+
+
+ Pincode
+ {{user.pincode}}
+
+
+ logo name
+ {{user.logo}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/sineedge_front/src/app/settings/component/company/company-list/company-list.component.scss b/sineedge_front/src/app/settings/component/company/company-list/company-list.component.scss
new file mode 100644
index 00000000..e69de29b
diff --git a/sineedge_front/src/app/settings/component/company/company-list/company-list.component.spec.ts b/sineedge_front/src/app/settings/component/company/company-list/company-list.component.spec.ts
new file mode 100644
index 00000000..f9d0a521
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/company/company-list/company-list.component.spec.ts
@@ -0,0 +1,25 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { CompanyListComponent } from './company-list.component';
+
+describe('CompanyListComponent', () => {
+ let component: CompanyListComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ CompanyListComponent ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(CompanyListComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/sineedge_front/src/app/settings/component/company/company-list/company-list.component.ts b/sineedge_front/src/app/settings/component/company/company-list/company-list.component.ts
new file mode 100644
index 00000000..9c6203c1
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/company/company-list/company-list.component.ts
@@ -0,0 +1,88 @@
+import { Component, OnInit, OnDestroy, ViewChild } from '@angular/core';
+import { MatDialog, MatDialogRef, MatDialogConfig,MatPaginator, MatSort,MatTableDataSource } from '@angular/material';
+
+import { Observable, Subject } from 'rxjs';
+import { Http, Response } from '@angular/http';
+import 'rxjs/add/operator/map';
+
+import { DataSource } from '@angular/cdk/collections';
+import { map } from 'rxjs/operators';
+import { of as observableOf, merge } from 'rxjs';
+
+
+import { CompanyDialogComponent } from '../company-dialog/company-dialog.component';
+import { Company } from '../../../model/company';
+import { MastersService } from '../../../service/master/masters.service';
+
+
+@Component({
+ selector: 'app-company-list',
+ templateUrl: './company-list.component.html',
+ styleUrls: ['./company-list.component.scss']
+})
+export class CompanyListComponent implements OnInit {
+
+ isPopupOpened = true;
+ //displayedColumns = ['Company_id', 'fk_city_id', 'name', 'createdon', 'fk_createdby', 'updatedon', 'fk_updatedby', 'isactive','actions'];
+ displayedColumns = ['company_id', 'name', 'addressline1', 'addressline2','addressline3', 'city', 'state', 'pincode', 'logo','action'];
+
+ @ViewChild(MatPaginator) paginator: MatPaginator;
+ @ViewChild(MatSort) sort: MatSort;
+
+
+ constructor(private dialog: MatDialog,
+ private _MastersService: MastersService) { }
+
+ // get CompanyList() {
+ // return this._MastersService.getAllCompany();
+ // }
+
+ dataSource = new UserDataSource(this._MastersService);
+
+ ngOnInit() {
+ }
+
+
+ addCompany() {
+ this.isPopupOpened = true;
+ const dialogRef = this.dialog.open(CompanyDialogComponent, {
+ data: {}
+ });
+
+
+ dialogRef.afterClosed().subscribe(result => {
+ this.isPopupOpened = false;
+ });
+ }
+
+ editCompany(arr: any[]) {
+ this.isPopupOpened = true;
+ //const contact = this._MastersService.getAllCompany().find(c => c.ID === id);
+ const dialogRef = this.dialog.open(CompanyDialogComponent, {
+ data: arr
+ });
+
+
+ dialogRef.afterClosed().subscribe(result => {
+ this.isPopupOpened = false;
+ });
+ }
+
+ deleteCompany(id: number) {
+ this._MastersService.deleteMasterDetails(id,'COMPANY');
+ }
+}
+
+export class UserDataSource extends DataSource {
+
+
+ constructor(private _bs: MastersService) {
+ super();
+ }
+
+ connect(): Observable {
+ //return this.userService.getUser();
+ return this._bs.getAllCompany();
+ }
+ disconnect() {}
+}
diff --git a/sineedge_front/src/app/settings/component/customer-behaviour/customer-behaviour-dialog/customer-behaviour-dialog.component.html b/sineedge_front/src/app/settings/component/customer-behaviour/customer-behaviour-dialog/customer-behaviour-dialog.component.html
new file mode 100644
index 00000000..a42e0dae
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/customer-behaviour/customer-behaviour-dialog/customer-behaviour-dialog.component.html
@@ -0,0 +1,43 @@
+
+
+
Customer Behaviour
+
+
+
+
+
+
+
diff --git a/sineedge_front/src/app/settings/component/customer-behaviour/customer-behaviour-dialog/customer-behaviour-dialog.component.scss b/sineedge_front/src/app/settings/component/customer-behaviour/customer-behaviour-dialog/customer-behaviour-dialog.component.scss
new file mode 100644
index 00000000..3e80f0db
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/customer-behaviour/customer-behaviour-dialog/customer-behaviour-dialog.component.scss
@@ -0,0 +1,3 @@
+mat-form-field{
+ width:100%;
+}
\ No newline at end of file
diff --git a/sineedge_front/src/app/settings/component/customer-behaviour/customer-behaviour-dialog/customer-behaviour-dialog.component.spec.ts b/sineedge_front/src/app/settings/component/customer-behaviour/customer-behaviour-dialog/customer-behaviour-dialog.component.spec.ts
new file mode 100644
index 00000000..ab3715a4
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/customer-behaviour/customer-behaviour-dialog/customer-behaviour-dialog.component.spec.ts
@@ -0,0 +1,25 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { CustomerBehaviourDialogComponent } from './customer-behaviour-dialog.component';
+
+describe('CustomerBehaviourDialogComponent', () => {
+ let component: CustomerBehaviourDialogComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ CustomerBehaviourDialogComponent ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(CustomerBehaviourDialogComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/sineedge_front/src/app/settings/component/customer-behaviour/customer-behaviour-dialog/customer-behaviour-dialog.component.ts b/sineedge_front/src/app/settings/component/customer-behaviour/customer-behaviour-dialog/customer-behaviour-dialog.component.ts
new file mode 100644
index 00000000..6f4a9171
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/customer-behaviour/customer-behaviour-dialog/customer-behaviour-dialog.component.ts
@@ -0,0 +1,68 @@
+import { Component, OnInit, Inject } from '@angular/core';
+import { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';
+import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
+import { MastersService } from '../../../service/master/masters.service';
+
+
+@Component({
+ selector: 'app-jazz-dialog',
+ templateUrl: './customer-behaviour-dialog.component.html',
+ styleUrls: ['./customer-behaviour-dialog.component.scss']
+})
+export class CustomerBehaviourDialogComponent implements OnInit {
+
+ public _customerBehaviourForm: FormGroup;
+
+ constructor(private _formBuilder: FormBuilder,
+ private dialogRef: MatDialogRef,
+ private _MastersService: MastersService,
+ @Inject(MAT_DIALOG_DATA) public data: any) { }
+
+ onNoClick(): void {
+ this.dialogRef.close();
+ }
+
+ ngOnInit() {
+
+ this._customerBehaviourForm = this._formBuilder.group({
+ //branch_id: any; fk_city_id: any;
+ customer_behaviour_id: [this.data.customer_behaviour_id],
+ description: [this.data.description, Validators.compose([Validators.required])]
+
+ });
+ //customer_behaviour_id, description, createdon, fk_createdby, updatedon, fk_updatedby, isactive
+ //console.log(this._customerBehaviourForm);
+ }
+
+ // onSubmit() {
+ // if (isNaN(this.data.ID)) {
+ // this._MastersService.addBranch(this._customerBehaviourForm.value);
+ // this.dialogRef.close();
+ // } else {
+ // this._MastersService.editBranch(this._customerBehaviourForm.value);
+ // this.dialogRef.close();
+ // }
+ // }
+
+ onSubmit() {
+ if(isNaN(this.data.customer_behaviour_id)) {
+ var my_array = this._customerBehaviourForm.value;
+ Object.keys(my_array).forEach((key) => ( my_array[key] == null) && delete my_array[key]);
+ console.log(my_array);
+ this._MastersService.addMasterDetails(my_array,'CUSTOMERBEHAVIOUR').subscribe();
+ this.dialogRef.close();
+ alert("saved");
+ } else {
+
+ this._MastersService.editMasterDetails(this._customerBehaviourForm.value,'CUSTOMERBEHAVIOUR').subscribe();
+ this.dialogRef.close();
+ alert("edited");
+ }
+ }
+
+
+
+ onReset(){
+ this._customerBehaviourForm.reset();
+ }
+}
diff --git a/sineedge_front/src/app/settings/component/customer-behaviour/customer-behaviour-list/customer-behaviour-list.component.html b/sineedge_front/src/app/settings/component/customer-behaviour/customer-behaviour-list/customer-behaviour-list.component.html
new file mode 100644
index 00000000..ba345cf3
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/customer-behaviour/customer-behaviour-list/customer-behaviour-list.component.html
@@ -0,0 +1,59 @@
+
+
+
+
+
+
+
+
+
+
+
+ ID
+ {{user.customer_behaviour_id}}
+
+
+ description
+ {{user.description}}
+
+
+ isactive
+ {{user.isactive}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/sineedge_front/src/app/settings/component/customer-behaviour/customer-behaviour-list/customer-behaviour-list.component.scss b/sineedge_front/src/app/settings/component/customer-behaviour/customer-behaviour-list/customer-behaviour-list.component.scss
new file mode 100644
index 00000000..e69de29b
diff --git a/sineedge_front/src/app/settings/component/customer-behaviour/customer-behaviour-list/customer-behaviour-list.component.spec.ts b/sineedge_front/src/app/settings/component/customer-behaviour/customer-behaviour-list/customer-behaviour-list.component.spec.ts
new file mode 100644
index 00000000..594ef232
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/customer-behaviour/customer-behaviour-list/customer-behaviour-list.component.spec.ts
@@ -0,0 +1,25 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { CustomerBehaviourListComponent } from './customer-behaviour-list.component';
+
+describe('CustomerBehaviourListComponent', () => {
+ let component: CustomerBehaviourListComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ CustomerBehaviourListComponent ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(CustomerBehaviourListComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/sineedge_front/src/app/settings/component/customer-behaviour/customer-behaviour-list/customer-behaviour-list.component.ts b/sineedge_front/src/app/settings/component/customer-behaviour/customer-behaviour-list/customer-behaviour-list.component.ts
new file mode 100644
index 00000000..efde5704
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/customer-behaviour/customer-behaviour-list/customer-behaviour-list.component.ts
@@ -0,0 +1,87 @@
+import { Component, OnInit, OnDestroy, ViewChild } from '@angular/core';
+import { MatDialog, MatDialogRef, MatDialogConfig,MatPaginator, MatSort,MatTableDataSource } from '@angular/material';
+
+import { Observable, Subject } from 'rxjs';
+import { Http, Response } from '@angular/http';
+import 'rxjs/add/operator/map';
+
+import { DataSource } from '@angular/cdk/collections';
+import { map } from 'rxjs/operators';
+import { of as observableOf, merge } from 'rxjs';
+
+
+import { MastersService } from '../../../service/master/masters.service';
+import { CustomerBehaviourDialogComponent } from '../customer-behaviour-dialog/customer-behaviour-dialog.component';
+import { CustomerBehaviour } from '../../../model/customer-behaviour';
+
+
+@Component({
+ selector: 'app-customer-behaviour-list',
+ templateUrl: './customer-behaviour-list.component.html',
+ styleUrls: ['./customer-behaviour-list.component.scss']
+})
+export class CustomerBehaviourListComponent implements OnInit {
+
+ isPopupOpened = true;
+ displayedColumns = ['customer_behaviour_id', 'description', 'isactive','actions'];
+
+ @ViewChild(MatPaginator) paginator: MatPaginator;
+ @ViewChild(MatSort) sort: MatSort;
+
+
+ constructor(private dialog: MatDialog,
+ private _MastersService: MastersService) { }
+
+ // get CustomerBehaviourList() {
+ // return this._MastersService.getAllCustomerBehaviour();
+ // }
+
+ dataSource = new UserDataSource(this._MastersService);
+
+ ngOnInit() {
+ }
+
+
+ addCustomerBehaviour() {
+ this.isPopupOpened = true;
+ const dialogRef = this.dialog.open(CustomerBehaviourDialogComponent, {
+ data: {}
+ });
+
+
+ dialogRef.afterClosed().subscribe(result => {
+ this.isPopupOpened = false;
+ });
+ }
+
+ editCustomerBehaviour(arr: any[]) {
+ this.isPopupOpened = true;
+ //const contact = this._MastersService.getAllCustomerBehaviour().find(c => c.ID === id);
+ const dialogRef = this.dialog.open(CustomerBehaviourDialogComponent, {
+ data: arr
+ });
+
+
+ dialogRef.afterClosed().subscribe(result => {
+ this.isPopupOpened = false;
+ });
+ }
+
+ deleteCustomerBehaviour(id: number) {
+ this._MastersService.deleteMasterDetails(id,'CUSTOMERBEHAVIOUR');
+ }
+}
+
+export class UserDataSource extends DataSource {
+
+
+ constructor(private _bs: MastersService) {
+ super();
+ }
+
+ connect(): Observable {
+ //return this.userService.getUser();
+ return this._bs.getAllCustomerBehaviour();
+ }
+ disconnect() {}
+}
diff --git a/sineedge_front/src/app/settings/component/customer-segment/customer-segment-dialog/customer-segment-dialog.component.html b/sineedge_front/src/app/settings/component/customer-segment/customer-segment-dialog/customer-segment-dialog.component.html
new file mode 100644
index 00000000..8f3cdfcf
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/customer-segment/customer-segment-dialog/customer-segment-dialog.component.html
@@ -0,0 +1,49 @@
+
+
+
Customer Segment
+
+
+
+
+
+
+
diff --git a/sineedge_front/src/app/settings/component/customer-segment/customer-segment-dialog/customer-segment-dialog.component.scss b/sineedge_front/src/app/settings/component/customer-segment/customer-segment-dialog/customer-segment-dialog.component.scss
new file mode 100644
index 00000000..3e80f0db
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/customer-segment/customer-segment-dialog/customer-segment-dialog.component.scss
@@ -0,0 +1,3 @@
+mat-form-field{
+ width:100%;
+}
\ No newline at end of file
diff --git a/sineedge_front/src/app/settings/component/customer-segment/customer-segment-dialog/customer-segment-dialog.component.spec.ts b/sineedge_front/src/app/settings/component/customer-segment/customer-segment-dialog/customer-segment-dialog.component.spec.ts
new file mode 100644
index 00000000..7ca82c37
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/customer-segment/customer-segment-dialog/customer-segment-dialog.component.spec.ts
@@ -0,0 +1,25 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { CustomerSegmentDialogComponent } from './customer-segment-dialog.component';
+
+describe('CustomerSegmentDialogComponent', () => {
+ let component: CustomerSegmentDialogComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ CustomerSegmentDialogComponent ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(CustomerSegmentDialogComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/sineedge_front/src/app/settings/component/customer-segment/customer-segment-dialog/customer-segment-dialog.component.ts b/sineedge_front/src/app/settings/component/customer-segment/customer-segment-dialog/customer-segment-dialog.component.ts
new file mode 100644
index 00000000..bf0bde10
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/customer-segment/customer-segment-dialog/customer-segment-dialog.component.ts
@@ -0,0 +1,74 @@
+import { Component, OnInit, Inject } from '@angular/core';
+import { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';
+import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
+import { MastersService } from '../../../service/master/masters.service';
+
+
+@Component({
+ selector: 'app-jazz-dialog',
+ templateUrl: './customer-segment-dialog.component.html',
+ styleUrls: ['./customer-segment-dialog.component.scss']
+})
+export class CustomerSegmentDialogComponent implements OnInit {
+
+ public _customerSegmentForm: FormGroup;
+
+ constructor(private _formBuilder: FormBuilder,
+ private dialogRef: MatDialogRef,
+ private _MastersService: MastersService,
+ @Inject(MAT_DIALOG_DATA) public data: any) { }
+
+ onNoClick(): void {
+ this.dialogRef.close();
+ }
+
+ ngOnInit() {
+
+ this._customerSegmentForm = this._formBuilder.group({
+ //CustomerSegment_id: any; fk_city_id: any;
+ customer_segment_id: [this.data.customer_segment_id],
+ name: [this.data.name, Validators.compose([Validators.required])],
+ abbr: [this.data.abbr, Validators.compose([Validators.required])]
+ });
+ //console.log(this._customerSegmentForm);
+ //customer_segment_id, name, abbr, createdon, fk_createdby, updatedon, isactive, fk_updatedby
+ }
+
+ // onSubmit() {
+ // if (isNaN(this.data.ID)) {
+ // this._MastersService.addCustomerSegment(this._customerSegmentForm.value);
+ // this.dialogRef.close();
+ // } else {
+ // this._MastersService.editCustomerSegment(this._customerSegmentForm.value);
+ // this.dialogRef.close();
+ // }
+ // }
+
+ onSubmit() {
+ if(isNaN(this.data.customer_segment_id)) {
+ var my_array = this._customerSegmentForm.value;
+ Object.keys(my_array).forEach((key) => ( my_array[key] == null) && delete my_array[key]);
+ console.log(my_array);
+ this._MastersService.addMasterDetails(my_array,'CUSTOMERSEGMENT').subscribe();
+ this.dialogRef.close();
+ alert("saved");
+ } else {
+
+ this._MastersService.editMasterDetails(this._customerSegmentForm.value,'CUSTOMERSEGMENT').subscribe();
+ this.dialogRef.close();
+ alert("edited");
+ }
+ }
+
+
+
+ onReset(){
+ this._customerSegmentForm.reset();
+ }
+}
+
+
+
+
+
+
diff --git a/sineedge_front/src/app/settings/component/customer-segment/customer-segment-list/customer-segment-list.component.html b/sineedge_front/src/app/settings/component/customer-segment/customer-segment-list/customer-segment-list.component.html
new file mode 100644
index 00000000..32f3debd
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/customer-segment/customer-segment-list/customer-segment-list.component.html
@@ -0,0 +1,64 @@
+
+
+
+
+
+
+
+
+
+
+
+ ID
+ {{user.customer_segment_id}}
+
+
+ Name
+ {{user.name}}
+
+
+ Abbrevation
+ {{user.abbr}}
+
+
+ isactive
+ {{user.isactive}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/sineedge_front/src/app/settings/component/customer-segment/customer-segment-list/customer-segment-list.component.scss b/sineedge_front/src/app/settings/component/customer-segment/customer-segment-list/customer-segment-list.component.scss
new file mode 100644
index 00000000..e69de29b
diff --git a/sineedge_front/src/app/settings/component/customer-segment/customer-segment-list/customer-segment-list.component.spec.ts b/sineedge_front/src/app/settings/component/customer-segment/customer-segment-list/customer-segment-list.component.spec.ts
new file mode 100644
index 00000000..a8fc7b5f
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/customer-segment/customer-segment-list/customer-segment-list.component.spec.ts
@@ -0,0 +1,25 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { CustomerSegmentListComponent } from './customer-segment-list.component';
+
+describe('CustomerSegmentListComponent', () => {
+ let component: CustomerSegmentListComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ CustomerSegmentListComponent ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(CustomerSegmentListComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/sineedge_front/src/app/settings/component/customer-segment/customer-segment-list/customer-segment-list.component.ts b/sineedge_front/src/app/settings/component/customer-segment/customer-segment-list/customer-segment-list.component.ts
new file mode 100644
index 00000000..7d274c69
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/customer-segment/customer-segment-list/customer-segment-list.component.ts
@@ -0,0 +1,86 @@
+import { Component, OnInit, OnDestroy, ViewChild } from '@angular/core';
+import { MatDialog, MatDialogRef, MatDialogConfig,MatPaginator, MatSort,MatTableDataSource } from '@angular/material';
+
+import { Observable, Subject } from 'rxjs';
+import { Http, Response } from '@angular/http';
+import 'rxjs/add/operator/map';
+
+import { DataSource } from '@angular/cdk/collections';
+import { map } from 'rxjs/operators';
+import { of as observableOf, merge } from 'rxjs';
+
+
+import { MastersService } from '../../../service/master/masters.service';
+import { CustomerSegmentDialogComponent } from '../customer-segment-dialog/customer-segment-dialog.component';
+import { CustomerSegment } from '../../../model/customer-segment';
+
+
+@Component({
+ selector: 'app-customer-segment-list',
+ templateUrl: './customer-segment-list.component.html',
+ styleUrls: ['./customer-segment-list.component.scss']
+})
+export class CustomerSegmentListComponent implements OnInit {
+ isPopupOpened = true;
+ displayedColumns = ['customer_segment_id', 'abbr', 'name', 'isactive','actions'];
+
+ @ViewChild(MatPaginator) paginator: MatPaginator;
+ @ViewChild(MatSort) sort: MatSort;
+
+
+ constructor(private dialog: MatDialog,
+ private _MastersService: MastersService) { }
+
+ // get CustomerSegmentList() {
+ // return this._MastersService.getAllCustomerSegment();
+ // }
+
+ dataSource = new UserDataSource(this._MastersService);
+
+ ngOnInit() {
+ }
+
+
+ addCustomerSegment() {
+ this.isPopupOpened = true;
+ const dialogRef = this.dialog.open(CustomerSegmentDialogComponent, {
+ data: {}
+ });
+
+
+ dialogRef.afterClosed().subscribe(result => {
+ this.isPopupOpened = false;
+ });
+ }
+
+ editCustomerSegment(arr: any[]) {
+ this.isPopupOpened = true;
+ //const contact = this._MastersService.getAllCustomerSegment().find(c => c.ID === id);
+ const dialogRef = this.dialog.open(CustomerSegmentDialogComponent, {
+ data: arr
+ });
+
+
+ dialogRef.afterClosed().subscribe(result => {
+ this.isPopupOpened = false;
+ });
+ }
+
+ deleteCustomerSegment(id: number) {
+ this._MastersService.deleteMasterDetails(id,'CUSTOMERSEGMENT');
+ }
+}
+
+export class UserDataSource extends DataSource {
+
+
+ constructor(private _bs: MastersService) {
+ super();
+ }
+
+ connect(): Observable {
+ //return this.userService.getUser();
+ return this._bs.getAllCustomerSegment();
+ }
+ disconnect() {}
+}
diff --git a/sineedge_front/src/app/settings/component/designation/designation-dialog/designation-dialog.component.html b/sineedge_front/src/app/settings/component/designation/designation-dialog/designation-dialog.component.html
new file mode 100644
index 00000000..85dd5b0f
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/designation/designation-dialog/designation-dialog.component.html
@@ -0,0 +1,51 @@
+
+
+
Designation
+
+
+
+
+
+
+
diff --git a/sineedge_front/src/app/settings/component/designation/designation-dialog/designation-dialog.component.scss b/sineedge_front/src/app/settings/component/designation/designation-dialog/designation-dialog.component.scss
new file mode 100644
index 00000000..3e80f0db
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/designation/designation-dialog/designation-dialog.component.scss
@@ -0,0 +1,3 @@
+mat-form-field{
+ width:100%;
+}
\ No newline at end of file
diff --git a/sineedge_front/src/app/settings/component/designation/designation-dialog/designation-dialog.component.spec.ts b/sineedge_front/src/app/settings/component/designation/designation-dialog/designation-dialog.component.spec.ts
new file mode 100644
index 00000000..e49243a0
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/designation/designation-dialog/designation-dialog.component.spec.ts
@@ -0,0 +1,25 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { DesignationDialogComponent } from './designation-dialog.component';
+
+describe('DesignationDialogComponent', () => {
+ let component: DesignationDialogComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ DesignationDialogComponent ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(DesignationDialogComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/sineedge_front/src/app/settings/component/designation/designation-dialog/designation-dialog.component.ts b/sineedge_front/src/app/settings/component/designation/designation-dialog/designation-dialog.component.ts
new file mode 100644
index 00000000..afee6a8c
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/designation/designation-dialog/designation-dialog.component.ts
@@ -0,0 +1,73 @@
+import { Component, OnInit, Inject } from '@angular/core';
+import { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';
+import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
+import { MastersService } from '../../../service/master/masters.service';
+
+
+@Component({
+ selector: 'app-designation-dialog',
+ templateUrl: './designation-dialog.component.html',
+ styleUrls: ['./designation-dialog.component.scss']
+})
+export class DesignationDialogComponent implements OnInit {
+
+ public _designationForm: FormGroup;
+
+ constructor(private _formBuilder: FormBuilder,
+ private dialogRef: MatDialogRef,
+ private _MastersService: MastersService,
+ @Inject(MAT_DIALOG_DATA) public data: any) { }
+
+ onNoClick(): void {
+ this.dialogRef.close();
+ }
+
+ ngOnInit() {
+
+ this._designationForm = this._formBuilder.group({
+ //Designation_id: any; fk_city_id: any;
+ designation_id: [this.data.designation_id],
+ name: [this.data.name, Validators.compose([Validators.required])],
+ short_name: [this.data.short_name, Validators.compose([Validators.required])]
+ });
+ //console.log(this._designationForm);
+ }
+
+ // onSubmit() {
+ // if (isNaN(this.data.ID)) {
+ // this._MastersService.addDesignation(this._designationForm.value);
+ // this.dialogRef.close();
+ // } else {
+ // this._MastersService.editDesignation(this._designationForm.value);
+ // this.dialogRef.close();
+ // }
+ // }
+
+ onSubmit() {
+ if(isNaN(this.data.designation_id)) {
+ var my_array = this._designationForm.value;
+ Object.keys(my_array).forEach((key) => ( my_array[key] == null) && delete my_array[key]);
+ console.log(my_array);
+ this._MastersService.addMasterDetails(my_array,'DESIGNATION').subscribe();
+ this.dialogRef.close();
+ alert("saved");
+ } else {
+
+ this._MastersService.editMasterDetails(this._designationForm.value,'DESIGNATION').subscribe();
+ this.dialogRef.close();
+ alert("edited");
+ }
+ }
+
+
+
+ onReset(){
+ this._designationForm.reset();
+ }
+}
+
+
+
+
+
+
diff --git a/sineedge_front/src/app/settings/component/designation/designation-list/designation-list.component.html b/sineedge_front/src/app/settings/component/designation/designation-list/designation-list.component.html
new file mode 100644
index 00000000..18b36442
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/designation/designation-list/designation-list.component.html
@@ -0,0 +1,66 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ID
+ {{user.designation_id}}
+
+
+ Name
+ {{user.name}}
+
+
+ Short Name
+ {{user.short_name}}
+
+
+
+ isactive
+ {{user.isactive}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/sineedge_front/src/app/settings/component/designation/designation-list/designation-list.component.scss b/sineedge_front/src/app/settings/component/designation/designation-list/designation-list.component.scss
new file mode 100644
index 00000000..e69de29b
diff --git a/sineedge_front/src/app/settings/component/designation/designation-list/designation-list.component.spec.ts b/sineedge_front/src/app/settings/component/designation/designation-list/designation-list.component.spec.ts
new file mode 100644
index 00000000..9911c6f2
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/designation/designation-list/designation-list.component.spec.ts
@@ -0,0 +1,25 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { DesignationListComponent } from './designation-list.component';
+
+describe('DesignationListComponent', () => {
+ let component: DesignationListComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ DesignationListComponent ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(DesignationListComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/sineedge_front/src/app/settings/component/designation/designation-list/designation-list.component.ts b/sineedge_front/src/app/settings/component/designation/designation-list/designation-list.component.ts
new file mode 100644
index 00000000..2c45e3a3
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/designation/designation-list/designation-list.component.ts
@@ -0,0 +1,88 @@
+import { Component, OnInit, OnDestroy, ViewChild } from '@angular/core';
+import { MatDialog, MatDialogRef, MatDialogConfig,MatPaginator, MatSort,MatTableDataSource } from '@angular/material';
+
+import { Observable, Subject } from 'rxjs';
+import { Http, Response } from '@angular/http';
+import 'rxjs/add/operator/map';
+
+import { DataSource } from '@angular/cdk/collections';
+import { map } from 'rxjs/operators';
+import { of as observableOf, merge } from 'rxjs';
+
+
+import { MastersService } from '../../../service/master/masters.service';
+import { DesignationDialogComponent } from '../designation-dialog/designation-dialog.component';
+import { Designation } from '../../../model/designation';
+
+
+@Component({
+ selector: 'app-designation-list',
+ templateUrl: './designation-list.component.html',
+ styleUrls: ['./designation-list.component.scss']
+})
+export class DesignationListComponent implements OnInit {
+
+ isPopupOpened = true;
+ displayedColumns = ['designation_id', 'name', 'short_name','isactive','actions'];
+
+
+ @ViewChild(MatPaginator) paginator: MatPaginator;
+ @ViewChild(MatSort) sort: MatSort;
+
+
+ constructor(private dialog: MatDialog,
+ private _MastersService: MastersService) { }
+
+ // get DesignationList() {
+ // return this._MastersService.getAllDesignation();
+ // }
+
+ dataSource = new UserDataSource(this._MastersService);
+
+ ngOnInit() {
+ }
+
+
+ addDesignation() {
+ this.isPopupOpened = true;
+ const dialogRef = this.dialog.open(DesignationDialogComponent, {
+ data: {}
+ });
+
+
+ dialogRef.afterClosed().subscribe(result => {
+ this.isPopupOpened = false;
+ });
+ }
+
+ editDesignation(arr: any[]) {
+ this.isPopupOpened = true;
+ //const contact = this._MastersService.getAllDesignation().find(c => c.ID === id);
+ const dialogRef = this.dialog.open(DesignationDialogComponent, {
+ data: arr
+ });
+
+
+ dialogRef.afterClosed().subscribe(result => {
+ this.isPopupOpened = false;
+ });
+ }
+
+ deleteDesignation(id: number) {
+ this._MastersService.deleteMasterDetails(id,'DESIGNATION');
+ }
+}
+
+export class UserDataSource extends DataSource {
+
+
+ constructor(private _bs: MastersService) {
+ super();
+ }
+
+ connect(): Observable {
+ //return this.userService.getUser();
+ return this._bs.getAllDesignation();
+ }
+ disconnect() {}
+}
\ No newline at end of file
diff --git a/sineedge_front/src/app/settings/component/entity-type/entity-type-dialog/entity-type-dialog.component.html b/sineedge_front/src/app/settings/component/entity-type/entity-type-dialog/entity-type-dialog.component.html
new file mode 100644
index 00000000..c9c1a79c
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/entity-type/entity-type-dialog/entity-type-dialog.component.html
@@ -0,0 +1,44 @@
+
+
Entity Type
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/sineedge_front/src/app/settings/component/entity-type/entity-type-dialog/entity-type-dialog.component.scss b/sineedge_front/src/app/settings/component/entity-type/entity-type-dialog/entity-type-dialog.component.scss
new file mode 100644
index 00000000..3e80f0db
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/entity-type/entity-type-dialog/entity-type-dialog.component.scss
@@ -0,0 +1,3 @@
+mat-form-field{
+ width:100%;
+}
\ No newline at end of file
diff --git a/sineedge_front/src/app/settings/component/entity-type/entity-type-dialog/entity-type-dialog.component.spec.ts b/sineedge_front/src/app/settings/component/entity-type/entity-type-dialog/entity-type-dialog.component.spec.ts
new file mode 100644
index 00000000..4eca89c0
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/entity-type/entity-type-dialog/entity-type-dialog.component.spec.ts
@@ -0,0 +1,25 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { EntityTypeDialogComponent } from './entity-type-dialog.component';
+
+describe('EntityTypeDialogComponent', () => {
+ let component: EntityTypeDialogComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ EntityTypeDialogComponent ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(EntityTypeDialogComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/sineedge_front/src/app/settings/component/entity-type/entity-type-dialog/entity-type-dialog.component.ts b/sineedge_front/src/app/settings/component/entity-type/entity-type-dialog/entity-type-dialog.component.ts
new file mode 100644
index 00000000..7a67bdf6
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/entity-type/entity-type-dialog/entity-type-dialog.component.ts
@@ -0,0 +1,73 @@
+import { Component, OnInit, Inject } from '@angular/core';
+import { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';
+import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
+import { MastersService } from '../../../service/master/masters.service';
+
+
+@Component({
+ selector: 'app-designation-dialog',
+ templateUrl: './entity-type-dialog.component.html',
+ styleUrls: ['./entity-type-dialog.component.scss']
+})
+export class EntityTypeDialogComponent implements OnInit {
+
+ public _entityTypeForm: FormGroup;
+
+ constructor(private _formBuilder: FormBuilder,
+ private dialogRef: MatDialogRef,
+ private _ETService: MastersService,
+ @Inject(MAT_DIALOG_DATA) public data: any) { }
+
+ onNoClick(): void {
+ this.dialogRef.close();
+ }
+
+ ngOnInit() {
+
+ this._entityTypeForm = this._formBuilder.group({
+ //Designation_id: any; fk_city_id: any;
+ entity_type_id: [this.data.entity_type_id],
+ name: [this.data.name, Validators.compose([Validators.required])]
+
+ });
+ //console.log(this._entityTypeForm);
+ }
+
+ // onSubmit() {
+ // if (isNaN(this.data.ID)) {
+ // this._MastersService.addDesignation(this._entityTypeForm.value);
+ // this.dialogRef.close();
+ // } else {
+ // this._MastersService.editDesignation(this._entityTypeForm.value);
+ // this.dialogRef.close();
+ // }
+ // }
+
+ onSubmit() {
+ if(isNaN(this.data.entity_type_id)) {
+ var my_array = this._entityTypeForm.value;
+ Object.keys(my_array).forEach((key) => ( my_array[key] == null) && delete my_array[key]);
+ console.log(my_array);
+ this._ETService.addMasterDetails(my_array,'ENTITYTYPE').subscribe();
+ //addEntityType(my_array)
+ this.dialogRef.close();
+ alert("saved");
+ } else {
+ this._ETService.editMasterDetails(this._entityTypeForm.value,'ENTITYTYPE').subscribe();
+ this.dialogRef.close();
+ alert("edited");
+ }
+ }
+
+
+
+ onReset(){
+ this._entityTypeForm.reset();
+ }
+}
+
+
+
+
+
+
diff --git a/sineedge_front/src/app/settings/component/entity-type/entity-type-list/entity-type-list.component.html b/sineedge_front/src/app/settings/component/entity-type/entity-type-list/entity-type-list.component.html
new file mode 100644
index 00000000..c77bcc96
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/entity-type/entity-type-list/entity-type-list.component.html
@@ -0,0 +1,59 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ ID
+ {{user.entity_type_id}}
+
+
+ Name
+ {{user.name}}
+
+
+
+ isactive
+ {{user.isactive}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/sineedge_front/src/app/settings/component/entity-type/entity-type-list/entity-type-list.component.scss b/sineedge_front/src/app/settings/component/entity-type/entity-type-list/entity-type-list.component.scss
new file mode 100644
index 00000000..e69de29b
diff --git a/sineedge_front/src/app/settings/component/entity-type/entity-type-list/entity-type-list.component.spec.ts b/sineedge_front/src/app/settings/component/entity-type/entity-type-list/entity-type-list.component.spec.ts
new file mode 100644
index 00000000..8d01d29f
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/entity-type/entity-type-list/entity-type-list.component.spec.ts
@@ -0,0 +1,25 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { EntityTypeListComponent } from './entity-type-list.component';
+
+describe('EntityTypeListComponent', () => {
+ let component: EntityTypeListComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ EntityTypeListComponent ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(EntityTypeListComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/sineedge_front/src/app/settings/component/entity-type/entity-type-list/entity-type-list.component.ts b/sineedge_front/src/app/settings/component/entity-type/entity-type-list/entity-type-list.component.ts
new file mode 100644
index 00000000..498c60a7
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/entity-type/entity-type-list/entity-type-list.component.ts
@@ -0,0 +1,87 @@
+import { Component, OnInit, OnDestroy, ViewChild } from '@angular/core';
+import { MatDialog, MatDialogRef, MatDialogConfig,MatPaginator, MatSort,MatTableDataSource } from '@angular/material';
+
+import { Observable, Subject } from 'rxjs';
+import { Http, Response } from '@angular/http';
+import 'rxjs/add/operator/map';
+
+import { DataSource } from '@angular/cdk/collections';
+import { map } from 'rxjs/operators';
+import { of as observableOf, merge } from 'rxjs';
+
+
+import { MastersService } from '../../../service/master/masters.service';
+import { EntityTypeDialogComponent } from '../entity-type-dialog/entity-type-dialog.component';
+import { EntityType } from '../../../model/entity-type';
+
+
+@Component({
+ selector: 'app-entity-type-list',
+ templateUrl: './entity-type-list.component.html',
+ styleUrls: ['./entity-type-list.component.scss']
+})
+export class EntityTypeListComponent implements OnInit {
+
+ isPopupOpened = true;
+ displayedColumns = ['entity_type_id', 'name','isactive','actions'];
+
+ @ViewChild(MatPaginator) paginator: MatPaginator;
+ @ViewChild(MatSort) sort: MatSort;
+
+
+ constructor(private dialog: MatDialog,
+ private _EtService: MastersService) { }
+
+ // get EntityTypeList() {
+ // return this._EtService. getAllEntityType();
+ // }
+
+ dataSource = new UserDataSource(this._EtService);
+
+ ngOnInit() {
+ }
+
+
+ addEntityType() {
+ this.isPopupOpened = true;
+ const dialogRef = this.dialog.open(EntityTypeDialogComponent, {
+ data: {}
+ });
+
+
+ dialogRef.afterClosed().subscribe(result => {
+ this.isPopupOpened = false;
+ });
+ }
+
+ editEntityType(arr: any) {
+ this.isPopupOpened = true;
+ //const contact = this._EtService.getAllEntityType().find(c => c.ID === id);
+ const dialogRef = this.dialog.open(EntityTypeDialogComponent, {
+ data: arr
+ });
+
+
+ dialogRef.afterClosed().subscribe(result => {
+ this.isPopupOpened = false;
+ });
+ }
+
+ deleteEntityType(id: number) {
+ this._EtService.deleteMasterDetails(id,'ENTITYTYPE');
+ }
+}
+
+export class UserDataSource extends DataSource {
+
+
+ constructor(private _ets: MastersService ) {
+ super();
+ }
+
+ connect(): Observable {
+ //return this.userService.getUser();
+ return this._ets.getAllEntityType();
+ }
+ disconnect() {}
+}
\ No newline at end of file
diff --git a/sineedge_front/src/app/settings/component/frequency/frequency-dialog/frequency-dialog.component.html b/sineedge_front/src/app/settings/component/frequency/frequency-dialog/frequency-dialog.component.html
new file mode 100644
index 00000000..6dedc50e
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/frequency/frequency-dialog/frequency-dialog.component.html
@@ -0,0 +1,40 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/sineedge_front/src/app/settings/component/frequency/frequency-dialog/frequency-dialog.component.scss b/sineedge_front/src/app/settings/component/frequency/frequency-dialog/frequency-dialog.component.scss
new file mode 100644
index 00000000..3e80f0db
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/frequency/frequency-dialog/frequency-dialog.component.scss
@@ -0,0 +1,3 @@
+mat-form-field{
+ width:100%;
+}
\ No newline at end of file
diff --git a/sineedge_front/src/app/settings/component/frequency/frequency-dialog/frequency-dialog.component.spec.ts b/sineedge_front/src/app/settings/component/frequency/frequency-dialog/frequency-dialog.component.spec.ts
new file mode 100644
index 00000000..f691a3de
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/frequency/frequency-dialog/frequency-dialog.component.spec.ts
@@ -0,0 +1,25 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { FrequencyDialogComponent } from './frequency-dialog.component';
+
+describe('FrequencyDialogComponent', () => {
+ let component: FrequencyDialogComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ FrequencyDialogComponent ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(FrequencyDialogComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/sineedge_front/src/app/settings/component/frequency/frequency-dialog/frequency-dialog.component.ts b/sineedge_front/src/app/settings/component/frequency/frequency-dialog/frequency-dialog.component.ts
new file mode 100644
index 00000000..9de7db42
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/frequency/frequency-dialog/frequency-dialog.component.ts
@@ -0,0 +1,64 @@
+import { Component, OnInit, Inject } from '@angular/core';
+import { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';
+import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
+
+import { MastersService } from '../../../service/master/masters.service';
+
+@Component({
+ selector: 'app-jazz-dialog',
+ templateUrl: './frequency-dialog.component.html',
+ styleUrls: ['./frequency-dialog.component.scss']
+})
+export class FrequencyDialogComponent implements OnInit {
+
+
+ public _frequencyForm: FormGroup;
+
+ constructor(private _formBuilder: FormBuilder,
+ private dialogRef: MatDialogRef,
+ private _MastersService: MastersService,
+ @Inject(MAT_DIALOG_DATA) public data: any) { }
+
+ onNoClick(): void {
+ this.dialogRef.close();
+ }
+
+ ngOnInit() {
+
+ this._frequencyForm = this._formBuilder.group({
+ frequency_id: [this.data.frequency_id],
+ name: [this.data.name, Validators.compose([Validators.required])]
+ });
+ //console.log(this._frequencyForm);
+ }
+
+ onSubmit() {
+ if(isNaN(this.data.frequency_id)) {
+ var my_array = this._frequencyForm.value;
+ Object.keys(my_array).forEach((key) => ( my_array[key] == null) && delete my_array[key]);
+ console.log(my_array);
+ this._MastersService.addMasterDetails(my_array,'FREQUENCY').subscribe();
+ this.dialogRef.close();
+ alert("saved");
+ } else {
+ this._MastersService.editMasterDetails( this._frequencyForm.value,'FREQUENCY').subscribe();
+ this.dialogRef.close();
+ alert("edited");
+ }
+ }
+
+ // onSubmit() {
+ // if (isNaN(this.data.ID)) {
+ // this._contactService.addIndustryMaster(this._frequencyForm.value);
+ // this.dialogRef.close();
+ // } else {
+ // this._contactService.editIndustryMaster(this._frequencyForm.value);
+ // this.dialogRef.close();
+ // }
+ // }
+
+ onReset(){
+ this._frequencyForm.reset();
+ }
+}
+
diff --git a/sineedge_front/src/app/settings/component/frequency/frequency-list/frequency-list.component.html b/sineedge_front/src/app/settings/component/frequency/frequency-list/frequency-list.component.html
new file mode 100644
index 00000000..6b79473a
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/frequency/frequency-list/frequency-list.component.html
@@ -0,0 +1,73 @@
+
+
+
+
+
+
+
+
+
+
+
+ Name
+ {{user.name}}
+
+
+ ID
+ {{user.frequency_id}}
+
+
+ createdon
+ {{user.createdon}}
+
+
+ createdby
+ {{user.fk_createdby}}
+
+
+ updated on
+ {{user.updatedon}}
+
+
+ updatedby
+ {{user.fk_updatedby}}
+
+
+ isactive
+ {{user.isactive}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/sineedge_front/src/app/settings/component/frequency/frequency-list/frequency-list.component.scss b/sineedge_front/src/app/settings/component/frequency/frequency-list/frequency-list.component.scss
new file mode 100644
index 00000000..4f2fcbd8
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/frequency/frequency-list/frequency-list.component.scss
@@ -0,0 +1,24 @@
+/* Structure */
+.example-container {
+ display: flex;
+ flex-direction: column;
+ min-width: 30px;
+ }
+
+ .example-header {
+ min-height: 64px;
+ padding: 8px 24px 0;
+ }
+
+ //mat-cell{
+ .cell{
+ display:flex !important;
+ justify-content:center!important;
+
+ }
+
+ // mat-header-cell {
+ .header-cell{
+ display:flex;
+ justify-content:center;
+ }
\ No newline at end of file
diff --git a/sineedge_front/src/app/settings/component/frequency/frequency-list/frequency-list.component.spec.ts b/sineedge_front/src/app/settings/component/frequency/frequency-list/frequency-list.component.spec.ts
new file mode 100644
index 00000000..2b7cbc2a
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/frequency/frequency-list/frequency-list.component.spec.ts
@@ -0,0 +1,25 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { FrequencyListComponent } from './frequency-list.component';
+
+describe('FrequencyListComponent', () => {
+ let component: FrequencyListComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ FrequencyListComponent ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(FrequencyListComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/sineedge_front/src/app/settings/component/frequency/frequency-list/frequency-list.component.ts b/sineedge_front/src/app/settings/component/frequency/frequency-list/frequency-list.component.ts
new file mode 100644
index 00000000..464667dc
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/frequency/frequency-list/frequency-list.component.ts
@@ -0,0 +1,87 @@
+import { Component, OnInit, OnDestroy, ViewChild } from '@angular/core';
+import { MatDialog, MatDialogRef, MatDialogConfig,MatPaginator, MatSort,MatTableDataSource } from '@angular/material';
+
+import { Observable, Subject } from 'rxjs';
+import { Http, Response } from '@angular/http';
+import 'rxjs/add/operator/map';
+
+import { DataSource } from '@angular/cdk/collections';
+import { map } from 'rxjs/operators';
+import { of as observableOf, merge } from 'rxjs';
+
+
+import { MastersService } from '../../../service/master/masters.service';
+import { FrequencyDialogComponent }from '../frequency-dialog/frequency-dialog.component';
+import { Frequency } from '../../../model/frequency';
+
+
+@Component({
+ selector: 'app-frequency-list',
+ templateUrl: './frequency-list.component.html',
+ styleUrls: ['./frequency-list.component.scss']
+})
+export class FrequencyListComponent implements OnInit {
+
+ isPopupOpened = true;
+ displayedColumns = ['frequency_id','name','createdon','fk_createdby','updatedon','isactive','fk_updatedby','actions'];
+
+ @ViewChild(MatPaginator) paginator: MatPaginator;
+ @ViewChild(MatSort) sort: MatSort;
+
+
+ constructor(private dialog: MatDialog,
+ private _MastersService: MastersService) { }
+
+ // get FrequencyList() {
+ // return this._MastersService. getAllFrequency();
+ // }
+
+ dataSource = new UserDataSource(this._MastersService);
+
+ ngOnInit() {
+ }
+
+
+ addFrequency() {
+ this.isPopupOpened = true;
+ const dialogRef = this.dialog.open(FrequencyDialogComponent, {
+ data: {}
+ });
+
+
+ dialogRef.afterClosed().subscribe(result => {
+ this.isPopupOpened = false;
+ });
+ }
+
+ editFrequency(arr: any) {
+ this.isPopupOpened = true;
+ //const contact = this._MastersService.getAllFrequency().find(c => c.ID === id);
+ const dialogRef = this.dialog.open(FrequencyDialogComponent, {
+ data: arr
+ });
+
+
+ dialogRef.afterClosed().subscribe(result => {
+ this.isPopupOpened = false;
+ });
+ }
+
+ deleteFrequency(id: number) {
+ this._MastersService.deleteMasterDetails(id,'FREQUENCY');
+ }
+}
+
+export class UserDataSource extends DataSource {
+
+
+ constructor(private _fs: MastersService) {
+ super();
+ }
+
+ connect(): Observable {
+ //return this.userService.getUser();
+ return this._fs.getAllFrequency();
+ }
+ disconnect() {}
+}
\ No newline at end of file
diff --git a/sineedge_front/src/app/settings/component/industry_classification/industry_classification-dialog/industry_classification-dialog.component.html b/sineedge_front/src/app/settings/component/industry_classification/industry_classification-dialog/industry_classification-dialog.component.html
new file mode 100644
index 00000000..2823cce3
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/industry_classification/industry_classification-dialog/industry_classification-dialog.component.html
@@ -0,0 +1,42 @@
+
+
+
Industry Classification
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/sineedge_front/src/app/settings/component/industry_classification/industry_classification-dialog/industry_classification-dialog.component.scss b/sineedge_front/src/app/settings/component/industry_classification/industry_classification-dialog/industry_classification-dialog.component.scss
new file mode 100644
index 00000000..3e80f0db
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/industry_classification/industry_classification-dialog/industry_classification-dialog.component.scss
@@ -0,0 +1,3 @@
+mat-form-field{
+ width:100%;
+}
\ No newline at end of file
diff --git a/sineedge_front/src/app/settings/component/industry_classification/industry_classification-dialog/industry_classification-dialog.component.spec.ts b/sineedge_front/src/app/settings/component/industry_classification/industry_classification-dialog/industry_classification-dialog.component.spec.ts
new file mode 100644
index 00000000..1a9feee4
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/industry_classification/industry_classification-dialog/industry_classification-dialog.component.spec.ts
@@ -0,0 +1,25 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { IndustryMasterDialogComponent } from './industry-master-dialog.component';
+
+describe('IndustryMasterDialogComponent ', () => {
+ let component: IndustryMasterDialogComponent ;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ IndustryMasterDialogComponent ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(IndustryMasterDialogComponent );
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/sineedge_front/src/app/settings/component/industry_classification/industry_classification-dialog/industry_classification-dialog.component.ts b/sineedge_front/src/app/settings/component/industry_classification/industry_classification-dialog/industry_classification-dialog.component.ts
new file mode 100644
index 00000000..fa7c6e24
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/industry_classification/industry_classification-dialog/industry_classification-dialog.component.ts
@@ -0,0 +1,64 @@
+import { Component, OnInit, Inject } from '@angular/core';
+import { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';
+import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
+import { MastersService } from '../../../service/master/masters.service';
+
+
+@Component({
+ selector: 'app-jazz-dialog',
+ templateUrl: './industry_classification-dialog.component.html',
+ styleUrls: ['./industry_classification-dialog.component.scss']
+})
+export class IndustryClassificationDialogComponent implements OnInit {
+
+ public _IndustryClassificationForm: FormGroup;
+
+ constructor(private _formBuilder: FormBuilder,
+ private dialogRef: MatDialogRef,
+ private _contactService: MastersService,
+ @Inject(MAT_DIALOG_DATA) public data: any) { }
+
+ onNoClick(): void {
+ this.dialogRef.close();
+ }
+
+ ngOnInit() {
+
+ this._IndustryClassificationForm = this._formBuilder.group({
+ industry_classification_id: [this.data.industry_classification_id],
+ name: [this.data.name, Validators.compose([Validators.required])]
+ });
+ //console.log(this._IndustryClassificationForm);
+ //industry_classification_id, name, createdon, fk_createdby, updatedon, fk_updatedby, isactive
+ }
+
+ // onSubmit() {
+ // if (isNaN(this.data.ID)) {
+ // this._contactService.addIndustryClassification(this._IndustryClassificationForm.value);
+ // this.dialogRef.close();
+ // } else {
+ // this._contactService.editIndustryClassification(this._IndustryClassificationForm.value);
+ // this.dialogRef.close();
+ // }
+ // }
+
+
+ onSubmit() {
+ if(isNaN(this.data.industry_classification_id)) {
+ var my_array = this._IndustryClassificationForm.value;
+ Object.keys(my_array).forEach((key) => (my_array[key] == null) && delete my_array[key]);
+ console.log(my_array);
+ this._contactService.addMasterDetails(my_array,'INDUSTRYCLASSIFICATION').subscribe();
+ this.dialogRef.close();
+ alert("saved");
+ } else {
+ this._contactService.editMasterDetails(this._IndustryClassificationForm.value,'INDUSTRYCLASSIFICATION').subscribe();
+ this.dialogRef.close();
+ alert("edited");
+ }
+ }
+
+ onReset(){
+ this._IndustryClassificationForm.reset();
+ }
+}
diff --git a/sineedge_front/src/app/settings/component/industry_classification/industry_classification-list/industry_classification-list.component.html b/sineedge_front/src/app/settings/component/industry_classification/industry_classification-list/industry_classification-list.component.html
new file mode 100644
index 00000000..2f65757e
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/industry_classification/industry_classification-list/industry_classification-list.component.html
@@ -0,0 +1,70 @@
+
+
+
+
+
+
+
+
+
+
+
+ Name
+ {{user.name}}
+
+
+ ID
+ {{user.industry_classification_id}}
+
+
+ createdon
+ {{user.createdon}}
+
+
+ createdby
+ {{user.fk_createdby}}
+
+
+ updated on
+ {{user.updatedon}}
+
+
+ updatedby
+ {{user.fk_updatedby}}
+
+
+ isactive
+ {{user.isactive}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/sineedge_front/src/app/settings/component/industry_classification/industry_classification-list/industry_classification-list.component.scss b/sineedge_front/src/app/settings/component/industry_classification/industry_classification-list/industry_classification-list.component.scss
new file mode 100644
index 00000000..4f2fcbd8
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/industry_classification/industry_classification-list/industry_classification-list.component.scss
@@ -0,0 +1,24 @@
+/* Structure */
+.example-container {
+ display: flex;
+ flex-direction: column;
+ min-width: 30px;
+ }
+
+ .example-header {
+ min-height: 64px;
+ padding: 8px 24px 0;
+ }
+
+ //mat-cell{
+ .cell{
+ display:flex !important;
+ justify-content:center!important;
+
+ }
+
+ // mat-header-cell {
+ .header-cell{
+ display:flex;
+ justify-content:center;
+ }
\ No newline at end of file
diff --git a/sineedge_front/src/app/settings/component/industry_classification/industry_classification-list/industry_classification-list.component.spec.ts b/sineedge_front/src/app/settings/component/industry_classification/industry_classification-list/industry_classification-list.component.spec.ts
new file mode 100644
index 00000000..e69de29b
diff --git a/sineedge_front/src/app/settings/component/industry_classification/industry_classification-list/industry_classification-list.component.ts b/sineedge_front/src/app/settings/component/industry_classification/industry_classification-list/industry_classification-list.component.ts
new file mode 100644
index 00000000..003e54e2
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/industry_classification/industry_classification-list/industry_classification-list.component.ts
@@ -0,0 +1,98 @@
+import { Component, OnInit, OnDestroy, ViewChild } from '@angular/core';
+import { MatDialog, MatDialogRef, MatDialogConfig,MatPaginator, MatSort,MatTableDataSource } from '@angular/material';
+
+import { Observable, Subject } from 'rxjs';
+import { Http, Response } from '@angular/http';
+import 'rxjs/add/operator/map';
+
+import { DataSource } from '@angular/cdk/collections';
+import { map } from 'rxjs/operators';
+import { of as observableOf, merge } from 'rxjs';
+
+
+import { MastersService } from '../../../service/master/masters.service';
+import { IndustryClassificationDialogComponent } from '../industry_classification-dialog/industry_classification-dialog.component';
+import { IndustryClassification } from '../../../model/industry_classification';
+
+@Component({
+ selector: 'app-industry_classification-list',
+ templateUrl: './industry_classification-list.component.html',
+ styleUrls: ['./industry_classification-list.component.scss']
+})
+
+
+// export class TablePagingComponent implements OnInit {
+
+// }
+
+export class IndustryClassificationListComponent implements OnInit {
+
+
+ isPopupOpened = true;
+
+ displayedColumns = ['industry_classification_id','name','createdon','fk_createdby','updatedon','isactive','fk_updatedby','actions'];
+ //industry_classification_id, name, createdon, fk_createdby, updatedon, fk_updatedby, isactive
+
+ @ViewChild(MatPaginator) paginator: MatPaginator;
+ @ViewChild(MatSort) sort: MatSort;
+
+
+ constructor(private dialog: MatDialog,
+ private _IMService: MastersService) { }
+
+ // get IndustryClassificationList() {
+ // return this._IMService.getAllIndustryClassification();
+ // }
+
+ //displayedColumns: string[] = ['ID','ClassifiedName'];
+ dataSource = new UserDataSource(this._IMService);
+
+
+ ngOnInit() {}
+
+
+ addIndustryClassification() {
+ this.isPopupOpened = true;
+ const dialogRef = this.dialog.open(IndustryClassificationDialogComponent, {
+ data: {}
+ });
+
+
+ dialogRef.afterClosed().subscribe(result => {
+ this.isPopupOpened = false;
+ });
+ }
+
+ editIndustryClassification(arr: any) {
+ this.isPopupOpened = true;
+ //const indu = this._IMService.getAllIndustryClassification().find(c => c.ID === id);
+ const dialogRef = this.dialog.open(IndustryClassificationDialogComponent, {
+ data: arr
+ });
+
+
+ dialogRef.afterClosed().subscribe(result => {
+ this.isPopupOpened = false;
+ });
+ }
+
+ deleteIndustryClassification(id: number) {
+ this._IMService.deleteMasterDetails(id,'INDUSTRYCLASSIFICATION');
+ }
+
+}
+
+
+
+export class UserDataSource extends DataSource {
+
+ constructor(private _ims: MastersService ) {
+ super();
+ }
+
+ connect(): Observable {
+ //return this.userService.getUser();
+ return this._ims.getAllIndustryClassification();
+ }
+ disconnect() {}
+}
\ No newline at end of file
diff --git a/sineedge_front/src/app/settings/component/lender-hierarchy/lender-hierarchy-dialog/lender-hierarchy-dialog.component.html b/sineedge_front/src/app/settings/component/lender-hierarchy/lender-hierarchy-dialog/lender-hierarchy-dialog.component.html
new file mode 100644
index 00000000..0ffbc85f
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/lender-hierarchy/lender-hierarchy-dialog/lender-hierarchy-dialog.component.html
@@ -0,0 +1,39 @@
+
+
+
Lender Hierarchy
+
+
+
+
+
+
\ No newline at end of file
diff --git a/sineedge_front/src/app/settings/component/lender-hierarchy/lender-hierarchy-dialog/lender-hierarchy-dialog.component.scss b/sineedge_front/src/app/settings/component/lender-hierarchy/lender-hierarchy-dialog/lender-hierarchy-dialog.component.scss
new file mode 100644
index 00000000..3e80f0db
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/lender-hierarchy/lender-hierarchy-dialog/lender-hierarchy-dialog.component.scss
@@ -0,0 +1,3 @@
+mat-form-field{
+ width:100%;
+}
\ No newline at end of file
diff --git a/sineedge_front/src/app/settings/component/lender-hierarchy/lender-hierarchy-dialog/lender-hierarchy-dialog.component.spec.ts b/sineedge_front/src/app/settings/component/lender-hierarchy/lender-hierarchy-dialog/lender-hierarchy-dialog.component.spec.ts
new file mode 100644
index 00000000..fec89337
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/lender-hierarchy/lender-hierarchy-dialog/lender-hierarchy-dialog.component.spec.ts
@@ -0,0 +1,25 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { LenderHierarchyDialogComponent } from './lender-hierarchy-dialog.component';
+
+describe('LenderHierarchyDialogComponent', () => {
+ let component: LenderHierarchyDialogComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ LenderHierarchyDialogComponent ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(LenderHierarchyDialogComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/sineedge_front/src/app/settings/component/lender-hierarchy/lender-hierarchy-dialog/lender-hierarchy-dialog.component.ts b/sineedge_front/src/app/settings/component/lender-hierarchy/lender-hierarchy-dialog/lender-hierarchy-dialog.component.ts
new file mode 100644
index 00000000..6df1f3bc
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/lender-hierarchy/lender-hierarchy-dialog/lender-hierarchy-dialog.component.ts
@@ -0,0 +1,73 @@
+import { Component, OnInit, Inject } from '@angular/core';
+import { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';
+import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
+import { MastersService } from '../../../service/master/masters.service';
+
+@Component({
+ selector: 'app-jazz-dialog',
+ templateUrl: './lender-hierarchy-dialog.component.html',
+ styleUrls: ['./lender-hierarchy-dialog.component.scss']
+})
+export class LenderHierarchyDialogComponent implements OnInit {
+
+ public _lenderHierarchyForm: FormGroup;
+
+ constructor(private _formBuilder: FormBuilder,
+ private dialogRef: MatDialogRef,
+ private _MastersService: MastersService,
+ @Inject(MAT_DIALOG_DATA) public data: any) { }
+
+ onNoClick(): void {
+ this.dialogRef.close();
+ }
+
+ ngOnInit() {
+
+ this._lenderHierarchyForm = this._formBuilder.group({
+ //Designation_id: any; fk_city_id: any;
+
+ lender_hierarchy_id: [this.data.lender_hierarchy_id],
+ lender_hierarchy: [this.data.lender_hierarchy, Validators.compose([Validators.required])],
+
+ });
+ //console.log(this._lenderHierarchyForm);
+ }
+
+ // onSubmit() {
+ // if (isNaN(this.data.ID)) {
+ // this._MastersService.addDesignation(this._lenderHierarchyForm.value);
+ // this.dialogRef.close();
+ // } else {
+ // this._MastersService.editDesignation(this._lenderHierarchyForm.value);
+ // this.dialogRef.close();
+ // }
+ // }
+
+ onSubmit() {
+ if(isNaN(this.data.lender_hierarchy_id)) {
+ var my_array = this._lenderHierarchyForm.value;
+ Object.keys(my_array).forEach((key) => ( my_array[key] == null) && delete my_array[key]);
+ console.log(my_array);
+ this._MastersService.addMasterDetails(my_array,'LENDERHIERARCHY').subscribe();
+ this.dialogRef.close();
+ alert("saved");
+ } else {
+
+ this._MastersService.editMasterDetails(this._lenderHierarchyForm.value,'LENDERHIERARCHY').subscribe();
+ this.dialogRef.close();
+ alert("edited");
+ }
+ }
+
+
+
+ onReset(){
+ this._lenderHierarchyForm.reset();
+ }
+}
+
+
+
+
+
+
diff --git a/sineedge_front/src/app/settings/component/lender-hierarchy/lender-hierarchy-list/lender-hierarchy-list.component.html b/sineedge_front/src/app/settings/component/lender-hierarchy/lender-hierarchy-list/lender-hierarchy-list.component.html
new file mode 100644
index 00000000..4fd590a9
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/lender-hierarchy/lender-hierarchy-list/lender-hierarchy-list.component.html
@@ -0,0 +1,58 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ ID
+ {{user.lender_hierarchy_id}}
+
+
+ Lender Hierarchy
+ {{user.lender_hierarchy}}
+
+
+ isactive
+ {{user.isactive}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/sineedge_front/src/app/settings/component/lender-hierarchy/lender-hierarchy-list/lender-hierarchy-list.component.scss b/sineedge_front/src/app/settings/component/lender-hierarchy/lender-hierarchy-list/lender-hierarchy-list.component.scss
new file mode 100644
index 00000000..e69de29b
diff --git a/sineedge_front/src/app/settings/component/lender-hierarchy/lender-hierarchy-list/lender-hierarchy-list.component.spec.ts b/sineedge_front/src/app/settings/component/lender-hierarchy/lender-hierarchy-list/lender-hierarchy-list.component.spec.ts
new file mode 100644
index 00000000..7310059f
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/lender-hierarchy/lender-hierarchy-list/lender-hierarchy-list.component.spec.ts
@@ -0,0 +1,25 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { LenderHierarchyListComponent } from './lender-hierarchy-list.component';
+
+describe('LenderHierarchyListComponent', () => {
+ let component: LenderHierarchyListComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ LenderHierarchyListComponent ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(LenderHierarchyListComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/sineedge_front/src/app/settings/component/lender-hierarchy/lender-hierarchy-list/lender-hierarchy-list.component.ts b/sineedge_front/src/app/settings/component/lender-hierarchy/lender-hierarchy-list/lender-hierarchy-list.component.ts
new file mode 100644
index 00000000..7e3b425e
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/lender-hierarchy/lender-hierarchy-list/lender-hierarchy-list.component.ts
@@ -0,0 +1,87 @@
+
+import { Component, OnInit, OnDestroy, ViewChild } from '@angular/core';
+import { MatDialog, MatDialogRef, MatDialogConfig,MatPaginator, MatSort,MatTableDataSource } from '@angular/material';
+
+import { Observable, Subject } from 'rxjs';
+import { Http, Response } from '@angular/http';
+import 'rxjs/add/operator/map';
+
+import { DataSource } from '@angular/cdk/collections';
+import { map } from 'rxjs/operators';
+import { of as observableOf, merge } from 'rxjs';
+
+import { MastersService } from '../../../service/master/masters.service';
+import { LenderHierarchyDialogComponent }from '../lender-hierarchy-dialog/lender-hierarchy-dialog.component';
+import { LenderHierarchy } from '../../../model/lender-hierarchy';
+
+
+@Component({
+ selector: 'app-lender-hierarchy-list',
+ templateUrl: './lender-hierarchy-list.component.html',
+ styleUrls: ['./lender-hierarchy-list.component.scss']
+})
+export class LenderHierarchyListComponent implements OnInit {
+
+ isPopupOpened = true;
+ displayedColumns = ['lender_hierarchy_id', 'lender_hierarchy','isactive','actions'];
+
+ @ViewChild(MatPaginator) paginator: MatPaginator;
+ @ViewChild(MatSort) sort: MatSort;
+
+
+ constructor(private dialog: MatDialog,
+ private _MastersService: MastersService) { }
+
+ // get LenderHierarchyList() {
+ // return this._MastersService. getAllLenderHierarchy();
+ // }
+
+ dataSource = new UserDataSource(this._MastersService);
+
+ ngOnInit() {
+ }
+
+
+ addLenderHierarchy() {
+ this.isPopupOpened = true;
+ const dialogRef = this.dialog.open(LenderHierarchyDialogComponent, {
+ data: {}
+ });
+
+
+ dialogRef.afterClosed().subscribe(result => {
+ this.isPopupOpened = false;
+ });
+ }
+
+ editLenderHierarchy(arr: any) {
+ this.isPopupOpened = true;
+ //const contact = this._MastersService.getAllLenderHierarchy().find(c => c.ID === id);
+ const dialogRef = this.dialog.open(LenderHierarchyDialogComponent, {
+ data: arr
+ });
+
+
+ dialogRef.afterClosed().subscribe(result => {
+ this.isPopupOpened = false;
+ });
+ }
+
+ deleteLenderHierarchy(id: number) {
+ this._MastersService.deleteMasterDetails(id,'LENDERHIERARCHY');
+ }
+}
+
+export class UserDataSource extends DataSource {
+
+
+ constructor(private _fs: MastersService ) {
+ super();
+ }
+
+ connect(): Observable {
+ //return this.userService.getUser();
+ return this._fs.getAllLenderHierarchy();
+ }
+ disconnect() {}
+}
\ No newline at end of file
diff --git a/sineedge_front/src/app/settings/component/masters/masters.component.html b/sineedge_front/src/app/settings/component/masters/masters.component.html
new file mode 100644
index 00000000..d33c4900
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/masters/masters.component.html
@@ -0,0 +1,151 @@
+
+
+
+ Master Details
+ Pickup the Master to View Master Detail
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{master.name}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/sineedge_front/src/app/settings/component/masters/masters.component.scss b/sineedge_front/src/app/settings/component/masters/masters.component.scss
new file mode 100644
index 00000000..3e80f0db
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/masters/masters.component.scss
@@ -0,0 +1,3 @@
+mat-form-field{
+ width:100%;
+}
\ No newline at end of file
diff --git a/sineedge_front/src/app/settings/component/masters/masters.component.spec.ts b/sineedge_front/src/app/settings/component/masters/masters.component.spec.ts
new file mode 100644
index 00000000..accdb83d
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/masters/masters.component.spec.ts
@@ -0,0 +1,25 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { MastersComponent } from './masters.component';
+
+describe('MastersComponent', () => {
+ let component: MastersComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ MastersComponent ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(MastersComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/sineedge_front/src/app/settings/component/masters/masters.component.ts b/sineedge_front/src/app/settings/component/masters/masters.component.ts
new file mode 100644
index 00000000..04e0600b
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/masters/masters.component.ts
@@ -0,0 +1,180 @@
+//import { Component, OnInit } from '@angular/core';
+//import { FormControl } from '@angular/forms';
+//import { startWith } from 'rxjs/operators';
+
+
+ import { AfterViewInit, Component, OnDestroy, OnInit, ViewChild } from '@angular/core';
+ import { FormControl, FormGroup, FormBuilder } from '@angular/forms';
+ import { ReplaySubject } from 'rxjs';
+ import { MatSelect } from '@angular/material';
+ import { Subject } from 'rxjs';
+ import { take, takeUntil } from 'rxjs/operators';
+
+ export interface Master {
+ id: string;
+ name: string;
+ }
+
+// export interface masterArray {
+// value: string;
+// viewValue: string;
+// }
+
+@Component({
+ selector: 'app-masters',
+ templateUrl: './masters.component.html',
+ styleUrls: ['./masters.component.scss']
+})
+export class MastersComponent implements OnInit {
+
+ /* Normal Search Code
+ pickUpMasterData : string;
+
+ constructor() {}
+
+ For Master Dropdown Elements
+ masterArray = [{ code: 'master-1', viewValue: 'Industry Classfication' },
+ { code: 'master-2', viewValue: 'Product'},
+ { code: 'master-3', viewValue: 'Sub Product'}
+ ];
+
+ ngOnInit() {}*/
+
+
+
+/* AutoComplete Code
+ stateCtrl: FormControl;
+ currentState = '';
+
+ reactiveStates: any;
+ tdStates: any[];
+
+ tdDisabled = false;
+
+ tdAuto: string;
+
+ reactiveAuto: string;
+
+ masterArray = [{ code: 'master-1', viewValue: 'Industry Classfication' },
+ { code: 'master-2', viewValue: 'Product'},
+ { code: 'master-3', viewValue: 'Sub Product'}
+ ];
+
+ constructor() {
+ this.tdStates = this.masterArray;
+ //this.reactiveStates = this.stateCtrl.valueChanges;
+ }
+
+
+ filterStates(val: string) {
+ return val ? this.masterArray.filter((s) => s.viewValue.match(new RegExp(val, 'gi'))) : this.masterArray;
+ }*/
+
+ /* Select Search Code
+ /** control for the selected bank */
+ public masterCtrl: FormControl = new FormControl();
+
+ /** control for the MatSelect filter keyword */
+ public masterFilterCtrl: FormControl = new FormControl();
+
+
+ constructor(private _formBuilder: FormBuilder) { }
+
+ /** list of masters */
+ private masters: Master[] = [
+ {id: 'master-1',name: 'Industry Classfication'},
+ {id: 'master-2',name: 'Branch'},
+ {id: 'master-3',name: 'Title'},
+ {id: 'master-4',name: 'Relation Ship'},
+ {id: 'master-5',name: 'Product'},
+ {id: 'master-6',name: 'Sub Product'},
+ {id: 'master-7',name: 'Occupation of Non earning members'},
+ {id: 'master-8',name: 'Type of activity'},
+ {id: 'master-9',name: 'Unit of Measurement'},
+ {id: 'master-10',name: 'Frequency'},
+ {id: 'master-11',name: 'Approach to PD location'},
+ {id: 'master-12',name: 'Comments on locality'},
+ {id: 'master-13',name: 'Customer Behaviour'},
+ {id: 'master-14',name: 'Customer Segment'},
+ {id: 'master-15',name: 'Designation'},
+ {id: 'master-16',name: 'PD Allocation Type'},
+ {id: 'master-17',name: 'PD Status'},
+ {id: 'master-18',name: 'PD Type'},
+ {id: 'master-19',name: 'Company Details'},
+ {id: 'master-20',name: 'City'},
+ {id: 'master-21',name: 'States'},
+ {id: 'master-22',name: 'Regions'},
+ {id: 'master-23',name: 'm_lender_hierarchy'},
+ {id: 'master-24',name: 'm_entity_type'},
+ {id: 'datatable',name: 'datatable'},
+ {id: 'usertable',name: 'usertable'}
+
+ ];
+
+ /** list of masters filtered by search keyword */
+ public filteredMasters: ReplaySubject = new ReplaySubject(1);
+
+
+ @ViewChild('singleSelect') singleSelect: MatSelect;
+
+ /** Subject that emits when the component has been destroyed. */
+ private _onDestroy = new Subject();
+
+ ngOnInit() {
+
+ // load the initial master list
+ this.filteredMasters.next(this.masters.slice());
+
+ // listen for search field value changes
+ this.masterFilterCtrl.valueChanges
+ .pipe(takeUntil(this._onDestroy))
+ .subscribe(() => {
+ this.filterMasters();
+ });
+
+ }
+
+ ngAfterViewInit() {
+ //this.setInitialValue();
+ }
+
+ ngOnDestroy() {
+ this._onDestroy.next();
+ this._onDestroy.complete();
+ }
+
+ // /**
+ // * Sets the initial value after the filteredMasters are loaded initially
+ // */
+ // private setInitialValue() {
+ // this.filteredMasters
+ // .pipe(take(1), takeUntil(this._onDestroy))
+ // .subscribe(() => {
+ // // setting the compareWith property to a comparison function
+ // // triggers initializing the selection according to the initial value of
+ // // the form control (i.e. _initializeSelection())
+ // // this needs to be done after the filteredBanks are loaded initially
+ // // and after the mat-option elements are available
+ // this.singleSelect.compareWith = (a: Bank, b: Bank) => a.id === b.id;
+ // });
+ // }
+
+ private filterMasters() {
+ if (!this.masters) {
+ return;
+ }
+ // get the search keyword
+ let search = this.masterFilterCtrl.value;
+ if (!search) {
+ this.filteredMasters.next(this.masters.slice());
+ return;
+ } else {
+ search = search.toLowerCase();
+ }
+ // filter the masters
+ this.filteredMasters.next(
+ this.masters.filter(master => master.name.toLowerCase().indexOf(search) > -1)
+ );
+ }
+
+}
diff --git a/sineedge_front/src/app/settings/component/members-occupation/members-occupation-dialog/members-occupation-dialog.component.html b/sineedge_front/src/app/settings/component/members-occupation/members-occupation-dialog/members-occupation-dialog.component.html
new file mode 100644
index 00000000..0fd361f1
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/members-occupation/members-occupation-dialog/members-occupation-dialog.component.html
@@ -0,0 +1,41 @@
+
+
+
Occupation of Non earning members
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/sineedge_front/src/app/settings/component/members-occupation/members-occupation-dialog/members-occupation-dialog.component.scss b/sineedge_front/src/app/settings/component/members-occupation/members-occupation-dialog/members-occupation-dialog.component.scss
new file mode 100644
index 00000000..3e80f0db
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/members-occupation/members-occupation-dialog/members-occupation-dialog.component.scss
@@ -0,0 +1,3 @@
+mat-form-field{
+ width:100%;
+}
\ No newline at end of file
diff --git a/sineedge_front/src/app/settings/component/members-occupation/members-occupation-dialog/members-occupation-dialog.component.spec.ts b/sineedge_front/src/app/settings/component/members-occupation/members-occupation-dialog/members-occupation-dialog.component.spec.ts
new file mode 100644
index 00000000..2d3a7b44
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/members-occupation/members-occupation-dialog/members-occupation-dialog.component.spec.ts
@@ -0,0 +1,25 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { MembersOccupationDialogComponent } from './members-occupation-dialog.component';
+
+describe('MembersOccupationDialogComponent', () => {
+ let component: MembersOccupationDialogComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ MembersOccupationDialogComponent ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(MembersOccupationDialogComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/sineedge_front/src/app/settings/component/members-occupation/members-occupation-dialog/members-occupation-dialog.component.ts b/sineedge_front/src/app/settings/component/members-occupation/members-occupation-dialog/members-occupation-dialog.component.ts
new file mode 100644
index 00000000..1d989749
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/members-occupation/members-occupation-dialog/members-occupation-dialog.component.ts
@@ -0,0 +1,63 @@
+import { Component, OnInit, Inject } from '@angular/core';
+import { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';
+import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
+import { MastersService } from '../../../service/master/masters.service';
+
+@Component({
+ selector: 'app-jazz-dialog',
+ templateUrl: './members-occupation-dialog.component.html',
+ styleUrls: ['./members-occupation-dialog.component.scss']
+})
+export class MembersOccupationDialogComponent implements OnInit {
+
+
+ public _occupationForm: FormGroup;
+
+ constructor(private _formBuilder: FormBuilder,
+ private dialogRef: MatDialogRef,
+ private _memberService: MastersService,
+ @Inject(MAT_DIALOG_DATA) public data: any) { }
+
+ onNoClick(): void {
+ this.dialogRef.close();
+ }
+
+ ngOnInit() {
+
+ this._occupationForm = this._formBuilder.group({
+ occupation_non_earning_member_id: [this.data.occupation_non_earning_member_id],
+ name: [this.data.name, Validators.compose([Validators.required])]
+ });
+ //console.log(this._occupationForm);
+ }
+
+ onSubmit() {
+ if(isNaN(this.data.occupation_non_earning_member_id)) {
+ var my_array = this._occupationForm.value;
+ Object.keys(my_array).forEach((key) => ( my_array[key] == null) && delete my_array[key]);
+ console.log(my_array);
+ this._memberService.addMasterDetails(my_array,'OCCUPATIONMEMBERS').subscribe();
+ this.dialogRef.close();
+ alert("saved");
+ } else {
+ this._memberService.editMasterDetails(this._occupationForm.value,'OCCUPATIONMEMBERS').subscribe();
+ this.dialogRef.close();
+ alert("edited");
+ }
+ }
+
+ // onSubmit() {
+ // if (isNaN(this.data.ID)) {
+ // this._memberService.addMembersOccupation(this._occupationForm.value);
+ // this.dialogRef.close();
+ // } else {
+ // this._memberService.editMembersOccupation(this._occupationForm.value);
+ // this.dialogRef.close();
+ // }
+ // }
+
+ onReset(){
+ this._occupationForm.reset();
+ }
+}
+
diff --git a/sineedge_front/src/app/settings/component/members-occupation/members-occupation-list/members-occupation-list.component.html b/sineedge_front/src/app/settings/component/members-occupation/members-occupation-list/members-occupation-list.component.html
new file mode 100644
index 00000000..e1499335
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/members-occupation/members-occupation-list/members-occupation-list.component.html
@@ -0,0 +1,77 @@
+
+
+
+
+
+
+
+
+
+
+
+ Name
+ {{user.name}}
+
+
+ ID
+ {{user.occupation_non_earning_member_id}}
+
+
+ Abbrevation
+ {{user.abbr}}
+
+
+ createdon
+ {{user.createdon}}
+
+
+ createdby
+ {{user.fk_createdby}}
+
+
+ updated on
+ {{user.updatedon}}
+
+
+ updatedby
+ {{user.fk_updatedby}}
+
+
+ isactive
+ {{user.isactive}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/sineedge_front/src/app/settings/component/members-occupation/members-occupation-list/members-occupation-list.component.scss b/sineedge_front/src/app/settings/component/members-occupation/members-occupation-list/members-occupation-list.component.scss
new file mode 100644
index 00000000..4f2fcbd8
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/members-occupation/members-occupation-list/members-occupation-list.component.scss
@@ -0,0 +1,24 @@
+/* Structure */
+.example-container {
+ display: flex;
+ flex-direction: column;
+ min-width: 30px;
+ }
+
+ .example-header {
+ min-height: 64px;
+ padding: 8px 24px 0;
+ }
+
+ //mat-cell{
+ .cell{
+ display:flex !important;
+ justify-content:center!important;
+
+ }
+
+ // mat-header-cell {
+ .header-cell{
+ display:flex;
+ justify-content:center;
+ }
\ No newline at end of file
diff --git a/sineedge_front/src/app/settings/component/members-occupation/members-occupation-list/members-occupation-list.component.spec.ts b/sineedge_front/src/app/settings/component/members-occupation/members-occupation-list/members-occupation-list.component.spec.ts
new file mode 100644
index 00000000..6df9db6d
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/members-occupation/members-occupation-list/members-occupation-list.component.spec.ts
@@ -0,0 +1,25 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { MembersOccupationListComponent } from './members-occupation-list.component';
+
+describe('MembersOccupationListComponent', () => {
+ let component: MembersOccupationListComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ MembersOccupationListComponent ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(MembersOccupationListComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/sineedge_front/src/app/settings/component/members-occupation/members-occupation-list/members-occupation-list.component.ts b/sineedge_front/src/app/settings/component/members-occupation/members-occupation-list/members-occupation-list.component.ts
new file mode 100644
index 00000000..f7f0ec00
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/members-occupation/members-occupation-list/members-occupation-list.component.ts
@@ -0,0 +1,88 @@
+import { Component, OnInit, OnDestroy, ViewChild } from '@angular/core';
+import { MatDialog, MatDialogRef, MatDialogConfig,MatPaginator, MatSort,MatTableDataSource } from '@angular/material';
+
+import { Observable, Subject } from 'rxjs';
+import { Http, Response } from '@angular/http';
+import 'rxjs/add/operator/map';
+
+import { DataSource } from '@angular/cdk/collections';
+import { map } from 'rxjs/operators';
+import { of as observableOf, merge } from 'rxjs';
+
+
+import { MastersService } from '../../../service/master/masters.service';
+import { MembersOccupationDialogComponent } from '../members-occupation-dialog/members-occupation-dialog.component';
+import { MembersOccupation } from '../../../model/members-occupation';
+
+
+@Component({
+ selector: 'app-members-occupation-list',
+ templateUrl: './members-occupation-list.component.html',
+ styleUrls: ['./members-occupation-list.component.scss']
+})
+export class MembersOccupationListComponent implements OnInit {
+
+ isPopupOpened = true;
+
+ displayedColumns = ['occupation_non_earning_member_id','name','createdon','fk_createdby','updatedon','isactive','fk_updatedby','actions'];
+ //occupation_non_earning_member_id, name, createdon, fk_createdby, updatedon, fk_updatedby, isactive
+
+ @ViewChild(MatPaginator) paginator: MatPaginator;
+ @ViewChild(MatSort) sort: MatSort;
+
+
+ constructor(private dialog: MatDialog,
+ private _memberService: MastersService) { }
+
+ // get MemberOccupationList() {
+ // return this._memberService.getAllMembersOccupation();
+ // }
+
+ ngOnInit() {}
+
+ dataSource = new UserDataSource(this._memberService);
+
+ addMemberOccupation() {
+ this.isPopupOpened = true;
+ const dialogRef = this.dialog.open(MembersOccupationDialogComponent, {
+ data: {}
+ });
+
+
+ dialogRef.afterClosed().subscribe(result => {
+ this.isPopupOpened = false;
+ });
+ }
+
+ editMemberOccupation(arr : any) {
+ this.isPopupOpened = true;
+ //const contact = this._memberService.getAllMembersOccupation().find(c => c.ID === id);
+ const dialogRef = this.dialog.open(MembersOccupationDialogComponent, {
+ data: arr
+ });
+
+
+ dialogRef.afterClosed().subscribe(result => {
+ this.isPopupOpened = false;
+ });
+ }
+
+ deleteMemberOccupation(id: number) {
+ this._memberService.deleteMasterDetails(id,'OCCUPATIONMEMBERS');
+ }
+}
+
+
+
+export class UserDataSource extends DataSource {
+
+ constructor(private _mos:MastersService ) {
+ super();
+ }
+
+ connect(): Observable {
+ //return this.userService.getUser();
+ return this._mos.getAllMembersOccupation();
+ }
+ disconnect() {}
+}
\ No newline at end of file
diff --git a/sineedge_front/src/app/settings/component/pd/pd-allocation-type-dialog/pd-allocation-type-dialog.component.html b/sineedge_front/src/app/settings/component/pd/pd-allocation-type-dialog/pd-allocation-type-dialog.component.html
new file mode 100644
index 00000000..d62d273c
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/pd/pd-allocation-type-dialog/pd-allocation-type-dialog.component.html
@@ -0,0 +1,40 @@
+
+
+
+
PD Allocation Type
+
+
+
+
+
\ No newline at end of file
diff --git a/sineedge_front/src/app/settings/component/pd/pd-allocation-type-dialog/pd-allocation-type-dialog.component.scss b/sineedge_front/src/app/settings/component/pd/pd-allocation-type-dialog/pd-allocation-type-dialog.component.scss
new file mode 100644
index 00000000..3e80f0db
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/pd/pd-allocation-type-dialog/pd-allocation-type-dialog.component.scss
@@ -0,0 +1,3 @@
+mat-form-field{
+ width:100%;
+}
\ No newline at end of file
diff --git a/sineedge_front/src/app/settings/component/pd/pd-allocation-type-dialog/pd-allocation-type-dialog.component.spec.ts b/sineedge_front/src/app/settings/component/pd/pd-allocation-type-dialog/pd-allocation-type-dialog.component.spec.ts
new file mode 100644
index 00000000..a98fc333
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/pd/pd-allocation-type-dialog/pd-allocation-type-dialog.component.spec.ts
@@ -0,0 +1,25 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { PdAllocationTypeDialogComponent } from './pd-allocation-type-dialog.component';
+
+describe('PdAllocationTypeDialogComponent', () => {
+ let component: PdAllocationTypeDialogComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ PdAllocationTypeDialogComponent ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(PdAllocationTypeDialogComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/sineedge_front/src/app/settings/component/pd/pd-allocation-type-dialog/pd-allocation-type-dialog.component.ts b/sineedge_front/src/app/settings/component/pd/pd-allocation-type-dialog/pd-allocation-type-dialog.component.ts
new file mode 100644
index 00000000..09fb52a7
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/pd/pd-allocation-type-dialog/pd-allocation-type-dialog.component.ts
@@ -0,0 +1,73 @@
+import { Component, OnInit, Inject } from '@angular/core';
+import { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';
+import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
+import { MastersService } from '../../../service/master/masters.service';
+
+@Component({
+ selector: 'app-jazz-dialog',
+ templateUrl: './pd-allocation-type-dialog.component.html',
+ styleUrls: ['./pd-allocation-type-dialog.component.scss']
+})
+export class PdAllocationTypeDialogComponent implements OnInit {
+
+
+
+ public _PDAllocationTypeForm: FormGroup;
+
+ constructor(private _formBuilder: FormBuilder,
+ private dialogRef: MatDialogRef,
+ private _pds: MastersService,
+ @Inject(MAT_DIALOG_DATA) public data: any) { }
+
+ onNoClick(): void {
+ this.dialogRef.close();
+ }
+
+ ngOnInit() {
+
+ this._PDAllocationTypeForm = this._formBuilder.group({
+ pd_allocation_type_id: [this.data.pd_allocation_type_id],
+ pd_allocation_type_name: [this.data.pd_allocation_type_name, Validators.compose([Validators.required])]
+ });
+ //pd_allocation_type_id, pd_allocation_type_name, createdon, fk_createdby, updatedon, isactive
+ //console.log(this._PDAllocationTypeForm);
+ }
+
+ onSubmit() {
+ if(isNaN(this.data.pd_allocation_type_id)) {
+ var my_array = this._PDAllocationTypeForm.value;
+ Object.keys(my_array).forEach((key) => ( my_array[key] == null) && delete my_array[key]);
+ console.log(my_array);
+ this._pds.addMasterDetails(my_array,'PDALLOCATIONTYPE').subscribe();
+ this.dialogRef.close();
+ alert("saved");
+ } else {
+ this._pds.editMasterDetails(this._PDAllocationTypeForm.value,'PDALLOCATIONTYPE').subscribe();
+ this.dialogRef.close();
+ alert("edited");
+ }
+ }
+
+ // onSubmit() {
+ // if (isNaN(this.data.ID)) {
+ // this._memberService.addMembersOccupation(this._PDAllocationTypeForm.value);
+ // this.dialogRef.close();
+ // } else {
+ // this._memberService.editMembersOccupation(this._PDAllocationTypeForm.value);
+ // this.dialogRef.close();
+ // }
+ // }
+
+ onReset(){
+ this._PDAllocationTypeForm.reset();
+ }
+}
+
+
+
+
+
+
+
+
+
diff --git a/sineedge_front/src/app/settings/component/pd/pd-allocation-type-list/pd-allocation-type-list.component.html b/sineedge_front/src/app/settings/component/pd/pd-allocation-type-list/pd-allocation-type-list.component.html
new file mode 100644
index 00000000..0713cd1a
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/pd/pd-allocation-type-list/pd-allocation-type-list.component.html
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+ {{user.pd_allocation_type_name}}
+
+
+ ID
+ {{user.pd_allocation_type_id}}
+
+
+ isactive
+ {{user.isactive}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/sineedge_front/src/app/settings/component/pd/pd-allocation-type-list/pd-allocation-type-list.component.scss b/sineedge_front/src/app/settings/component/pd/pd-allocation-type-list/pd-allocation-type-list.component.scss
new file mode 100644
index 00000000..e69de29b
diff --git a/sineedge_front/src/app/settings/component/pd/pd-allocation-type-list/pd-allocation-type-list.component.spec.ts b/sineedge_front/src/app/settings/component/pd/pd-allocation-type-list/pd-allocation-type-list.component.spec.ts
new file mode 100644
index 00000000..22d79c3d
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/pd/pd-allocation-type-list/pd-allocation-type-list.component.spec.ts
@@ -0,0 +1,25 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { PdAllocationTypeListComponent } from './pd-allocation-type-list.component';
+
+describe('PdAllocationTypeListComponent', () => {
+ let component: PdAllocationTypeListComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ PdAllocationTypeListComponent ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(PdAllocationTypeListComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/sineedge_front/src/app/settings/component/pd/pd-allocation-type-list/pd-allocation-type-list.component.ts b/sineedge_front/src/app/settings/component/pd/pd-allocation-type-list/pd-allocation-type-list.component.ts
new file mode 100644
index 00000000..c1ea192a
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/pd/pd-allocation-type-list/pd-allocation-type-list.component.ts
@@ -0,0 +1,88 @@
+import { Component, OnInit, OnDestroy, ViewChild } from '@angular/core';
+import { MatDialog, MatDialogRef, MatDialogConfig,MatPaginator, MatSort,MatTableDataSource } from '@angular/material';
+
+import { Observable, Subject } from 'rxjs';
+import { Http, Response } from '@angular/http';
+import 'rxjs/add/operator/map';
+
+import { DataSource } from '@angular/cdk/collections';
+import { map } from 'rxjs/operators';
+import { of as observableOf, merge } from 'rxjs';
+
+
+import { MastersService } from '../../../service/master/masters.service';
+import { PdAllocationTypeDialogComponent } from '../pd-allocation-type-dialog/pd-allocation-type-dialog.component';
+import { PdAllocationType } from '../../../model/pd';
+
+
+@Component({
+ selector: 'app-pd-allocation-type-list',
+ templateUrl: './pd-allocation-type-list.component.html',
+ styleUrls: ['./pd-allocation-type-list.component.scss']
+})
+export class PdAllocationTypeListComponent implements OnInit {
+
+ isPopupOpened = true;
+ displayedColumns = ['pd_allocation_type_id','pd_allocation_type_name','isactive','actions'];
+
+ @ViewChild(MatPaginator) paginator: MatPaginator;
+ @ViewChild(MatSort) sort: MatSort;
+
+
+ constructor(private dialog: MatDialog,
+ private _MastersService: MastersService) { }
+
+ // get PDAllocationTypeList() {
+ // return this._MastersService.getAllPDAllocationType();
+ // }
+
+ dataSource = new UserDataSource(this._MastersService);
+
+ ngOnInit() {
+ }
+
+
+ addPDAllocationType() {
+ this.isPopupOpened = true;
+ const dialogRef = this.dialog.open(PdAllocationTypeDialogComponent, {
+ data: {}
+ });
+
+
+ dialogRef.afterClosed().subscribe(result => {
+ this.isPopupOpened = false;
+ });
+ }
+
+ editPDAllocationType(arr: any[]) {
+ this.isPopupOpened = true;
+ //const contact = this._MastersService.getAllPDAllocationType().find(c => c.ID === id);
+ const dialogRef = this.dialog.open(PdAllocationTypeDialogComponent, {
+ data: arr
+ });
+
+
+ dialogRef.afterClosed().subscribe(result => {
+ this.isPopupOpened = false;
+ });
+ }
+
+ deletePDAllocationType(id: number) {
+ this._MastersService.deleteMasterDetails(id,'PDALLOCATIONTYPE');
+ }
+}
+
+export class UserDataSource extends DataSource {
+
+
+ constructor(private _bs: MastersService) {
+ super();
+ }
+
+ connect(): Observable {
+ //return this.userService.getUser();
+ return this._bs.getAllPDAllocationType();
+ }
+ disconnect() {}
+}
+
diff --git a/sineedge_front/src/app/settings/component/pd/pd-location-approach-dialog/pd-location-approach-dialog.component.html b/sineedge_front/src/app/settings/component/pd/pd-location-approach-dialog/pd-location-approach-dialog.component.html
new file mode 100644
index 00000000..5694e99b
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/pd/pd-location-approach-dialog/pd-location-approach-dialog.component.html
@@ -0,0 +1,42 @@
+
+
+
PD Location Approach
+
+
+
+
+
+
+
diff --git a/sineedge_front/src/app/settings/component/pd/pd-location-approach-dialog/pd-location-approach-dialog.component.scss b/sineedge_front/src/app/settings/component/pd/pd-location-approach-dialog/pd-location-approach-dialog.component.scss
new file mode 100644
index 00000000..3e80f0db
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/pd/pd-location-approach-dialog/pd-location-approach-dialog.component.scss
@@ -0,0 +1,3 @@
+mat-form-field{
+ width:100%;
+}
\ No newline at end of file
diff --git a/sineedge_front/src/app/settings/component/pd/pd-location-approach-dialog/pd-location-approach-dialog.component.spec.ts b/sineedge_front/src/app/settings/component/pd/pd-location-approach-dialog/pd-location-approach-dialog.component.spec.ts
new file mode 100644
index 00000000..c3e59ee7
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/pd/pd-location-approach-dialog/pd-location-approach-dialog.component.spec.ts
@@ -0,0 +1,25 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { PdLocationApproachDialogComponent } from './pd-location-approach-dialog.component';
+
+describe('PdLocationApproachDialogComponent', () => {
+ let component: PdLocationApproachDialogComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ PdLocationApproachDialogComponent ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(PdLocationApproachDialogComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/sineedge_front/src/app/settings/component/pd/pd-location-approach-dialog/pd-location-approach-dialog.component.ts b/sineedge_front/src/app/settings/component/pd/pd-location-approach-dialog/pd-location-approach-dialog.component.ts
new file mode 100644
index 00000000..b0673a08
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/pd/pd-location-approach-dialog/pd-location-approach-dialog.component.ts
@@ -0,0 +1,75 @@
+import { Component, OnInit, Inject } from '@angular/core';
+import { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';
+import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
+import { MastersService } from '../../../service/master/masters.service';
+
+@Component({
+ selector: 'app-jazz-dialog',
+ templateUrl: './pd-location-approach-dialog.component.html',
+ styleUrls: ['./pd-location-approach-dialog.component.scss']
+})
+export class PdLocationApproachDialogComponent implements OnInit {
+
+ public _pdLocationApproachForm: FormGroup;
+
+ constructor(private _formBuilder: FormBuilder,
+ private dialogRef: MatDialogRef,
+ private _MastersService: MastersService,
+ @Inject(MAT_DIALOG_DATA) public data: any) { }
+
+ onNoClick(): void {
+ this.dialogRef.close();
+ }
+ //pd_location_approach_id, description, createdon, fk_createdby, updatedon, fk_updatedby, isactive
+ ngOnInit() {
+
+ this._pdLocationApproachForm = this._formBuilder.group({
+ //branch_id: any; fk_city_id: any;
+ pd_location_approach_id: [this.data.pd_location_approach_id],
+ description: [this.data.description, Validators.compose([Validators.required])]
+ });
+ //console.log(this._pdLocationApproachForm);
+ }
+
+ // onSubmit() {
+ // if (isNaN(this.data.ID)) {
+ // this._MastersService.addBranch(this._pdLocationApproachForm.value);
+ // this.dialogRef.close();
+ // } else {
+ // this._MastersService.editBranch(this._pdLocationApproachForm.value);
+ // this.dialogRef.close();
+ // }
+ // }
+
+ onSubmit() {
+ if(isNaN(this.data.pd_location_approach_id)) {
+ var my_array = this._pdLocationApproachForm.value;
+ Object.keys(my_array).forEach((key) => ( my_array[key] == null) && delete my_array[key]);
+ console.log(my_array);
+ this._MastersService.addMasterDetails(my_array,'PDLOCATIONAPPROACH').subscribe();
+ this.dialogRef.close();
+ alert("saved");
+ } else {
+
+ this._MastersService.editMasterDetails(this._pdLocationApproachForm.value,'PDLOCATIONAPPROACH').subscribe();
+ this.dialogRef.close();
+ alert("edited");
+ }
+ }
+
+
+
+ onReset(){
+ this._pdLocationApproachForm.reset();
+ }
+}
+
+
+
+
+
+
+
+
+
+
diff --git a/sineedge_front/src/app/settings/component/pd/pd-location-approach-list/pd-location-approach-list.component.html b/sineedge_front/src/app/settings/component/pd/pd-location-approach-list/pd-location-approach-list.component.html
new file mode 100644
index 00000000..1df589c4
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/pd/pd-location-approach-list/pd-location-approach-list.component.html
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ ID
+ {{user.pd_allocation_type_id}}
+
+
+ Name
+ {{user.pd_allocation_type_name}}
+
+
+ isactive
+ {{user.isactive}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/sineedge_front/src/app/settings/component/pd/pd-location-approach-list/pd-location-approach-list.component.scss b/sineedge_front/src/app/settings/component/pd/pd-location-approach-list/pd-location-approach-list.component.scss
new file mode 100644
index 00000000..e69de29b
diff --git a/sineedge_front/src/app/settings/component/pd/pd-location-approach-list/pd-location-approach-list.component.spec.ts b/sineedge_front/src/app/settings/component/pd/pd-location-approach-list/pd-location-approach-list.component.spec.ts
new file mode 100644
index 00000000..34c33f23
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/pd/pd-location-approach-list/pd-location-approach-list.component.spec.ts
@@ -0,0 +1,25 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { PdLocationApproachListComponent } from './pd-location-approach-list.component';
+
+describe('PdLocationApproachListComponent', () => {
+ let component: PdLocationApproachListComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ PdLocationApproachListComponent ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(PdLocationApproachListComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/sineedge_front/src/app/settings/component/pd/pd-location-approach-list/pd-location-approach-list.component.ts b/sineedge_front/src/app/settings/component/pd/pd-location-approach-list/pd-location-approach-list.component.ts
new file mode 100644
index 00000000..66bb2de4
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/pd/pd-location-approach-list/pd-location-approach-list.component.ts
@@ -0,0 +1,90 @@
+import { Component, OnInit, OnDestroy, ViewChild } from '@angular/core';
+import { MatDialog, MatDialogRef, MatDialogConfig,MatPaginator, MatSort,MatTableDataSource } from '@angular/material';
+
+import { Observable, Subject } from 'rxjs';
+import { Http, Response } from '@angular/http';
+import 'rxjs/add/operator/map';
+
+import { DataSource } from '@angular/cdk/collections';
+import { map } from 'rxjs/operators';
+import { of as observableOf, merge } from 'rxjs';
+
+
+import { MastersService } from '../../../service/master/masters.service';
+import { PdLocationApproachDialogComponent } from '../pd-location-approach-dialog/pd-location-approach-dialog.component';
+import { PdLocationApproach } from '../../../model/pd';
+
+
+@Component({
+ selector: 'app-pd-location-approach-list',
+ templateUrl: './pd-location-approach-list.component.html',
+ styleUrls: ['./pd-location-approach-list.component.scss']
+})
+export class PdLocationApproachListComponent implements OnInit {
+
+
+ isPopupOpened = true;
+ displayedColumns = ['pd_allocation_type_id', 'pd_allocation_type_name', 'isactive','actions'];
+
+ @ViewChild(MatPaginator) paginator: MatPaginator;
+ @ViewChild(MatSort) sort: MatSort;
+
+
+ constructor(private dialog: MatDialog,
+ private _MastersService: MastersService) { }
+
+ // get PdLocationApproachList() {
+ // return this._MastersService.getAllPdLocationApproach();
+ // }
+
+ //dataSource = new UserDataSource(this._MastersService);
+
+ ngOnInit() {
+ }
+
+
+ addPdLocationApproach() {
+ this.isPopupOpened = true;
+ const dialogRef = this.dialog.open(PdLocationApproachDialogComponent, {
+ data: {}
+ });
+
+
+ dialogRef.afterClosed().subscribe(result => {
+ this.isPopupOpened = false;
+ });
+ }
+
+ editPdLocationApproach(arr: any[]) {
+ this.isPopupOpened = true;
+ //const contact = this._MastersService.getAllPdLocationApproach().find(c => c.ID === id);
+ const dialogRef = this.dialog.open(PdLocationApproachDialogComponent, {
+ data: arr
+ });
+
+
+ dialogRef.afterClosed().subscribe(result => {
+ this.isPopupOpened = false;
+ });
+ }
+
+ deletePdLocationApproach(id: number) {
+ this._MastersService.deleteMasterDetails(id,'PDLOCATIONAPPROACH');
+ }
+}
+
+export class UserDataSource extends DataSource {
+
+
+ constructor(private _bs: MastersService) {
+ super();
+ }
+
+ connect(): Observable {
+ //return this.userService.getUser();
+ return this._bs.getAllPDLocationApproach();
+ }
+ disconnect() {}
+}
+
+
diff --git a/sineedge_front/src/app/settings/component/pd/pd-status-dialog/pd-status-dialog.component.html b/sineedge_front/src/app/settings/component/pd/pd-status-dialog/pd-status-dialog.component.html
new file mode 100644
index 00000000..5729ff1c
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/pd/pd-status-dialog/pd-status-dialog.component.html
@@ -0,0 +1,43 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/sineedge_front/src/app/settings/component/pd/pd-status-dialog/pd-status-dialog.component.scss b/sineedge_front/src/app/settings/component/pd/pd-status-dialog/pd-status-dialog.component.scss
new file mode 100644
index 00000000..3e80f0db
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/pd/pd-status-dialog/pd-status-dialog.component.scss
@@ -0,0 +1,3 @@
+mat-form-field{
+ width:100%;
+}
\ No newline at end of file
diff --git a/sineedge_front/src/app/settings/component/pd/pd-status-dialog/pd-status-dialog.component.spec.ts b/sineedge_front/src/app/settings/component/pd/pd-status-dialog/pd-status-dialog.component.spec.ts
new file mode 100644
index 00000000..bd1ed0bd
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/pd/pd-status-dialog/pd-status-dialog.component.spec.ts
@@ -0,0 +1,25 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { PdStatusDialogComponent } from './pd-status-dialog.component';
+
+describe('PdStatusDialogComponent', () => {
+ let component: PdStatusDialogComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ PdStatusDialogComponent ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(PdStatusDialogComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/sineedge_front/src/app/settings/component/pd/pd-status-dialog/pd-status-dialog.component.ts b/sineedge_front/src/app/settings/component/pd/pd-status-dialog/pd-status-dialog.component.ts
new file mode 100644
index 00000000..ce929cb3
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/pd/pd-status-dialog/pd-status-dialog.component.ts
@@ -0,0 +1,66 @@
+import { Component, OnInit, Inject } from '@angular/core';
+import { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';
+import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
+import { MastersService } from '../../../service/master/masters.service';
+
+@Component({
+ selector: 'app-jazz-dialog',
+ templateUrl: './pd-status-dialog.component.html',
+ styleUrls: ['./pd-status-dialog.component.scss']
+})
+export class PdStatusDialogComponent implements OnInit {
+
+ public _PdStatusForm: FormGroup;
+
+ constructor(private _formBuilder: FormBuilder,
+ private dialogRef: MatDialogRef,
+ private _PdStatusService: MastersService,
+ @Inject(MAT_DIALOG_DATA) public data: any) { }
+
+ onNoClick(): void {
+ this.dialogRef.close();
+ }
+
+ ngOnInit() {
+
+ this._PdStatusForm = this._formBuilder.group({
+
+ pd_status_id: [this.data.pd_status_id],
+ pd_status_name: [this.data.pd_status_name, Validators.compose([Validators.required])],
+
+ });
+ //console.log(this._PdStatusForm);
+ }
+
+ // onSubmit() {
+ // if (isNaN(this.data.ID)) {
+ // this._PdStatusService.addPdStatus(this._PdStatusForm.value);
+ // this.dialogRef.close();
+ // } else {
+ // this._PdStatusService.editPdStatus(this._PdStatusForm.value);
+ // this.dialogRef.close();
+ // }
+ // }
+
+ onSubmit() {
+ if(isNaN(this.data.pd_status_id)) {
+ var my_array = this._PdStatusForm.value;
+ Object.keys(my_array).forEach((key) => ( my_array[key] == null) && delete my_array[key]);
+ console.log(my_array);
+ this._PdStatusService.addMasterDetails(my_array,'PDSTATUS').subscribe();
+ this.dialogRef.close();
+ alert("saved");
+ } else {
+
+ this._PdStatusService.editMasterDetails(this._PdStatusForm.value,'PDSTATUS').subscribe();
+ this.dialogRef.close();
+ alert("edited");
+ }
+ }
+
+
+
+ onReset(){
+ this._PdStatusForm.reset();
+ }
+}
\ No newline at end of file
diff --git a/sineedge_front/src/app/settings/component/pd/pd-status-list/pd-status-list.component.html b/sineedge_front/src/app/settings/component/pd/pd-status-list/pd-status-list.component.html
new file mode 100644
index 00000000..1d1977d9
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/pd/pd-status-list/pd-status-list.component.html
@@ -0,0 +1,59 @@
+
+
+
+
+
+
+
+
+
+
+
+ ID
+ {{user.pd_status_id}}
+
+
+ Name
+ {{user.pd_status_name}}
+
+
+ isactive
+ {{user.isactive}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/sineedge_front/src/app/settings/component/pd/pd-status-list/pd-status-list.component.scss b/sineedge_front/src/app/settings/component/pd/pd-status-list/pd-status-list.component.scss
new file mode 100644
index 00000000..e69de29b
diff --git a/sineedge_front/src/app/settings/component/pd/pd-status-list/pd-status-list.component.spec.ts b/sineedge_front/src/app/settings/component/pd/pd-status-list/pd-status-list.component.spec.ts
new file mode 100644
index 00000000..19ee5251
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/pd/pd-status-list/pd-status-list.component.spec.ts
@@ -0,0 +1,25 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { PdStatusListComponent } from './pd-status-list.component';
+
+describe('PdStatusListComponent', () => {
+ let component: PdStatusListComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ PdStatusListComponent ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(PdStatusListComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/sineedge_front/src/app/settings/component/pd/pd-status-list/pd-status-list.component.ts b/sineedge_front/src/app/settings/component/pd/pd-status-list/pd-status-list.component.ts
new file mode 100644
index 00000000..9e5bca0a
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/pd/pd-status-list/pd-status-list.component.ts
@@ -0,0 +1,90 @@
+import { Component, OnInit, OnDestroy, ViewChild } from '@angular/core';
+import { MatDialog, MatDialogRef, MatDialogConfig,MatPaginator, MatSort,MatTableDataSource } from '@angular/material';
+
+import { Observable, Subject } from 'rxjs';
+import { Http, Response } from '@angular/http';
+import 'rxjs/add/operator/map';
+
+import { DataSource } from '@angular/cdk/collections';
+import { map } from 'rxjs/operators';
+import { of as observableOf, merge } from 'rxjs';
+
+
+import { MastersService } from '../../../service/master/masters.service';
+import { PdStatusDialogComponent } from '../pd-status-dialog/pd-status-dialog.component';
+import { PdStatus } from '../../../model/pd';
+
+
+@Component({
+ selector: 'app-pd-status-list',
+ templateUrl: './pd-status-list.component.html',
+ styleUrls: ['./pd-status-list.component.scss']
+})
+export class PdStatusListComponent implements OnInit {
+
+
+ isPopupOpened = true;
+ displayedColumns = ['pd_status_id', 'pd_status_name','isactive','actions'];
+
+ @ViewChild(MatPaginator) paginator: MatPaginator;
+ @ViewChild(MatSort) sort: MatSort;
+
+
+ constructor(private dialog: MatDialog,
+ private _PdStatusService: MastersService) { }
+
+ // get PdStatusList() {
+ // return this._PdStatusService.getAllPdStatus();
+ // }
+
+ dataSource = new UserDataSource(this._PdStatusService);
+
+ ngOnInit() {
+ }
+
+
+ addPdStatus() {
+ this.isPopupOpened = true;
+ const dialogRef = this.dialog.open(PdStatusDialogComponent, {
+ data: {}
+ });
+
+
+ dialogRef.afterClosed().subscribe(result => {
+ this.isPopupOpened = false;
+ });
+ }
+
+ editPdStatus(arr: any[]) {
+ this.isPopupOpened = true;
+ //const contact = this._PdStatusService.getAllPdStatus().find(c => c.ID === id);
+ const dialogRef = this.dialog.open(PdStatusDialogComponent, {
+ data: arr
+ });
+
+
+ dialogRef.afterClosed().subscribe(result => {
+ this.isPopupOpened = false;
+ });
+ }
+
+ deletePdStatus(id: number) {
+ this._PdStatusService.deleteMasterDetails(id,'PDSTATUS');
+ }
+}
+
+export class UserDataSource extends DataSource {
+
+
+ constructor(private _bs: MastersService) {
+ super();
+ }
+
+ connect(): Observable {
+ //return this.userService.getUser();
+ return this._bs.getAllPDStatus();
+ }
+ disconnect() {}
+}
+
+
diff --git a/sineedge_front/src/app/settings/component/pd/pd-type-dialog/pd-type-dialog.component.html b/sineedge_front/src/app/settings/component/pd/pd-type-dialog/pd-type-dialog.component.html
new file mode 100644
index 00000000..62b4a3b9
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/pd/pd-type-dialog/pd-type-dialog.component.html
@@ -0,0 +1,43 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/sineedge_front/src/app/settings/component/pd/pd-type-dialog/pd-type-dialog.component.scss b/sineedge_front/src/app/settings/component/pd/pd-type-dialog/pd-type-dialog.component.scss
new file mode 100644
index 00000000..3e80f0db
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/pd/pd-type-dialog/pd-type-dialog.component.scss
@@ -0,0 +1,3 @@
+mat-form-field{
+ width:100%;
+}
\ No newline at end of file
diff --git a/sineedge_front/src/app/settings/component/pd/pd-type-dialog/pd-type-dialog.component.spec.ts b/sineedge_front/src/app/settings/component/pd/pd-type-dialog/pd-type-dialog.component.spec.ts
new file mode 100644
index 00000000..ec0f1b7b
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/pd/pd-type-dialog/pd-type-dialog.component.spec.ts
@@ -0,0 +1,25 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { PdTypeDialogComponent } from './pd-type-dialog.component';
+
+describe('PdTypeDialogComponent', () => {
+ let component: PdTypeDialogComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ PdTypeDialogComponent ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(PdTypeDialogComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/sineedge_front/src/app/settings/component/pd/pd-type-dialog/pd-type-dialog.component.ts b/sineedge_front/src/app/settings/component/pd/pd-type-dialog/pd-type-dialog.component.ts
new file mode 100644
index 00000000..f9db8e58
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/pd/pd-type-dialog/pd-type-dialog.component.ts
@@ -0,0 +1,65 @@
+import { Component, OnInit, Inject } from '@angular/core';
+import { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';
+import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
+import { MastersService } from '../../../service/master/masters.service';
+
+@Component({
+ selector: 'app-jazz-dialog',
+ templateUrl: './pd-type-dialog.component.html',
+ styleUrls: ['./pd-type-dialog.component.scss']
+})
+export class PdTypeDialogComponent implements OnInit {
+
+ public _pdTypeForm: FormGroup;
+
+ constructor(private _formBuilder: FormBuilder,
+ private dialogRef: MatDialogRef,
+ private _pdTypeService: MastersService,
+ @Inject(MAT_DIALOG_DATA) public data: any) { }
+
+ onNoClick(): void {
+ this.dialogRef.close();
+ }
+
+ ngOnInit() {
+
+ this._pdTypeForm = this._formBuilder.group({
+ //branch_id: any; fk_city_id: any;pd_type_id, type_name, createdon, fk_createdby, updatedon, fk_updatedby, isactive
+ pd_type_id: [this.data.pd_type_id],
+ type_name: [this.data.type_name, Validators.compose([Validators.required])]
+ });
+ //console.log(this._pdTypeForm);
+ }
+
+ // onSubmit() {
+ // if (isNaN(this.data.ID)) {
+ // this._pdTypeService.addBranch(this._pdTypeForm.value);
+ // this.dialogRef.close();
+ // } else {
+ // this._pdTypeService.editBranch(this._pdTypeForm.value);
+ // this.dialogRef.close();
+ // }
+ // }
+
+ onSubmit() {
+ if(isNaN(this.data.pd_type_id)) {
+ var my_array = this._pdTypeForm.value;
+ Object.keys(my_array).forEach((key) => ( my_array[key] == null) && delete my_array[key]);
+ console.log(my_array);
+ this._pdTypeService.addMasterDetails(my_array,'PDTYPE').subscribe();
+ this.dialogRef.close();
+ alert("saved");
+ } else {
+
+ this._pdTypeService.editMasterDetails(this._pdTypeForm.value,'PDTYPE').subscribe();
+ this.dialogRef.close();
+ alert("edited");
+ }
+ }
+
+
+
+ onReset(){
+ this._pdTypeForm.reset();
+ }
+}
\ No newline at end of file
diff --git a/sineedge_front/src/app/settings/component/pd/pd-type-list/pd-type-list.component.html b/sineedge_front/src/app/settings/component/pd/pd-type-list/pd-type-list.component.html
new file mode 100644
index 00000000..5f73358e
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/pd/pd-type-list/pd-type-list.component.html
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ ID
+ {{user.pd_type_id}}
+
+
+ Name
+ {{user.type_name}}
+
+
+ isactive
+ {{user.isactive}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/sineedge_front/src/app/settings/component/pd/pd-type-list/pd-type-list.component.scss b/sineedge_front/src/app/settings/component/pd/pd-type-list/pd-type-list.component.scss
new file mode 100644
index 00000000..e69de29b
diff --git a/sineedge_front/src/app/settings/component/pd/pd-type-list/pd-type-list.component.spec.ts b/sineedge_front/src/app/settings/component/pd/pd-type-list/pd-type-list.component.spec.ts
new file mode 100644
index 00000000..32f21fbf
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/pd/pd-type-list/pd-type-list.component.spec.ts
@@ -0,0 +1,25 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { PdTypeListComponent } from './pd-type-list.component';
+
+describe('PdTypeListComponent', () => {
+ let component: PdTypeListComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ PdTypeListComponent ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(PdTypeListComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/sineedge_front/src/app/settings/component/pd/pd-type-list/pd-type-list.component.ts b/sineedge_front/src/app/settings/component/pd/pd-type-list/pd-type-list.component.ts
new file mode 100644
index 00000000..9043b6ff
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/pd/pd-type-list/pd-type-list.component.ts
@@ -0,0 +1,90 @@
+import { Component, OnInit, OnDestroy, ViewChild } from '@angular/core';
+import { MatDialog, MatDialogRef, MatDialogConfig,MatPaginator, MatSort,MatTableDataSource } from '@angular/material';
+
+import { Observable, Subject } from 'rxjs';
+import { Http, Response } from '@angular/http';
+import 'rxjs/add/operator/map';
+
+import { DataSource } from '@angular/cdk/collections';
+import { map } from 'rxjs/operators';
+import { of as observableOf, merge } from 'rxjs';
+
+
+import { MastersService } from '../../../service/master/masters.service';
+import { PdTypeDialogComponent } from '../pd-type-dialog/pd-type-dialog.component';
+import { PdType } from '../../../model/pd';
+
+
+@Component({
+ selector: 'app-pd-type-list',
+ templateUrl: './pd-type-list.component.html',
+ styleUrls: ['./pd-type-list.component.scss']
+})
+export class PdTypeListComponent implements OnInit {
+
+
+ isPopupOpened = true;
+ displayedColumns = ['pd_type_id', 'type_name', 'isactive','actions'];
+
+ @ViewChild(MatPaginator) paginator: MatPaginator;
+ @ViewChild(MatSort) sort: MatSort;
+
+
+ constructor(private dialog: MatDialog,
+ private _PDTypeService: MastersService) { }
+
+ // get PDTypeList() {
+ // return this._PDTypeService.getAllPDType();
+ // }
+
+ dataSource = new UserDataSource(this._PDTypeService);
+
+ ngOnInit() {
+ }
+
+
+ addPDType() {
+ this.isPopupOpened = true;
+ const dialogRef = this.dialog.open(PdTypeDialogComponent, {
+ data: {}
+ });
+
+
+ dialogRef.afterClosed().subscribe(result => {
+ this.isPopupOpened = false;
+ });
+ }
+
+ editPDType(arr: any[]) {
+ this.isPopupOpened = true;
+ //const contact = this._PDTypeService.getAllPDType().find(c => c.ID === id);
+ const dialogRef = this.dialog.open(PdTypeDialogComponent, {
+ data: arr
+ });
+
+
+ dialogRef.afterClosed().subscribe(result => {
+ this.isPopupOpened = false;
+ });
+ }
+
+ deletePDType(id: number) {
+ this._PDTypeService.deleteMasterDetails(id,'PDTYPE');
+ }
+}
+
+export class UserDataSource extends DataSource {
+
+
+ constructor(private _bs: MastersService) {
+ super();
+ }
+
+ connect(): Observable {
+ //return this.userService.getUser();
+ return this._bs.getAllPDType();
+ }
+ disconnect() {}
+}
+
+
diff --git a/sineedge_front/src/app/settings/component/product/product-dialog/product-dialog.component.html b/sineedge_front/src/app/settings/component/product/product-dialog/product-dialog.component.html
new file mode 100644
index 00000000..aa7273c9
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/product/product-dialog/product-dialog.component.html
@@ -0,0 +1,46 @@
+
+
+
Product Details
+
+
+
+
+
+
\ No newline at end of file
diff --git a/sineedge_front/src/app/settings/component/product/product-dialog/product-dialog.component.scss b/sineedge_front/src/app/settings/component/product/product-dialog/product-dialog.component.scss
new file mode 100644
index 00000000..f5c65c46
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/product/product-dialog/product-dialog.component.scss
@@ -0,0 +1,8 @@
+
+ table {
+ width: 100%;
+ }
+
+ mat-form-field{
+ width:100%;
+}
\ No newline at end of file
diff --git a/sineedge_front/src/app/settings/component/product/product-dialog/product-dialog.component.spec.ts b/sineedge_front/src/app/settings/component/product/product-dialog/product-dialog.component.spec.ts
new file mode 100644
index 00000000..d79e7b4b
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/product/product-dialog/product-dialog.component.spec.ts
@@ -0,0 +1,25 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { ProductDialogComponent } from './product-dialog.component';
+
+describe('ProductDialogComponent', () => {
+ let component: ProductDialogComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ ProductDialogComponent ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(ProductDialogComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/sineedge_front/src/app/settings/component/product/product-dialog/product-dialog.component.ts b/sineedge_front/src/app/settings/component/product/product-dialog/product-dialog.component.ts
new file mode 100644
index 00000000..f948ce80
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/product/product-dialog/product-dialog.component.ts
@@ -0,0 +1,55 @@
+import { Component, OnInit, Inject } from '@angular/core';
+import { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';
+import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
+import { MastersService } from '../../../service/master/masters.service';
+
+@Component({
+ selector: 'app-jazz-dialog',
+ templateUrl: './product-dialog.component.html',
+ styleUrls: ['./product-dialog.component.scss']
+})
+
+export class ProductDialogComponent implements OnInit {
+
+ public _productMasterForm: FormGroup;
+
+ constructor(private _formBuilder: FormBuilder,
+ private dialogRef: MatDialogRef,
+ private _MastersService: MastersService,
+ @Inject(MAT_DIALOG_DATA) public data: any) { }
+
+ onNoClick(): void {
+ this.dialogRef.close();
+ }
+
+ ngOnInit() {
+
+ this._productMasterForm = this._formBuilder.group({
+ //ID: [this.data.ID],
+ product_id: [this.data.product_id],
+ name: [this.data.name, Validators.compose([Validators.required])],
+ abbr: [this.data.abbr, Validators.compose([Validators.required])]
+ });
+ console.log(this._productMasterForm);
+ }
+
+ onSubmit() {
+ if(isNaN(this.data.product_id)) {
+
+ var my_array = this._productMasterForm.value;
+ Object.keys(my_array).forEach((key) => ( my_array[key] == null) && delete my_array[key]);
+ console.log(my_array);
+ //this._MastersService.addProductMaster(this._productMasterForm.value);
+ //this._MastersService.addProd(this._productMasterForm.value).subscribe(data=>this.array=data);
+ this._MastersService.addMasterDetails(my_array,'PRODUCTS').subscribe();
+ this.dialogRef.close();
+ alert("saved");
+ } else {
+ //this._MastersService.editProductMaster(this._productMasterForm.value);
+ this._MastersService.editMasterDetails(this._productMasterForm.value,'PRODUCTS').subscribe();
+ this.dialogRef.close();
+ alert("edited");
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/sineedge_front/src/app/settings/component/product/product-list/product-list.component.html b/sineedge_front/src/app/settings/component/product/product-list/product-list.component.html
new file mode 100644
index 00000000..8338833c
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/product/product-list/product-list.component.html
@@ -0,0 +1,322 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+ {{user.name}}
+
+
+ ID
+ {{user.product_id}}
+
+
+ Abbrevation
+ {{user.abbr}}
+
+
+ createdon
+ {{user.createdon}}
+
+
+ createdby
+ {{user.fk_createdby}}
+
+
+ updated on
+ {{user.updatedon}}
+
+
+ updatedby
+ {{user.fk_updatedby}}
+
+
+ isactive
+ {{user.isactive}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/sineedge_front/src/app/settings/component/product/product-list/product-list.component.scss b/sineedge_front/src/app/settings/component/product/product-list/product-list.component.scss
new file mode 100644
index 00000000..6b4b98d6
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/product/product-list/product-list.component.scss
@@ -0,0 +1,83 @@
+
+/* Structure
+.example-container {
+ display: flex;
+ flex-direction: column;
+ min-width: 300px;
+}
+
+.example-header {
+ min-height: 56px;
+ max-height: 56px;
+ display: flex;
+ align-items: center;
+ padding: 8px 24px 0;
+ font-size: 20px;
+ justify-content: space-between;
+ border-bottom: 1px solid transparent;
+}
+
+.mat-input-container {
+ font-size: 14px;
+ flex-grow: 1;
+ margin-left: 32px;
+ margin-top: 8px;
+}
+
+.example-no-results {
+ display: flex;
+ justify-content: center;
+ padding: 24px;
+ font-size: 12px;
+ font-style: italic;
+}
+
+/** Selection styles
+.example-selection-header {
+ font-size: 18px;
+ background: rgba(255, 64, 129, 0.3);
+ border-bottom: 1px solid #d696ac;
+}
+
+.mat-column-select {
+ max-width: 54px;
+}
+
+.mat-row:hover, .example-selected-row {
+ background: #f5f5f5;
+}
+
+.mat-row:active, .mat-row.example-selected-row {
+ background: #eaeaea;
+}
+
+.mat-table {
+ overflow: auto;
+ max-height: 500px;
+}*/
+/* Structure */
+.example-container {
+ display: flex;
+ flex-direction: column;
+ min-width: 30px;
+ width : 80%;
+ margin : 20px auto;
+ }
+
+ .example-header {
+ min-height: 64px;
+ padding: 8px 24px 0;
+ }
+
+ //mat-cell{
+ .cell{
+ display:flex !important;
+ justify-content:center!important;
+
+ }
+
+ // mat-header-cell {
+ .header-cell{
+ display:flex;
+ justify-content:center;
+ }
\ No newline at end of file
diff --git a/sineedge_front/src/app/settings/component/product/product-list/product-list.component.spec.ts b/sineedge_front/src/app/settings/component/product/product-list/product-list.component.spec.ts
new file mode 100644
index 00000000..a2c901bd
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/product/product-list/product-list.component.spec.ts
@@ -0,0 +1,25 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { ProductListComponent } from './product-list.component';
+
+describe('ProductListComponent', () => {
+ let component: ProductListComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ ProductListComponent ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(ProductListComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/sineedge_front/src/app/settings/component/product/product-list/product-list.component.ts b/sineedge_front/src/app/settings/component/product/product-list/product-list.component.ts
new file mode 100644
index 00000000..0855a1b2
--- /dev/null
+++ b/sineedge_front/src/app/settings/component/product/product-list/product-list.component.ts
@@ -0,0 +1,575 @@
+import { Component, OnInit, OnDestroy, ViewChild } from '@angular/core';
+import { MatDialog, MatDialogRef, MatDialogConfig,MatPaginator, MatSort,MatTableDataSource } from '@angular/material';
+
+import { MastersService } from '../../../service/master/masters.service';
+import { ProductDialogComponent } from '../product-dialog/product-dialog.component';
+import { ProductMaster } from '../../../model/product-master';
+//import { DataSource } from '@angular/cdk/table';
+import { Observable, Subject } from 'rxjs';
+import { Http, Response } from '@angular/http';
+import 'rxjs/add/operator/map';
+
+import { DataSource } from '@angular/cdk/collections';
+import { map } from 'rxjs/operators';
+import { of as observableOf, merge } from 'rxjs';
+
+@Component({
+ selector: 'app-product-list',
+ templateUrl: './product-list.component.html',
+ styleUrls: ['./product-list.component.scss']
+})
+export class ProductListComponent {
+
+ isPopupOpened = true;
+
+ TempArray : any = [];
+ Temp : any = [];
+ TTarray : any = [];
+ Temp2 : any = [];
+
+ private contacts: any = [];
+
+ //displayedColumns = ['product_id','name','abbr','createdon','updatedon'];
+ displayedColumns = ['product_id','name','abbr','createdon','fk_createdby','updatedon','isactive','fk_updatedby','actions'];
+ // -- @ViewChild(MatPaginator) paginator: MatPaginator;
+ // -- @ViewChild(MatSort) sort: MatSort;
+ dataSource = new UserDataSource(this._ProductService);
+
+ @ViewChild(MatPaginator) paginator: MatPaginator;
+ @ViewChild(MatSort) sort: MatSort;
+ //dataSource: DataTableDataSource;
+ //dataSource = new MatTableDataSource;
+ //dataSource: MatTableDataSource;
+
+
+ constructor(private dialog: MatDialog, private _ProductService: MastersService) {
+
+ // let newarray = this._ps.getProd().subscribe((dataresult: any[]) => { // good!
+ // for (let item of dataresult) {
+ // this.data.push(item);
+ // }
+ // return this.data;
+ // });
+
+ // this.Temp2 = this._ProductService.getProd();
+
+ // console.log("mattable", this.Temp2);
+
+
+ // Assign the data to the data source for the table to render
+ // this.dataSource = new MatTableDataSource(this.Temp2);
+
+
+ }
+
+ get ProductMasterList() {
+ return this._ProductService.getAllProduct();
+ }
+
+
+ // getTempArray() {
+ // this._ProductService.getProductMasterArrayData()
+ // .subscribe(_ProductArr => this.TempArray = _ProductArr);
+ // }
+
+ public getProdContactsByService(){
+ this._ProductService.getAllProduct().subscribe((data:any) => {
+ this.contacts = data;
+ // console.log(data);
+ let rec = Object.keys(this.contacts)[2];
+ // console.log(this.contacts[rec]);
+ this.Temp = this.contacts[rec];
+ console.log(this.Temp);
+ // for ( let key in this.contacts) {
+ // console.log('------------'+ key);
+ // console.log(this.contacts(key));
+ // }
+ });
+ }
+
+
+// public getpostContacts(){
+// this._ProductService.addProd({name: 'Non Residential Premises Loans',abbr: 'NRPL'})
+// .subscribe(hero => this.TempArray.push(hero));
+// }
+
+ // getProd(): void {
+ // this._ProductService.get2Prod()
+ // .subscribe(heroes => this.Temp = heroes);
+ // }
+
+ //displayedColumns: string[] = ['ID','ClassifiedName'];
+ //dataSource = this.ProductMasterList;
+
+
+ //displayedColumns = ['name', 'email', 'phone', 'company'];
+ //displayedColumns = ['name', 'email', 'phone', 'company'];
+ // displayedColumns = ['product_id','name','abbr','createdon','fk_createdby','updatedon', 'isactive', 'fk_updatedby','actions'];
+ // // -- @ViewChild(MatPaginator) paginator: MatPaginator;
+ // // -- @ViewChild(MatSort) sort: MatSort;
+ // // -- dataSource = new UserDataSource(this._ProductService);
+
+ // @ViewChild(MatPaginator) paginator: MatPaginator;
+ // @ViewChild(MatSort) sort: MatSort;
+ // //dataSource: DataTableDataSource;
+ // dataSource = new MatTableDataSource
+
+ //dataSource = new MatTableDataSource(this.Temp);
+
+ // ngOnInit() {
+ // this.getProdContactsByService();
+ // }
+
+ //displayedColumns: string[] = ['position','prodname','abbr','actions'];
+ //dataSource = new MatTableDataSource(ELEMENT_DATA1);
+ //dataSource = new MatTableDataSource(this.ProductMasterList);
+
+ // @ViewChild(MatPaginator) paginator: MatPaginator;
+ // @ViewChild(MatSort) sort: MatSort;
+
+ // applyFilter(filterValue: string) {
+ // filterValue = filterValue.trim(); // Remove whitespace
+ // filterValue = filterValue.toLowerCase(); // MatTableDataSource defaults to lowercase matches
+ // this.dataSource.filter = filterValue;
+ // }
+
+
+ // applyFilter(filterValue: string) {
+ // filterValue = filterValue.trim(); // Remove whitespace
+ // filterValue = filterValue.toLowerCase(); // Datasource defaults to lowercase matches
+ // this.dataSource.filter = filterValue;
+ // }
+ //ngOnInit() {
+
+ //this.dataSource = new DataTableDataSource(this.paginator, this.sort,this._ProductService);
+
+ // //this.getTempArray();
+ // //this.getProdContactsByService();
+ // //this.getProd();
+ // //this.getpostContacts();
+ // this.getProdContactsByService();
+ // this.getProdContactsByService();
+ // this.dataSource.paginator = this.paginator;
+ // this.dataSource.sort = this.sort;
+ // }
+
+
+ // ngOnInit(): void {
+
+ // this.http.get('data/data.json')
+ // .map(this.extractData)
+ // .subscribe(persons => {
+ // this.persons = persons;
+ // // Calling the DT trigger to manually render the table
+
+ // });
+ //}
+
+ // ngAfterViewInit() {
+ // this.dataSource.paginator = this.paginator;
+ // this.dataSource.sort = this.sort;
+ // }
+
+ // applyFilter(filterValue: string) {
+ // filterValue = filterValue.trim(); // Remove whitespace
+ // filterValue = filterValue.toLowerCase(); // Datasource defaults to lowercase matches
+ // this.dataSource.filter = filterValue;
+ // }
+
+ addProductMaster() {
+ this.isPopupOpened = true;
+ const dialogRef = this.dialog.open(ProductDialogComponent, {
+ data: {}
+ });
+
+ dialogRef.afterClosed().subscribe(result => {
+ this.isPopupOpened = false;
+ });
+ }
+
+ //to edit dialog
+ editProductMaster(arr: any[]) {
+ //alert(arr);
+ console.log(arr);
+ this.isPopupOpened = true;
+ //const contact = this._ProductService.getAllProductMaster().find(c => c.ID === id);
+ // let contact = this._ProductService.getProd().map(res=>res.filter(data =>data.product_id == id))[0];
+ // console.log(contact);
+
+ const dialogRef = this.dialog.open(ProductDialogComponent, {
+ data: arr
+ });
+
+ dialogRef.afterClosed().subscribe(result => {
+ this.isPopupOpened = false;
+ });
+ }
+
+ deleteProductMaster(id: number) {
+ console.log('Deleted ID in List Component',id)
+ //this._ProductService.deleteProductMaster(id);
+ this._ProductService.deleteMasterDetails(id,'PRODUCTS').subscribe();
+ //this._ProductService.deleteProductMaster(id);
+ }
+
+}
+
+ export interface ProductElement {
+ ProductName: string;
+ ID: number;
+ ProductAbbr: string;
+ }
+
+ const ELEMENT_DATA1: ProductElement[] = [
+ {ID: 1, ProductName: 'Home Loan',ProductAbbr: 'HL'},
+ {ID: 2, ProductName: 'Non Residential Premises Loans', ProductAbbr: 'NRPL'},
+ {ID: 3, ProductName: 'Loan Against Property', ProductAbbr: 'LAP'},
+ {ID: 4, ProductName: 'Business Loans', ProductAbbr: 'BL'},
+ {ID: 5, ProductName: 'Personal Loans', ProductAbbr: 'PL'},
+ {ID: 6, ProductName: 'Land Loan', ProductAbbr: 'LL'}
+ ];
+/*
+
+import { Component, OnInit, ViewChild } from '@angular/core';
+import { MatDialog, MatDialogRef, MatDialogConfig,MatPaginator, MatSort,MatTableDataSource } from '@angular/material';
+import { ProductService } from '../../service/product.service';
+import { ProductDialogComponent } from '../product-dialog/product-dialog.component';
+import { ProductMaster } from '../../model/product-master';
+import { DataSource } from '@angular/cdk/table';
+import { Observable } from 'rxjs';
+
+
+@Component({
+ selector: 'app-product-list',
+ templateUrl: './product-list.component.html',
+ styleUrls: ['./product-list.component.scss']
+})
+export class ProductListComponent implements OnInit {
+
+ isPopupOpened = true;
+
+ TempArray : any = [];
+ TempArray2 : any = [];
+ public contacts: Array