diff --git a/ng6-seed/src/app/layouts/admin/admin-layout.component.html b/ng6-seed/src/app/layouts/admin/admin-layout.component.html index e21724eaa..4f8d69a11 100644 --- a/ng6-seed/src/app/layouts/admin/admin-layout.component.html +++ b/ng6-seed/src/app/layouts/admin/admin-layout.component.html @@ -13,7 +13,7 @@
- +
{{fullName}}
diff --git a/ng6-seed/src/app/settings/masters/component/branch/branch-list/branch-list.component.html b/ng6-seed/src/app/settings/masters/component/branch/branch-list/branch-list.component.html index 41aef2ea3..d7fb9940b 100644 --- a/ng6-seed/src/app/settings/masters/component/branch/branch-list/branch-list.component.html +++ b/ng6-seed/src/app/settings/masters/component/branch/branch-list/branch-list.component.html @@ -17,7 +17,7 @@
- + @@ -70,7 +70,7 @@ - + diff --git a/ng6-seed/src/app/settings/masters/component/branch/branch-list/branch-list.component.ts b/ng6-seed/src/app/settings/masters/component/branch/branch-list/branch-list.component.ts index 6b84feb28..fe0195e1b 100644 --- a/ng6-seed/src/app/settings/masters/component/branch/branch-list/branch-list.component.ts +++ b/ng6-seed/src/app/settings/masters/component/branch/branch-list/branch-list.component.ts @@ -31,6 +31,9 @@ export class BranchListComponent implements OnInit { userdata2:any = []; color = 'primary'; + // pagination variable details + pageSize = 10; + // changed(id: number,isactive : number) { // console.log('Id',id); // console.log('Isactive',isactive) @@ -77,7 +80,7 @@ export class BranchListComponent implements OnInit { } }) } - + /**Popup for ADD Branch */ addBranch() { this.isPopupOpened = true; diff --git a/ng6-seed/src/app/settings/masters/component/city/city-list/city-list.component.html b/ng6-seed/src/app/settings/masters/component/city/city-list/city-list.component.html index 3d4975b76..c59e33199 100644 --- a/ng6-seed/src/app/settings/masters/component/city/city-list/city-list.component.html +++ b/ng6-seed/src/app/settings/masters/component/city/city-list/city-list.component.html @@ -161,10 +161,10 @@ - + - + diff --git a/ng6-seed/src/app/settings/masters/component/city/city-list/city-list.component.ts b/ng6-seed/src/app/settings/masters/component/city/city-list/city-list.component.ts index 89d6eede7..0a9c73892 100644 --- a/ng6-seed/src/app/settings/masters/component/city/city-list/city-list.component.ts +++ b/ng6-seed/src/app/settings/masters/component/city/city-list/city-list.component.ts @@ -29,6 +29,8 @@ export class CityListComponent implements OnInit { userData = null; color = 'primary'; +// pagination variable details +pageSize = 10; public dataLength: number; public dataSource = new MatTableDataSource(); diff --git a/ng6-seed/src/app/settings/masters/component/comments-on-locality/comments-on-locality-list/comments-on-locality-list.component.html b/ng6-seed/src/app/settings/masters/component/comments-on-locality/comments-on-locality-list/comments-on-locality-list.component.html index 2b024c19c..12e107a52 100644 --- a/ng6-seed/src/app/settings/masters/component/comments-on-locality/comments-on-locality-list/comments-on-locality-list.component.html +++ b/ng6-seed/src/app/settings/masters/component/comments-on-locality/comments-on-locality-list/comments-on-locality-list.component.html @@ -140,7 +140,7 @@ - + diff --git a/ng6-seed/src/app/settings/masters/component/comments-on-locality/comments-on-locality-list/comments-on-locality-list.component.ts b/ng6-seed/src/app/settings/masters/component/comments-on-locality/comments-on-locality-list/comments-on-locality-list.component.ts index f54fef2d4..df441e9c8 100644 --- a/ng6-seed/src/app/settings/masters/component/comments-on-locality/comments-on-locality-list/comments-on-locality-list.component.ts +++ b/ng6-seed/src/app/settings/masters/component/comments-on-locality/comments-on-locality-list/comments-on-locality-list.component.ts @@ -30,6 +30,8 @@ export class CommentsOnLocalityListComponent implements OnInit { CommentsOnLocalityList: any = []; userData = null; color = 'primary'; + // pagination variable details + pageSize = 10; public dataLength: number; public dataSource = new MatTableDataSource(); diff --git a/ng6-seed/src/app/settings/masters/component/company/company-list/company-list.component.html b/ng6-seed/src/app/settings/masters/component/company/company-list/company-list.component.html index b49443cc7..6ecc37adb 100644 --- a/ng6-seed/src/app/settings/masters/component/company/company-list/company-list.component.html +++ b/ng6-seed/src/app/settings/masters/component/company/company-list/company-list.component.html @@ -137,7 +137,7 @@ - + diff --git a/ng6-seed/src/app/settings/masters/component/company/company-list/company-list.component.ts b/ng6-seed/src/app/settings/masters/component/company/company-list/company-list.component.ts index 53da0e3c8..894daa16b 100644 --- a/ng6-seed/src/app/settings/masters/component/company/company-list/company-list.component.ts +++ b/ng6-seed/src/app/settings/masters/component/company/company-list/company-list.component.ts @@ -38,7 +38,9 @@ export class CompanyListComponent implements OnInit { CompanyList: any = []; userData = null; color = 'primary'; - + // pagination variable details + pageSize = 10; + public dataLength: number; public dataSource = new MatTableDataSource(); displayedColumns = ['serialno', 'name', 'city_name', 'state_name' , 'actions']; diff --git a/ng6-seed/src/app/settings/masters/component/customer-behaviour/customer-behaviour-list/customer-behaviour-list.component.html b/ng6-seed/src/app/settings/masters/component/customer-behaviour/customer-behaviour-list/customer-behaviour-list.component.html index 136c52c61..de991df88 100644 --- a/ng6-seed/src/app/settings/masters/component/customer-behaviour/customer-behaviour-list/customer-behaviour-list.component.html +++ b/ng6-seed/src/app/settings/masters/component/customer-behaviour/customer-behaviour-list/customer-behaviour-list.component.html @@ -140,7 +140,7 @@ - + diff --git a/ng6-seed/src/app/settings/masters/component/customer-behaviour/customer-behaviour-list/customer-behaviour-list.component.ts b/ng6-seed/src/app/settings/masters/component/customer-behaviour/customer-behaviour-list/customer-behaviour-list.component.ts index 62bf47008..7aa955569 100644 --- a/ng6-seed/src/app/settings/masters/component/customer-behaviour/customer-behaviour-list/customer-behaviour-list.component.ts +++ b/ng6-seed/src/app/settings/masters/component/customer-behaviour/customer-behaviour-list/customer-behaviour-list.component.ts @@ -30,6 +30,8 @@ export class CustomerBehaviourListComponent implements OnInit { noRecordFound: boolean = false; userData = null; color = 'primary'; +// pagination variable details +pageSize = 10; public dataLength: number; public dataSource = new MatTableDataSource(); diff --git a/ng6-seed/src/app/settings/masters/component/customer-segment/customer-segment-list/customer-segment-list.component.html b/ng6-seed/src/app/settings/masters/component/customer-segment/customer-segment-list/customer-segment-list.component.html index 00a5fbb45..6d7d5d5ea 100644 --- a/ng6-seed/src/app/settings/masters/component/customer-segment/customer-segment-list/customer-segment-list.component.html +++ b/ng6-seed/src/app/settings/masters/component/customer-segment/customer-segment-list/customer-segment-list.component.html @@ -137,7 +137,7 @@ - + diff --git a/ng6-seed/src/app/settings/masters/component/customer-segment/customer-segment-list/customer-segment-list.component.ts b/ng6-seed/src/app/settings/masters/component/customer-segment/customer-segment-list/customer-segment-list.component.ts index 93a822eaa..af7d91e8c 100644 --- a/ng6-seed/src/app/settings/masters/component/customer-segment/customer-segment-list/customer-segment-list.component.ts +++ b/ng6-seed/src/app/settings/masters/component/customer-segment/customer-segment-list/customer-segment-list.component.ts @@ -28,6 +28,9 @@ export class CustomerSegmentListComponent implements OnInit { CustomerSegmentList: any = []; noRecordFound: boolean = false; color = 'primary'; + // pagination variable details + pageSize = 10; + // displayedColumns = ['customer_segment_id', 'abbr', 'name', 'isactive','actions']; userData = null; diff --git a/ng6-seed/src/app/settings/masters/component/designation/designation-list/designation-list.component.html b/ng6-seed/src/app/settings/masters/component/designation/designation-list/designation-list.component.html index ff86fe450..eaf71e234 100644 --- a/ng6-seed/src/app/settings/masters/component/designation/designation-list/designation-list.component.html +++ b/ng6-seed/src/app/settings/masters/component/designation/designation-list/designation-list.component.html @@ -136,7 +136,7 @@ - + diff --git a/ng6-seed/src/app/settings/masters/component/designation/designation-list/designation-list.component.ts b/ng6-seed/src/app/settings/masters/component/designation/designation-list/designation-list.component.ts index 0b8ec7447..e9d8a0194 100644 --- a/ng6-seed/src/app/settings/masters/component/designation/designation-list/designation-list.component.ts +++ b/ng6-seed/src/app/settings/masters/component/designation/designation-list/designation-list.component.ts @@ -29,6 +29,8 @@ export class DesignationListComponent implements OnInit { noRecordFound: boolean = false; DesignationList: any = []; color = 'primary'; +// pagination variable details +pageSize = 10; userData = null; diff --git a/ng6-seed/src/app/settings/masters/component/frequency/frequency-list/frequency-list.component.html b/ng6-seed/src/app/settings/masters/component/frequency/frequency-list/frequency-list.component.html index 2fae291cd..0b5e5d7ef 100644 --- a/ng6-seed/src/app/settings/masters/component/frequency/frequency-list/frequency-list.component.html +++ b/ng6-seed/src/app/settings/masters/component/frequency/frequency-list/frequency-list.component.html @@ -143,7 +143,7 @@ - + diff --git a/ng6-seed/src/app/settings/masters/component/frequency/frequency-list/frequency-list.component.ts b/ng6-seed/src/app/settings/masters/component/frequency/frequency-list/frequency-list.component.ts index 6b09aad45..13ec1b4d0 100644 --- a/ng6-seed/src/app/settings/masters/component/frequency/frequency-list/frequency-list.component.ts +++ b/ng6-seed/src/app/settings/masters/component/frequency/frequency-list/frequency-list.component.ts @@ -30,7 +30,9 @@ export class FrequencyListComponent implements OnInit { FrequencyList: any = []; noRecordFound: boolean = false; color = 'primary'; - + // pagination variable details + pageSize = 10; + userData = null; public dataLength: number; diff --git a/ng6-seed/src/app/settings/masters/component/industry_classification/industry_classification-list/industry_classification-list.component.html b/ng6-seed/src/app/settings/masters/component/industry_classification/industry_classification-list/industry_classification-list.component.html index 13476f697..9e1baa7b0 100644 --- a/ng6-seed/src/app/settings/masters/component/industry_classification/industry_classification-list/industry_classification-list.component.html +++ b/ng6-seed/src/app/settings/masters/component/industry_classification/industry_classification-list/industry_classification-list.component.html @@ -73,7 +73,7 @@ - + diff --git a/ng6-seed/src/app/settings/masters/component/lender-hierarchy/lender-hierarchy-list/lender-hierarchy-list.component.ts b/ng6-seed/src/app/settings/masters/component/lender-hierarchy/lender-hierarchy-list/lender-hierarchy-list.component.ts index ae18cadae..9d87e5dfe 100644 --- a/ng6-seed/src/app/settings/masters/component/lender-hierarchy/lender-hierarchy-list/lender-hierarchy-list.component.ts +++ b/ng6-seed/src/app/settings/masters/component/lender-hierarchy/lender-hierarchy-list/lender-hierarchy-list.component.ts @@ -32,6 +32,9 @@ export class LenderHierarchyListComponent implements OnInit { loader: boolean = false; LenderHierarchyList: any = []; color = 'primary'; + // pagination variable details + pageSize = 10; + //displayedColumns = ['lender_hierarchy_id', 'lender_hierarchy','isactive','actions']; userData = null; diff --git a/ng6-seed/src/app/settings/masters/component/members-occupation/members-occupation-list/members-occupation-list.component.html b/ng6-seed/src/app/settings/masters/component/members-occupation/members-occupation-list/members-occupation-list.component.html index cb51c0c42..743410f48 100644 --- a/ng6-seed/src/app/settings/masters/component/members-occupation/members-occupation-list/members-occupation-list.component.html +++ b/ng6-seed/src/app/settings/masters/component/members-occupation/members-occupation-list/members-occupation-list.component.html @@ -151,7 +151,7 @@ - + diff --git a/ng6-seed/src/app/settings/masters/component/members-occupation/members-occupation-list/members-occupation-list.component.ts b/ng6-seed/src/app/settings/masters/component/members-occupation/members-occupation-list/members-occupation-list.component.ts index ae9e016d6..c5c6666e1 100644 --- a/ng6-seed/src/app/settings/masters/component/members-occupation/members-occupation-list/members-occupation-list.component.ts +++ b/ng6-seed/src/app/settings/masters/component/members-occupation/members-occupation-list/members-occupation-list.component.ts @@ -31,6 +31,9 @@ export class MembersOccupationListComponent implements OnInit { loader: boolean = false; MemberOccupationList: any = []; color = 'primary'; + // pagination variable details + pageSize = 10; + userData = null; noRecordFound: boolean = false; diff --git a/ng6-seed/src/app/settings/masters/component/pd-allocation-type/pd-allocation-type-list.component.html b/ng6-seed/src/app/settings/masters/component/pd-allocation-type/pd-allocation-type-list.component.html index 7a97c0acc..702f0cc0a 100644 --- a/ng6-seed/src/app/settings/masters/component/pd-allocation-type/pd-allocation-type-list.component.html +++ b/ng6-seed/src/app/settings/masters/component/pd-allocation-type/pd-allocation-type-list.component.html @@ -80,7 +80,7 @@ - + diff --git a/ng6-seed/src/app/settings/masters/component/pd-allocation-type/pd-allocation-type-list.component.ts b/ng6-seed/src/app/settings/masters/component/pd-allocation-type/pd-allocation-type-list.component.ts index 629b200a8..8dbb8a3fe 100644 --- a/ng6-seed/src/app/settings/masters/component/pd-allocation-type/pd-allocation-type-list.component.ts +++ b/ng6-seed/src/app/settings/masters/component/pd-allocation-type/pd-allocation-type-list.component.ts @@ -29,6 +29,9 @@ export class PdAllocationTypeListComponent implements OnInit { noRecordFound: boolean = false; dataSourceRecords = null; color = 'primary'; + // pagination variable details + pageSize = 10; + private notifier: NotifierService; public dataLength: number; diff --git a/ng6-seed/src/app/settings/masters/component/pd-location-approach/pd-location-approach-list/pd-location-approach-list.component.html b/ng6-seed/src/app/settings/masters/component/pd-location-approach/pd-location-approach-list/pd-location-approach-list.component.html index dde60b4af..122e67d21 100644 --- a/ng6-seed/src/app/settings/masters/component/pd-location-approach/pd-location-approach-list/pd-location-approach-list.component.html +++ b/ng6-seed/src/app/settings/masters/component/pd-location-approach/pd-location-approach-list/pd-location-approach-list.component.html @@ -130,7 +130,7 @@ - + diff --git a/ng6-seed/src/app/settings/masters/component/pd-location-approach/pd-location-approach-list/pd-location-approach-list.component.ts b/ng6-seed/src/app/settings/masters/component/pd-location-approach/pd-location-approach-list/pd-location-approach-list.component.ts index c042bdbf0..ceab4afa1 100644 --- a/ng6-seed/src/app/settings/masters/component/pd-location-approach/pd-location-approach-list/pd-location-approach-list.component.ts +++ b/ng6-seed/src/app/settings/masters/component/pd-location-approach/pd-location-approach-list/pd-location-approach-list.component.ts @@ -37,6 +37,9 @@ export class PdLocationApproachListComponent implements OnInit { loader: boolean = false; PdLocationApproachList: any = []; color = 'primary'; + // pagination variable details + pageSize = 10; + userData = null; noRecordFound: boolean = false; public dataLength: number; diff --git a/ng6-seed/src/app/settings/masters/component/pd-type/pd-type-list/pd-type-list.component.html b/ng6-seed/src/app/settings/masters/component/pd-type/pd-type-list/pd-type-list.component.html index 86299fe02..190dc380f 100644 --- a/ng6-seed/src/app/settings/masters/component/pd-type/pd-type-list/pd-type-list.component.html +++ b/ng6-seed/src/app/settings/masters/component/pd-type/pd-type-list/pd-type-list.component.html @@ -130,7 +130,7 @@ - + diff --git a/ng6-seed/src/app/settings/masters/component/pd-type/pd-type-list/pd-type-list.component.ts b/ng6-seed/src/app/settings/masters/component/pd-type/pd-type-list/pd-type-list.component.ts index daf92efde..99306684c 100644 --- a/ng6-seed/src/app/settings/masters/component/pd-type/pd-type-list/pd-type-list.component.ts +++ b/ng6-seed/src/app/settings/masters/component/pd-type/pd-type-list/pd-type-list.component.ts @@ -30,6 +30,9 @@ export class PdTypeListComponent implements OnInit { PDTypeList: any = []; noRecordFound: boolean = false; color = 'primary'; + // pagination variable details + pageSize = 10; + userData = null; public dataLength: number; diff --git a/ng6-seed/src/app/settings/masters/component/product/product-list/product-list.component.html b/ng6-seed/src/app/settings/masters/component/product/product-list/product-list.component.html index 0ae762158..60b3bc04b 100644 --- a/ng6-seed/src/app/settings/masters/component/product/product-list/product-list.component.html +++ b/ng6-seed/src/app/settings/masters/component/product/product-list/product-list.component.html @@ -21,9 +21,9 @@ -
- - + +
+
@@ -82,7 +82,7 @@ - + diff --git a/ng6-seed/src/app/settings/masters/component/product/product-list/product-list.component.ts b/ng6-seed/src/app/settings/masters/component/product/product-list/product-list.component.ts index 44a27719a..a21203975 100644 --- a/ng6-seed/src/app/settings/masters/component/product/product-list/product-list.component.ts +++ b/ng6-seed/src/app/settings/masters/component/product/product-list/product-list.component.ts @@ -31,6 +31,8 @@ export class ProductListComponent implements OnInit { noRecordFound: boolean = false; userData = null; color = 'primary'; + // pagination variable details + pageSize = 10; public dataLength: number; public dataSource = new MatTableDataSource(); diff --git a/ng6-seed/src/app/settings/masters/component/question-category/question-category-list/question-category-list.component.html b/ng6-seed/src/app/settings/masters/component/question-category/question-category-list/question-category-list.component.html index c0fbd3c21..45ac1b8a5 100644 --- a/ng6-seed/src/app/settings/masters/component/question-category/question-category-list/question-category-list.component.html +++ b/ng6-seed/src/app/settings/masters/component/question-category/question-category-list/question-category-list.component.html @@ -74,7 +74,7 @@ - + diff --git a/ng6-seed/src/app/settings/masters/component/question-category/question-category-list/question-category-list.component.ts b/ng6-seed/src/app/settings/masters/component/question-category/question-category-list/question-category-list.component.ts index 67e68cf90..105002311 100644 --- a/ng6-seed/src/app/settings/masters/component/question-category/question-category-list/question-category-list.component.ts +++ b/ng6-seed/src/app/settings/masters/component/question-category/question-category-list/question-category-list.component.ts @@ -29,6 +29,8 @@ export class QuestionCategoryListComponent implements OnInit { noRecordFound: boolean = false; userData = null; color = 'primary'; + // pagination variable details + pageSize = 10; public dataLength: number; public dataSource = new MatTableDataSource(); diff --git a/ng6-seed/src/app/settings/masters/component/regions/regions-list/regions-list.component.html b/ng6-seed/src/app/settings/masters/component/regions/regions-list/regions-list.component.html index cd7239a84..7139f4fd2 100644 --- a/ng6-seed/src/app/settings/masters/component/regions/regions-list/regions-list.component.html +++ b/ng6-seed/src/app/settings/masters/component/regions/regions-list/regions-list.component.html @@ -11,7 +11,7 @@ - + @@ -58,6 +58,7 @@ - + + \ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/component/regions/regions-list/regions-list.component.ts b/ng6-seed/src/app/settings/masters/component/regions/regions-list/regions-list.component.ts index 8c8b04848..96484306a 100644 --- a/ng6-seed/src/app/settings/masters/component/regions/regions-list/regions-list.component.ts +++ b/ng6-seed/src/app/settings/masters/component/regions/regions-list/regions-list.component.ts @@ -32,6 +32,8 @@ export class RegionsListComponent implements OnInit { noRecordFound: boolean = false; color = 'primary'; userData = null; + // pagination variable details + pageSize = 10; public dataLength: number; public dataSource = new MatTableDataSource(); diff --git a/ng6-seed/src/app/settings/masters/component/relation-ship/relation-ship-list/relation-ship-list.component.html b/ng6-seed/src/app/settings/masters/component/relation-ship/relation-ship-list/relation-ship-list.component.html index 74b2b10e0..bfa0b81b6 100644 --- a/ng6-seed/src/app/settings/masters/component/relation-ship/relation-ship-list/relation-ship-list.component.html +++ b/ng6-seed/src/app/settings/masters/component/relation-ship/relation-ship-list/relation-ship-list.component.html @@ -153,7 +153,7 @@ - + diff --git a/ng6-seed/src/app/settings/masters/component/relation-ship/relation-ship-list/relation-ship-list.component.ts b/ng6-seed/src/app/settings/masters/component/relation-ship/relation-ship-list/relation-ship-list.component.ts index ae8f7d6ab..d3d37ad33 100644 --- a/ng6-seed/src/app/settings/masters/component/relation-ship/relation-ship-list/relation-ship-list.component.ts +++ b/ng6-seed/src/app/settings/masters/component/relation-ship/relation-ship-list/relation-ship-list.component.ts @@ -29,6 +29,9 @@ export class RelationShipListComponent implements OnInit { RelationShipList: any = []; noRecordFound: boolean = false; color = 'primary'; + // pagination variable details + pageSize = 10; + //displayedColumns = ['relationship_id','name','createdon','fk_createdby','updatedon','isactive','fk_updatedby','actions']; //relationship_id, name, createdon, fk_createdby, updatedon, fk_updatedby, isactive diff --git a/ng6-seed/src/app/settings/masters/component/states/states-list/states-list.component.html b/ng6-seed/src/app/settings/masters/component/states/states-list/states-list.component.html index c252f5ba4..2ea2da2ee 100644 --- a/ng6-seed/src/app/settings/masters/component/states/states-list/states-list.component.html +++ b/ng6-seed/src/app/settings/masters/component/states/states-list/states-list.component.html @@ -176,7 +176,7 @@ - + diff --git a/ng6-seed/src/app/settings/masters/component/states/states-list/states-list.component.ts b/ng6-seed/src/app/settings/masters/component/states/states-list/states-list.component.ts index d6cea1399..3fe180cd1 100644 --- a/ng6-seed/src/app/settings/masters/component/states/states-list/states-list.component.ts +++ b/ng6-seed/src/app/settings/masters/component/states/states-list/states-list.component.ts @@ -29,6 +29,9 @@ export class StatesListComponent implements OnInit { loader: boolean = false; StateList: any = []; color = 'primary'; + // pagination variable details + pageSize = 10; + noRecordFound: boolean = false; //displayedColumns = ['states_id', 'fk_city_id', 'name', 'createdon', 'fk_createdby', 'updatedon', 'fk_updatedby', 'isactive','actions']; diff --git a/ng6-seed/src/app/settings/masters/component/sub-product/sub-product-list/sub-product-list.component.html b/ng6-seed/src/app/settings/masters/component/sub-product/sub-product-list/sub-product-list.component.html index e8a483667..031422274 100644 --- a/ng6-seed/src/app/settings/masters/component/sub-product/sub-product-list/sub-product-list.component.html +++ b/ng6-seed/src/app/settings/masters/component/sub-product/sub-product-list/sub-product-list.component.html @@ -104,9 +104,9 @@ -
- - + +
+
@@ -165,7 +165,7 @@ - + diff --git a/ng6-seed/src/app/settings/masters/component/sub-product/sub-product-list/sub-product-list.component.ts b/ng6-seed/src/app/settings/masters/component/sub-product/sub-product-list/sub-product-list.component.ts index 2f28e4056..ee31d5e89 100644 --- a/ng6-seed/src/app/settings/masters/component/sub-product/sub-product-list/sub-product-list.component.ts +++ b/ng6-seed/src/app/settings/masters/component/sub-product/sub-product-list/sub-product-list.component.ts @@ -33,6 +33,8 @@ export class SubProductListComponent implements OnInit { userData = null; noRecordFound: boolean = false; + // pagination variable details + pageSize = 10; public dataLength: number; public dataSource = new MatTableDataSource(); diff --git a/ng6-seed/src/app/settings/masters/component/title/title-list/title-list.component.html b/ng6-seed/src/app/settings/masters/component/title/title-list/title-list.component.html index b40fde58c..925b5c249 100644 --- a/ng6-seed/src/app/settings/masters/component/title/title-list/title-list.component.html +++ b/ng6-seed/src/app/settings/masters/component/title/title-list/title-list.component.html @@ -149,7 +149,7 @@ - + diff --git a/ng6-seed/src/app/settings/masters/component/title/title-list/title-list.component.ts b/ng6-seed/src/app/settings/masters/component/title/title-list/title-list.component.ts index 9ccc07c45..473db1820 100644 --- a/ng6-seed/src/app/settings/masters/component/title/title-list/title-list.component.ts +++ b/ng6-seed/src/app/settings/masters/component/title/title-list/title-list.component.ts @@ -26,7 +26,10 @@ export class TitleListComponent implements OnInit { loader: boolean = false; TitleList: any = []; noRecordFound: boolean = false; - color = 'primary'; + color = 'primary'; + // pagination variable details + pageSize = 10; + //displayedColumns = ['title_id','name','createdon','fk_createdby','updatedon','isactive','fk_updatedby','actions']; //title_id, name, createdon, fk_createdby, updatedon, fk_updatedby, isactive diff --git a/ng6-seed/src/app/settings/masters/component/type-of-activity/activity-list/activity-list.component.html b/ng6-seed/src/app/settings/masters/component/type-of-activity/activity-list/activity-list.component.html index ac386e22a..11659f5a2 100644 --- a/ng6-seed/src/app/settings/masters/component/type-of-activity/activity-list/activity-list.component.html +++ b/ng6-seed/src/app/settings/masters/component/type-of-activity/activity-list/activity-list.component.html @@ -143,7 +143,7 @@ - + diff --git a/ng6-seed/src/app/settings/masters/component/type-of-activity/activity-list/activity-list.component.ts b/ng6-seed/src/app/settings/masters/component/type-of-activity/activity-list/activity-list.component.ts index 43d90a2ef..7b3c2120f 100644 --- a/ng6-seed/src/app/settings/masters/component/type-of-activity/activity-list/activity-list.component.ts +++ b/ng6-seed/src/app/settings/masters/component/type-of-activity/activity-list/activity-list.component.ts @@ -33,6 +33,9 @@ export class ActivityListComponent implements OnInit { userData = null; noRecordFound: boolean = false; color = 'primary'; + // pagination variable details + pageSize = 10; + public dataLength: number; public dataSource = new MatTableDataSource(); displayedColumns = ['serialno','name','actions', 'isactive']; diff --git a/ng6-seed/src/app/settings/masters/component/uom/uom-list/uom-list.component.html b/ng6-seed/src/app/settings/masters/component/uom/uom-list/uom-list.component.html index 7846b4bba..738cca2ff 100644 --- a/ng6-seed/src/app/settings/masters/component/uom/uom-list/uom-list.component.html +++ b/ng6-seed/src/app/settings/masters/component/uom/uom-list/uom-list.component.html @@ -70,7 +70,7 @@ - + diff --git a/ng6-seed/src/app/settings/masters/component/uom/uom-list/uom-list.component.ts b/ng6-seed/src/app/settings/masters/component/uom/uom-list/uom-list.component.ts index e581db38e..5a93a0dce 100644 --- a/ng6-seed/src/app/settings/masters/component/uom/uom-list/uom-list.component.ts +++ b/ng6-seed/src/app/settings/masters/component/uom/uom-list/uom-list.component.ts @@ -33,6 +33,9 @@ export class UomListComponent implements OnInit { loader: boolean = false; UOMList: any = []; color = 'primary'; + // pagination variable details + pageSize = 10; + //displayedColumns = ['uom_id','name','createdon','fk_createdby','updatedon','isactive','fk_updatedby','actions']; //uom_id, name, createdon, fk_createdby, updatedon, fk_updatedby, isactive diff --git a/ng6-seed/src/app/settings/masters/masters.component.html b/ng6-seed/src/app/settings/masters/masters.component.html index d4432748c..d8d42e07b 100644 --- a/ng6-seed/src/app/settings/masters/masters.component.html +++ b/ng6-seed/src/app/settings/masters/masters.component.html @@ -89,12 +89,12 @@
-
- - -
+
+ +
--> \ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/masters.component.ts b/ng6-seed/src/app/settings/masters/masters.component.ts index 56bb61e53..34529d22d 100644 --- a/ng6-seed/src/app/settings/masters/masters.component.ts +++ b/ng6-seed/src/app/settings/masters/masters.component.ts @@ -125,7 +125,7 @@ export class MastersComponent implements OnInit { {id: 'master-23',name: 'PD Allocation Type'}, {id: 'master-24',name: 'PD Notification'}, // {id: 'master-25',name: 'PD Office Lender'}, - {id: 'master-25',name: 'PD Team'}, + // {id: 'master-25',name: 'PD Team'}, ]; diff --git a/ng6-seed/src/app/settings/pd-team/pd-team-add/pd-team-add.component.html b/ng6-seed/src/app/settings/pd-team/pd-team-add/pd-team-add.component.html index be23374a8..f34cb0948 100644 --- a/ng6-seed/src/app/settings/pd-team/pd-team-add/pd-team-add.component.html +++ b/ng6-seed/src/app/settings/pd-team/pd-team-add/pd-team-add.component.html @@ -28,7 +28,7 @@
- {{ cd.name }} + {{ cd.name }} You must Select Cities. @@ -47,7 +47,7 @@
- {{ pd.name }} + {{ pd.name }} You must Select Product. @@ -64,7 +64,7 @@ - {{csd.name}} + {{csd.name}} You must Select Customer Segment. diff --git a/ng6-seed/src/app/settings/pd-team/pd-team-add/pd-team-add.component.ts b/ng6-seed/src/app/settings/pd-team/pd-team-add/pd-team-add.component.ts index 74b53b844..e4d53370e 100644 --- a/ng6-seed/src/app/settings/pd-team/pd-team-add/pd-team-add.component.ts +++ b/ng6-seed/src/app/settings/pd-team/pd-team-add/pd-team-add.component.ts @@ -10,8 +10,9 @@ import { FormBuilder, import { MastersService } from '../../service/masters/masters.service'; import { PdTeamService } from '../../service/masters/pd-team.service'; import { NotifierService } from 'angular-notifier'; -import { PdTeamDialogComponent } from '../pd-team-dialog/pd-team-dialog.component'; + import { Router } from '@angular/router'; +import { empty } from 'rxjs'; @Component({ selector: 'app-pd-team-add', @@ -21,6 +22,7 @@ import { Router } from '@angular/router'; export class PdTeamAddComponent implements OnInit { public _pdTeamForm: FormGroup; +private notifier: NotifierService; public submitted = false; color = 'primary'; errorMessage:string; @@ -32,7 +34,7 @@ productdatas: any[]; customerSegmentdatas: any[]; //This Type Of Array Declaration -pdTeamCityArray: Array<{teamid: number, cityid: number}> = []; +pdTeamCityArray:any= []; pdTeamProductArray: Array<{teamid: number, productid: number}> = []; pdTeamCustomerSegmentArray: Array<{teamid: number, customerid: number}> = []; @@ -47,13 +49,24 @@ constructor(private _formBuilder: FormBuilder, private _router: Router, private _masterService: MastersService) { - this._notifier = _notifier; + this.notifier = _notifier; } ngOnInit() { this.PdTeamFormDatas(); +/** For Checking City Validation datas - checking purpose - Already exists are not */ +this._pdTeamService.getAllPdTeamCityMapping() + .subscribe( + dataresult => { + if(dataresult.dataStatus == true){ + //this.AllPDTeamMapData = dataresult.records; + this.pdTeamCityArray = dataresult.records; + + } +}); +// console.log('All Datas for Validation purpose',this.pdTeamCityArray); /** To Display The City Data For City DropDown */ this._masterService.getAllMasterData('CITY').subscribe( dataresult => { @@ -117,69 +130,87 @@ onNoClick(): void { /** To Save/Edited Popup Data */ onSubmit() { this.submitted = true; + var pdTeamFormValues = this._pdTeamForm.value; + Object.keys(pdTeamFormValues).forEach( + (key) => ( pdTeamFormValues[key] == null) && delete pdTeamFormValues[key]); // stop here if form is invalid - if (this._pdTeamForm.invalid) { - // this.errorMessage = "Please Fill All Mandate Fields."; - // return; - alert('Please Fill All Mandate Fields.'); - } else { + // if (pdTeamFormValues.invalid) { + // // this.errorMessage = "Please Fill All Mandate Fields."; + // // return; + // alert('Please Fill All Mandate Fields.'); + // } else { + - var pdTeamFormValues = this._pdTeamForm.value; //To Remove The "Null" With Key also - Object.keys(pdTeamFormValues).forEach( - (key) => ( pdTeamFormValues[key] == null) && delete pdTeamFormValues[key]); - + this._pdTeamService.addPdTeamDetail(this._pdTeamForm.value).subscribe( dataresult => { if (dataresult.status == 200) { - console.log(dataresult); - this._notifier.notify('success', 'Record Edited Successfully.!'); -// alert('Record Successfully.!'); + + this.notifier.notify('success', 'Record Edited Successfully.!'); + alert('Success.!'); this._router.navigate(['/setting/pdteam/pdteamlist']); this._pdTeamForm.reset(); } else { - this._notifier.notify('warning', 'Something Wents Wrong Try Again.!'); + this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); + alert('Wrong.!'); //alert('Some Thing Wents Wrong Try Again !'); //this.errorMessage = "Some Thing Wents Wrong Try Again !"; } - }, error => { - this._notifier.notify('warning', 'Something Wents Wrong Try Again.!'); - // this.errorMessage = "Something Wents Wrong Try Again !"; - //alert('Some Thing Wents Wrong Try Again !'); }); - } + } -/** To Reset Popup Data For Add*/ - -onResetForAdd(){ -alert("reset function"); -} - /**on change function for customer segment to dispaly the as List in html page */ onChangeCustomerSegmentDatas($event){ - let CustomerSegmentName = $event.source.value.name; + //let CustomerSegmentName = $event.source.value.name; + let CustomerSegmentName = this.customerSegmentdatas.filter(cs=>cs.customer_segment_id == $event.source.value)[0]; + if($event.source._selected === true ){ - this.selectedSegmentDatas.push(CustomerSegmentName); + this.selectedSegmentDatas.push(CustomerSegmentName.name); } else if($event.source._selected === false ){ - let index = this.selectedSegmentDatas.indexOf(CustomerSegmentName); + let index = this.selectedSegmentDatas.indexOf(CustomerSegmentName.name); this.selectedSegmentDatas.splice(index,1); } } /**on change function for City to display the as List in html page */ onChangeCityDatas($event){ + var mycheck = 0 ; + //let cityName = $event.source.value; + let cityName = this.citydatas.filter(city=>city.city_id == $event.source.value)[0]; - let cityName = $event.source.value.name; if($event.source._selected === true ){ - this.selectedCityDatas.push(cityName); + + for(let Duplication_City of this.pdTeamCityArray){ + + let teamname = Duplication_City.team_name; + let dup_cityname = Duplication_City.CITYMAP.filter(city=>city.city_id == $event.source.value); + + if(dup_cityname != ''){ + for(let data of dup_cityname){ + + if(data.name == cityName.name){ + alert('"'+data.name+'" Already Existing with "'+ teamname +'"'); + $event.source._selected = false; + mycheck++; + } + + } + } + } + + if(mycheck == 0){ + this.selectedCityDatas.push(cityName.name); + } + } else if($event.source._selected === false ){ - let index = this.selectedCityDatas.indexOf(cityName); + let index = this.selectedCityDatas.indexOf(cityName.name); this.selectedCityDatas.splice(index,1); } @@ -188,12 +219,14 @@ onChangeCityDatas($event){ /**on change function for Product to display the data as List in html page */ onChangeProductDatas($event){ - let productName = $event.source.value.name; + //let productName = $event.source.value.name; + let productName = this.productdatas.filter(product=>product.product_id == $event.source.value )[0]; + if($event.source._selected === true ){ - this.selectedProductDatas.push(productName); + this.selectedProductDatas.push(productName.name); } else if($event.source._selected === false ){ - let index = this.selectedProductDatas.indexOf(productName); + let index = this.selectedProductDatas.indexOf(productName.name); this.selectedProductDatas.splice(index,1); } diff --git a/ng6-seed/src/app/settings/pd-team/pd-team-dialog/pd-team-dialog.component.html b/ng6-seed/src/app/settings/pd-team/pd-team-dialog/pd-team-dialog.component.html deleted file mode 100644 index b1a63ac70..000000000 --- a/ng6-seed/src/app/settings/pd-team/pd-team-dialog/pd-team-dialog.component.html +++ /dev/null @@ -1,86 +0,0 @@ -
-

PD Team Details                                 

-
- -
-
- -
- -
- - -
- - - You must include a team name. - -
- -
- - - {{ ld.short_name }} {{ ld.full_name }} - - You must Pick up Lender Name. - -
- -
- - - {{ cd.name }} - - You must Pick Up the City Name. - -
- - - - - - - - - - - - - - - - - - - - - - - - - -
S.noLender NameCity NameAction
{{i+1}}{{PD.lender_name }}{{PD.city_name }} - -
{{i+PDTeamMaplen+1}}{{PM.lenderid.full_name}}{{PM.cityid.name}} - -
- -

- -
- - - - - - - -
- -
-
-
- \ No newline at end of file diff --git a/ng6-seed/src/app/settings/pd-team/pd-team-dialog/pd-team-dialog.component.scss b/ng6-seed/src/app/settings/pd-team/pd-team-dialog/pd-team-dialog.component.scss deleted file mode 100644 index 3e80f0dbb..000000000 --- a/ng6-seed/src/app/settings/pd-team/pd-team-dialog/pd-team-dialog.component.scss +++ /dev/null @@ -1,3 +0,0 @@ -mat-form-field{ - width:100%; -} \ No newline at end of file diff --git a/ng6-seed/src/app/settings/pd-team/pd-team-dialog/pd-team-dialog.component.spec.ts b/ng6-seed/src/app/settings/pd-team/pd-team-dialog/pd-team-dialog.component.spec.ts deleted file mode 100644 index c23f17f93..000000000 --- a/ng6-seed/src/app/settings/pd-team/pd-team-dialog/pd-team-dialog.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { PdTeamDialogComponent } from './pd-team-dialog.component'; - -describe('PdTeamDialogComponent', () => { - let component: PdTeamDialogComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ PdTeamDialogComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(PdTeamDialogComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/ng6-seed/src/app/settings/pd-team/pd-team-dialog/pd-team-dialog.component.ts b/ng6-seed/src/app/settings/pd-team/pd-team-dialog/pd-team-dialog.component.ts deleted file mode 100644 index 6a01db192..000000000 --- a/ng6-seed/src/app/settings/pd-team/pd-team-dialog/pd-team-dialog.component.ts +++ /dev/null @@ -1,537 +0,0 @@ -import { Component, - OnInit, - Inject } from '@angular/core'; -import { FormBuilder, - FormGroup, - Validators, - FormControl } from '@angular/forms'; -import { MatDialog, - MatDialogRef, - MAT_DIALOG_DATA } from '@angular/material'; -/** Service */ -import { MastersService } from '../../service/masters/masters.service'; -import { PdTeamService } from '../../service/masters/pd-team.service'; -import { NotifierService } from 'angular-notifier'; - -@Component({ - selector: 'app-pd-team-dialog', - templateUrl: './pd-team-dialog.component.html', - styleUrls: ['./pd-team-dialog.component.scss'] -}) - - -export class PdTeamDialogComponent implements OnInit { - -public _pdTeamForm: FormGroup; -private notifier: NotifierService; -color = 'primary'; -citydatas: any[]; -lenderdatas: any[]; -errorMessage:string; -selectedValueForLender: any; -selectedValueForCity: any; -tempArray: Array<{lenderid: number, cityid: number}> = []; -PDTeamMapping: any[]; -AllPDTeamMapData: any[]; -PDTeamMaplen:any = 0; - - -constructor(private _formBuilder: FormBuilder,notifier: NotifierService, -private dialogRef: MatDialogRef, -private _pdTeamService: PdTeamService, -private _masterService: MastersService, -@Inject(MAT_DIALOG_DATA) public data: any) { - this.notifier = notifier; -} - - -ngOnInit() { - this.PdTeamFormDatas(); - if(isNaN(this.data.pdteam_id)){} - else{ - this._pdTeamService.getAllPdTeamMapListWithPK(this.data.pdteam_id) // note, removed this.countries = - .subscribe( - dataresult => { - if(dataresult.dataStatus == true){ - this.PDTeamMapping = dataresult.records; - this.PDTeamMaplen = this.PDTeamMapping.length; - } - }); - } - this._pdTeamService.getAllPdTeamMapList() // note, removed this.countries = - .subscribe( - dataresult => { - if(dataresult.dataStatus == true){ - this.AllPDTeamMapData = dataresult.records; - } - }); - - /** For City Drop Datas*/ - this._masterService.getAllMasterData('CITY') - .subscribe( - dataresult => { - if (dataresult.status == 200) { - this.citydatas = dataresult.records; - this.citydatas = this.citydatas.filter(city=>city.isactive == 1 ); - } - - }, error => this.errorMessage = error); - - /** For Entity Drop Datas*/ - this._masterService.getAllMasterData('ENTITY') - .subscribe( - dataresult => { - if (dataresult.status == 200) { - this.lenderdatas = dataresult.records; - this.lenderdatas = this.lenderdatas.filter(entity=>entity.isactive == 1 ); - } - - }, error => this.errorMessage = error); - -} - -/** Pd Team Form Datas */ -PdTeamFormDatas(){ -this._pdTeamForm = this._formBuilder.group({ - - pdteam_id: [this.data.pdteam_id], - team_name: [this.data.team_name, Validators.compose([Validators.required])], - fk_city_id: [null, Validators.compose([Validators.required])], - fk_lender_id: [null, Validators.compose([Validators.required])], - temp_array: [this.tempArray] - -}); - -} - -// isactivePDTeamChild(PD.pdteam_map_id,PD.isactive) -isactivePDTeamChild(id: number,isactive : number) { - - let ActiveDatas = isactive == 0 - ? { 'pdteam_map_id':id,'isactive': '1'} - : { 'pdteam_map_id':id,'isactive': '0'} - -//private _masterService: MastersService, -this._masterService.editMasterDetails(ActiveDatas,'PDTEAMMAP') - .subscribe(dataresult=>{ - if (dataresult.dataStatus == true){ - //alert("Successfully InActive !"); - this.notifier.notify('success', 'Record Successfully InActive.!'); - } - else{ - - //alert("SomeThing Wents Wrong Try Again !"); - this.notifier.notify('warning', 'Sorry Try Again !'); - } - }); -} - -// deletePdTeamMap(arr: any) { -// //console.log(arr); -// //var PrimaryKeyWithValue ={'pdteam_map_id':arr.id}; -// //fk_team_id -// this._pdTeamService.updatePdTeam(arr) -// .subscribe( data => { }); -// this._pdTeamService.deletePdTeamMap(arr) -// .subscribe( data => { }); -// //this.getPdTeam(); -// } - -deletePdTeamMap(PdTeamMaparr,i) { - let datas :any = []; - this._pdTeamService.deletePdTeamMapDetails(PdTeamMaparr) - .subscribe(data => { - datas = data; - if(datas.dataStatus == true){ - this.PDTeamMapping.splice(i, 1); - //alert('Deleted Successfully'); - - } - - }); -} - - -removevalue(i:number) { - //const index: number = this.tempArray.indexOf(i); - if (i !== -1) { - this.tempArray.splice(i, 1); - } - //console.log('delete function',this.tempArray); - -} - -doSomething(){ -var check = 0 ; - // console.log(this._pdTeamForm.controls['fk_city_id'].value.city_id); - // console.log(this._pdTeamForm.controls['fk_lender_id'].value.entity_id); -if((this._pdTeamForm.controls['fk_city_id'].value.city_id != '') - &&(this._pdTeamForm.controls['fk_lender_id'].value.entity_id != '')) -{ - - this.tempArray.forEach(item => { - if((item.cityid['city_id'] == this._pdTeamForm.controls['fk_city_id'].value.city_id) && - (item.lenderid['entity_id'] == this._pdTeamForm.controls['fk_lender_id'].value.entity_id)) - { - check++; - //alert(''); - this.notifier.notify('info', 'Already Exists.!'); - } - }); - - if(this.AllPDTeamMapData !== undefined){ - - this.AllPDTeamMapData.forEach(item => { - if(item.fk_team_id != this._pdTeamForm.controls['pdteam_id'].value){ - if((item.fk_city_id == this._pdTeamForm.controls['fk_city_id'].value.city_id) && - (item.fk_lender_id == this._pdTeamForm.controls['fk_lender_id'].value.entity_id)) - { - check++; - //this.notifier.notify('success', 'Already Exists.!'); - //alert('Already Exists on Other Team "'+item.team_name+'"'); - this.notifier.notify( 'info', 'Already Exists on Other Team'+item.team_name ); - } - } - }); - } - - if(isNaN(this.data.pdteam_id)) {} - else{ -// console.log(this.PDTeamMapping.length); - if(this.PDTeamMapping !== undefined){ - this.PDTeamMapping.forEach(item => { - if((item.fk_city_id == this._pdTeamForm.controls['fk_city_id'].value.city_id) && - (item.fk_lender_id == this._pdTeamForm.controls['fk_lender_id'].value.entity_id)) - { - check++; - //alert('Already Exists'); - this.notifier.notify( 'info', 'Already Exists'); - - } - }); - } - } - } - // this.tempArray.forEach(this.data, function (value, key) { - - // if((value.cityid.city_id == this._pdTeamForm.controls['fk_city_id'].value.city_id) && - // (value.lenderid.entity_id == this._pdTeamForm.controls['fk_lender_id'].value.entity_id)) - // { - // check++; - // console.log('for loop'); - // } - // }); - - if(check == 0){ - - if((this._pdTeamForm.controls['fk_lender_id'].value != null) && (this._pdTeamForm.controls['fk_city_id'].value != null)){ - - this.tempArray.push({ - 'lenderid':this._pdTeamForm.controls['fk_lender_id'].value, - 'cityid': this._pdTeamForm.controls['fk_city_id'].value - }) - - } - //console.log('if condition',check); - } - else{ - //console.log('else condition',check); - } - // console.log('Temparray',this.tempArray); - // console.log(this._pdTeamForm.controls['fk_city_id'].value); - // console.log(this._pdTeamForm.controls['fk_lender_id'].value); - - -} - -/** For Popup Close Button */ -onNoClick(): void { -this.dialogRef.close(); -} -// OnSumbitForAdd(){ -// this._pdTeamForm.controls['team_name'].value; -// this._pdTeamService.addPdTeamDetail(pdTeamFormValues).subscribe( -// dataresult=>{ -// if (dataresult.dataStatus == true){ } -// }) -// } -/** To Save/Edited Popup Data */ -onSubmit() { - -var pdTeamFormValues = this._pdTeamForm.value; - -if(isNaN(this.data.pdteam_id)) { -//console.log(pdTeamFormValues); -//To Remove The "Null" With Key -Object.keys(pdTeamFormValues).forEach( - //getAllPdTeam(); - (key) => ( pdTeamFormValues[key] == null) && delete pdTeamFormValues[key] && - delete pdTeamFormValues['fk_lender_id'] && delete pdTeamFormValues['fk_city_id']); - - -//this.lenderdatas = this.lenderdatas.filter(entity=>entity.isactive == 1 ); -//this.lenderdatas = this.lenderdatas.filter(entity=>entity.isactive == 1 ); -//console.log(pdTeamFormValues); -//this._memberService.addMasterDetails(OccupationFormValues,'OCCUPATIONMEMBERS').subscribe( -this._pdTeamService.addPdTeamDetail(pdTeamFormValues).subscribe( -dataresult=>{ - console.log(dataresult); -if (dataresult.dataStatus == true){ - //After Saving the data then popup close - this.dialogRef.close(); - //Need To Dispaly saving Datas - // alert("Data Saved Successfully"); - this.notifier.notify('success', 'Record Saved Successfully.!'); - } - else{ - //alert(""); - this.notifier.notify('warning', 'SomeThing Wents Wrong Try Again !'); - } - -}); -} else { - Object.keys(pdTeamFormValues).forEach( - (key) => delete pdTeamFormValues['fk_lender_id'] && delete pdTeamFormValues['fk_city_id']); - -this._pdTeamService.editPdTeamDetail(pdTeamFormValues).subscribe( - -dataresult=>{ -if (dataresult.dataStatus == true){ -//After Editing the data then popup close -this.dialogRef.close(); -//Need To Display saving Datas -//alert("Data Edited Successfully"); -this.notifier.notify('success', 'Record Edited Successfully.!'); - } - else{ - //alert("SomeThing Wents Wrong Try Again !"); - this.notifier.notify('warning', 'SomeThing Wents Wrong Try Again !'); - } - }); -} -} - -// 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(); -// } -// } - -/** To Reset Popup Data For Add*/ - - onResetForAdd(){ - this._pdTeamForm.reset(); - this.tempArray = []; - //console.log(this.tempArray); - } - - /** To Reset Popup Data For Edit*/ - onResetForEdit(){ - this.PdTeamFormDatas(); - this.tempArray = []; - } - isEmptyObject(obj) { - return (obj && (Object.keys(obj).length === 0)); - } - -} - -/** End Of Pd Dialog Component */ - - - - - - - - - - - - - -/* -import { Component, - OnInit, - ViewChild, - Inject } from '@angular/core'; -import { FormBuilder, - FormGroup, - FormArray, - Validators, - FormControl } from '@angular/forms'; -import { MatDialog, - MatOption, - MatDialogRef, - MAT_DIALOG_DATA } from '@angular/material'; - -/** Service * -import { MastersService } from '../../../../service/masters/masters.service'; -import { PdTeamService } from '../../../../service/masters/pd-team.service'; - -@Component({ - selector: 'app-pd-team-dialog', - templateUrl: './pd-team-dialog.component.html', - styleUrls: ['./pd-team-dialog.component.scss'] -}) - -export class PdTeamDialogComponent implements OnInit { - - public _pdTeamForm: FormGroup; - citydatas: any[]; - lenderdatas: any[]; - errorMessage:string; - - @ViewChild('allSelected') private allSelected: MatOption; - - constructor(private _formBuilder: FormBuilder, - private dialogRef: MatDialogRef, - private _MastersService: MastersService, - private _PdTeamService: PdTeamService, - @Inject(MAT_DIALOG_DATA) public data: any) { } - - ngOnInit() { - - this._pdTeamForm = this._formBuilder.group({ - - pdteam_id: [this.data.pdteam_id], - team_name: [this.data.team_name, Validators.compose([Validators.required])], - fk_city_id: [this.data.fk_city_id, Validators.compose([Validators.required])], - fk_lender_id: [this.data.fk_lender_id, Validators.compose([Validators.required])], - // city_ids: this._formBuilder.array([ - // this._formBuilder.group({ - // pdteam_city_mapping_id: [this.data.pdteam_city_mapping_id], - // fk_team_id:[this.data.pdteam_id], - // fk_city_id: [this.data.fk_city_id] - // }) - // ]) - // city_ids: [this._formBuilder.group({ - // pdteam_city_mapping_id: [this.data.pdteam_city_mapping_id], - // fk_team_id:[this.data.pdteam_id], - // fk_city_id: [this.data.fk_city_id, Validators.compose([Validators.required])], - // }) - // ] - // fk_city_id: this._formBuilder.array([this.data.fk_city_id, Validators.compose([Validators.required])]) - - }); - console.log(this._pdTeamForm); - - /** For SelectDrop Datas For Multiple Datas* - // this._MastersService.getAllMasterData('CITY') - // .subscribe( - // data => { - // let userRole:any = []; - // if (data.status == 200) { - // this.citydatas = data.records; - // this.citydatas = this.citydatas.filter(city=>city.isactive == 1 ); - // if(this.data.pdteam_id != null){ - // for (let cities of this.data[0]) { - // //console.log(role); - // userRole.push(this.citydatas.filter(city => city.city_id == cities.fk_city_id)[0]); - // this._pdTeamForm.controls['fk_city_id'].setValue(userRole); - // } - // console.log(userRole); - // } - // } - // }, error => this.errorMessage = error); - - /** For Drop Datas* - this._MastersService.getAllMasterData('CITY') - .subscribe( - dataresult => { - if (dataresult.status == 200) { - this.citydatas = dataresult.records; - this.citydatas = this.citydatas.filter(city=>city.isactive == 1 ); - } - - }, error => this.errorMessage = error); - - /** For Drop Datas* - this._MastersService.getAllMasterData('ENTITY') - .subscribe( - dataresult => { - if (dataresult.status == 200) { - this.lenderdatas = dataresult.records; - this.lenderdatas = this.lenderdatas.filter(entity=>entity.isactive == 1 ); - } - - }, error => this.errorMessage = error); - - - } - - - - //pdteam_id, team_name, createdon, fk_createdby, updatedon, fk_updatedby, isactive - /** For Popup Close Button * - onNoClick(): void { - this.dialogRef.close(); - } -//pdteam_id, team_name, createdon, fk_createdby, updatedon, fk_updatedby, isactive - /** To Save/Edited Popup Data * - onSubmit() { - - var pdTeamFormValues = this._pdTeamForm.value; - - console.log('b4 null val pdTeamFormValues',pdTeamFormValues); - if(isNaN(this.data.pdteam_id)) { - - Object.keys(pdTeamFormValues).forEach( - (key) => (pdTeamFormValues[key] == null) && delete pdTeamFormValues[key] - ); - - console.log('After null val pdTeamFormValues',pdTeamFormValues); - // // var start_index = 2 - // // var number_of_elements_to_remove = 1; - // // var removed_elements = pdTeamFormValues.splice(start_index, number_of_elements_to_remove); - // // console.log(removed_elements); - // //["k"] - - // pdTeamFormValues.splice(3, 1); - // console.log(pdTeamFormValues); - - this._PdTeamService.addPdTeamDetail(pdTeamFormValues).subscribe( - dataresult=>{ - if (dataresult.dataStatus == true){ - //After Saving the data then popup close - this.dialogRef.close(); - //Need To Dispaly saving Datas - alert("Data Saved Successfully"); - } - else{ - alert("SomeThing Wents Wrong Try Again !"); - } - - }); - } else { alert('Not Yet Completed Edit Function'); } - // //this._MastersService.editProductMaster(this._pdTeamForm.value); - // this._MastersService.editMasterDetails(this._pdTeamForm.value,'PDTEAM').subscribe( dataresult=>{ - // if (dataresult.dataStatus == true){ - // //After Editing0 the data then popup close - // this.dialogRef.close(); - // //Need To Display saving Datas - // alert("Data Edited Successfully"); - // } - // else{ - // alert("SomeThing Wents Wrong Try Again !"); - // } - // }); - // } - } - - /** To Reset Popup Data / - onReset(){ - this._pdTeamForm.reset(); - } - -} -/** End Of Product Master Component*/ - - - - - diff --git a/ng6-seed/src/app/settings/pd-team/pd-team-edit/pd-team-edit.component.html b/ng6-seed/src/app/settings/pd-team/pd-team-edit/pd-team-edit.component.html index be23374a8..42f4f724f 100644 --- a/ng6-seed/src/app/settings/pd-team/pd-team-edit/pd-team-edit.component.html +++ b/ng6-seed/src/app/settings/pd-team/pd-team-edit/pd-team-edit.component.html @@ -28,7 +28,7 @@
- {{ cd.name }} + {{ cd.name }} You must Select Cities. @@ -47,7 +47,7 @@
- {{ pd.name }} + {{ pd.name }} You must Select Product. @@ -64,7 +64,7 @@ - {{csd.name}} + {{csd.name}} You must Select Customer Segment. @@ -77,7 +77,8 @@
- + +
diff --git a/ng6-seed/src/app/settings/pd-team/pd-team-edit/pd-team-edit.component.ts b/ng6-seed/src/app/settings/pd-team/pd-team-edit/pd-team-edit.component.ts index 2bb0fa976..a0cc5afa9 100644 --- a/ng6-seed/src/app/settings/pd-team/pd-team-edit/pd-team-edit.component.ts +++ b/ng6-seed/src/app/settings/pd-team/pd-team-edit/pd-team-edit.component.ts @@ -1,32 +1,35 @@ -import { Component, OnInit, Inject } from '@angular/core'; +import { Component, OnInit, Input } from '@angular/core'; import { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms'; -import { MatDialog, - MatDialogRef, - MAT_DIALOG_DATA } from '@angular/material'; /** Service */ import { MastersService } from '../../service/masters/masters.service'; import { PdTeamService } from '../../service/masters/pd-team.service'; import { NotifierService } from 'angular-notifier'; -import { PdTeamDialogComponent } from '../pd-team-dialog/pd-team-dialog.component'; -import { Router } from '@angular/router'; - + +/** Here this component is like as a partent component */ +import { PdTeamListComponent } from './../pd-team-list/pd-team-list.component'; + @Component({ selector: 'app-pd-team-edit', templateUrl: './pd-team-edit.component.html', styleUrls: ['./pd-team-edit.component.scss'] }) + export class PdTeamEditComponent implements OnInit { public _pdTeamForm: FormGroup; public submitted = false; + private notifier: NotifierService; color = 'primary'; errorMessage:string; + + //This "childMessage" to get the function or data from partent component + @Input() public childMessage: any; //This Type Of Array Declaration for select dropdown to list the datas citydatas: any[]; @@ -34,8 +37,8 @@ export class PdTeamEditComponent implements OnInit { productdatas: any[]; customerSegmentdatas: any[]; - //This Type Of Array Declaration - pdTeamCityArray: Array<{teamid: number, cityid: number}> = []; + //This Type Of Array Declaration for Validation + pdTeamCityArray:any= []; pdTeamProductArray: Array<{teamid: number, productid: number}> = []; pdTeamCustomerSegmentArray: Array<{teamid: number, customerid: number}> = []; @@ -43,165 +46,213 @@ export class PdTeamEditComponent implements OnInit { selectedCityDatas : any=[]; selectedProductDatas : any=[]; selectedSegmentDatas : any=[]; + //EditDatasforFormGroup: any; constructor(private _formBuilder: FormBuilder, private _notifier: NotifierService, private _pdTeamService: PdTeamService, - private _router: Router, - private _masterService: MastersService) - { - this._notifier = _notifier; - } - + private _PdTeamListComponent: PdTeamListComponent, + private _masterService: MastersService) { + this.notifier = _notifier; + } + /** Onready function */ ngOnInit() { - this.PdTeamFormDatas(); + + this.PdTeamFormDatas(); + //console.log('hai I am Child This onready function',this.childMessage); + // this._pdTeamService.getAllPDTeamWithPDTeamID(this.childMessage).subscribe( + // dataresult => { + // console.log(dataresult); + // this.EditDatasforFormGroup = dataresult.records; + // console.log(this.EditDatasforFormGroup); + // }); + /** For Checking City Validation datas - checking purpose - Already exists are not */ + this._pdTeamService.getAllPdTeamCityMapping().subscribe( + dataresult => { + if(dataresult.dataStatus == true){ + //this.AllPDTeamMapData = dataresult.records; + this.pdTeamCityArray = dataresult.records; + } + }, error => this.errorMessage = error); + + /** To Display The City Data For City DropDown */ + this._masterService.getAllMasterData('CITY').subscribe( + dataresult => { + if (dataresult.dataStatus == true) { + this.citydatas = dataresult.records; + this.citydatas = this.citydatas.filter(city=>city.isactive == 1 ); + } + + }, error => this.errorMessage = error); + + /** To Display The Entities Data For Entities DropDown */ + this._masterService.getAllMasterData('ENTITY').subscribe( + dataresult => { + if (dataresult.dataStatus == true) { + this.lenderdatas = dataresult.records; + this.lenderdatas = this.lenderdatas.filter(entity=>entity.isactive == 1 ); + } + }, error => this.errorMessage = error); - /** To Display The City Data For City DropDown */ - this._masterService.getAllMasterData('CITY').subscribe( - dataresult => { - if (dataresult.status == 200) { - this.citydatas = dataresult.records; - this.citydatas = this.citydatas.filter(city=>city.isactive == 1 ); - } - - }, error => this.errorMessage = error); - - /** To Display The Entities Data For Entities DropDown */ - this._masterService.getAllMasterData('ENTITY').subscribe( - dataresult => { - if (dataresult.status == 200) { - this.lenderdatas = dataresult.records; - this.lenderdatas = this.lenderdatas.filter(entity=>entity.isactive == 1 ); - } - }, error => this.errorMessage = error); - - /** To Display The Entities Data For Entities DropDown */ - this._masterService.getAllMasterData('PRODUCTS').subscribe( - dataresult => { - if (dataresult.status == 200) { - this.productdatas = dataresult.records; - this.productdatas = this.productdatas.filter(product=>product.isactive == 1 ); + /** To Display The Entities Data For Entities DropDown */ + this._masterService.getAllMasterData('PRODUCTS').subscribe( + dataresult => { + if (dataresult.dataStatus == true) { + this.productdatas = dataresult.records; + this.productdatas = this.productdatas.filter(product=>product.isactive == 1 ); + } + }, error => this.errorMessage = error); + + /** To Display The Entities Data For Entities DropDown */ + this._masterService.getAllMasterData('CUSTOMERSEGMENT').subscribe( + dataresult => { + if (dataresult.dataStatus == true) { + this.customerSegmentdatas = dataresult.records; + this.customerSegmentdatas = this.customerSegmentdatas.filter(segment=>segment.isactive == 1 ); + } + }, error => this.errorMessage = error) } - }, error => this.errorMessage = error); - - /** To Display The Entities Data For Entities DropDown */ - this._masterService.getAllMasterData('CUSTOMERSEGMENT').subscribe( - dataresult => { - if (dataresult.status == 200) { - this.customerSegmentdatas = dataresult.records; - this.customerSegmentdatas = this.customerSegmentdatas.filter(segment=>segment.isactive == 1 ); - } - }, error => this.errorMessage = error); - } /** Pd Team Form Datas */ PdTeamFormDatas(){ - this._pdTeamForm = this._formBuilder.group({ - pdteam_id: [null, Validators.compose([Validators.required])], - team_name: [null, Validators.compose([Validators.required])], - fk_lender: [null, Validators.compose([Validators.required])], - fk_city: [null, Validators.compose([Validators.required])], - fk_customer_segment: [null, Validators.compose([Validators.required])], - fk_product:[null, Validators.compose([Validators.required])], + //console.log('Patricular pdteam_id Datas',this.childMessage); + // let PdTeamcity:any = []; + // for (let ptc of this.childMessage[0].CITYMAP) { + // //PdTeamcity.push(ptc); + // PdTeamcity.push(this.citydatas.filter(dataresults => this.selectedCityDatas == ptc)); + // //this._pdTeamForm.controls['fk_city'].setValue(PdTeamcity); + // } + // console.log('PdTeamcity',PdTeamcity); + + let PdTeamCity:any = []; + for(let ptc of this.childMessage[0].CITYMAP){ + PdTeamCity.push(ptc.city_id); + } + + let PdTeamProduct:any = []; + for(let ptp of this.childMessage[0].PRODUCTS){ + PdTeamProduct.push(ptp.product_id); + } + + let PdTeamCS:any = []; + for(let ptcs of this.childMessage[0].CUSTOMERSEGMENT){ + PdTeamCS.push(ptcs.customer_segment_id); + } + + this._pdTeamForm = this._formBuilder.group({ + pdteam_id: [this.childMessage[0].pdteam_id, Validators.compose([Validators.required])], + team_name: [this.childMessage[0].team_name, Validators.compose([Validators.required])], + fk_lender: [this.childMessage[0].fk_lender_id, Validators.compose([Validators.required])], + fk_city: [PdTeamCity, Validators.compose([Validators.required])], + fk_customer_segment: [PdTeamCS, Validators.compose([Validators.required])], + fk_product:[PdTeamProduct, Validators.compose([Validators.required])], }); + } /** convenience getter for easy access to form fields */ get f() { return this._pdTeamForm.controls; } - + /** For Popup Close Button */ onNoClick(): void { - this._router.navigate(['/setting/pdteam/pdteamlist']); + this._PdTeamListComponent.changeListView(); } - /** To Save/Edited Popup Data */ - /** To Save/Edited Popup Data */ - onSubmit() { - this.submitted = true; - // stop here if form is invalid - if (this._pdTeamForm.invalid) { - // this.errorMessage = "Please Fill All Mandate Fields."; - // return; - alert('Please Fill All Mandate Fields.'); - } else { - - var pdTeamFormValues = this._pdTeamForm.value; - - //To Remove The "Null" With Key also - Object.keys(pdTeamFormValues).forEach( - (key) => ( pdTeamFormValues[key] == null) && delete pdTeamFormValues[key]); - - this._pdTeamService.addPdTeamDetail(this._pdTeamForm.value).subscribe( - dataresult => { - if (dataresult.status == 200) { - console.log(dataresult); - // this._notifier.notify('success', 'Record Saved Successfully.!'); - alert('Record Saved Successfully.!'); - this._router.navigate(['/setting/pdteam/pdteamlist']); - this._pdTeamForm.reset(); - } - else { - //this._notifier.notify('warning', 'Something Wents Wrong Try Again.!'); - alert('Some Thing Wents Wrong Try Again !'); - //this.errorMessage = "Some Thing Wents Wrong Try Again !"; - } - }, error => { - // this._notifier.notify('warning', 'Something Wents Wrong Try Again.!'); - // this.errorMessage = "Something Wents Wrong Try Again !"; - alert('Some Thing Wents Wrong Try Again !'); - }); - } - } - - /** To Reset Popup Data For Add*/ - - onResetForAdd(){ - alert("reset function"); + onResetForEdit(){ + this.PdTeamFormDatas(); } /**on change function for customer segment to dispaly the as List in html page */ onChangeCustomerSegmentDatas($event){ - let CustomerSegmentName = $event.source.value.name; + //let CustomerSegmentName = $event.source.value.name; + let CustomerSegmentName = this.customerSegmentdatas.filter(cs=>cs.customer_segment_id == $event.source.value)[0]; + if($event.source._selected === true ){ - this.selectedSegmentDatas.push(CustomerSegmentName); + this.selectedSegmentDatas.push(CustomerSegmentName.name); } else if($event.source._selected === false ){ - let index = this.selectedSegmentDatas.indexOf(CustomerSegmentName); + let index = this.selectedSegmentDatas.indexOf(CustomerSegmentName.name); this.selectedSegmentDatas.splice(index,1); } } /**on change function for City to display the as List in html page */ onChangeCityDatas($event){ + var mycheck = 0 ; + //let cityName = $event.source.value; + let cityName = this.citydatas.filter(city=>city.city_id == $event.source.value)[0]; + + if($event.source._selected === true ){ + + for(let Duplication_City of this.pdTeamCityArray){ + + let teamname = Duplication_City.team_name; + let dup_cityname = Duplication_City.CITYMAP.filter(city=>city.city_id == $event.source.value); + + if(dup_cityname != ''){ + for(let data of dup_cityname){ + + if(data.name == cityName.name){ + alert('"'+data.name+'" Already Existing with "'+ teamname +'"'); + $event.source._selected = false; + mycheck++; + } - let cityName = $event.source.value.name; - if($event.source._selected === true ){ - this.selectedCityDatas.push(cityName); - } - else if($event.source._selected === false ){ - let index = this.selectedCityDatas.indexOf(cityName); - this.selectedCityDatas.splice(index,1); - } - + } + } + } + + if(mycheck == 0){ + this.selectedCityDatas.push(cityName.name); + } + + } + else if($event.source._selected === false ){ + let index = this.selectedCityDatas.indexOf(cityName.name); + this.selectedCityDatas.splice(index,1); + } } - + /**on change function for Product to display the data as List in html page */ onChangeProductDatas($event){ - - let productName = $event.source.value.name; + + //let productName = $event.source.value.name; + let productName = this.productdatas.filter(product=>product.product_id == $event.source.value )[0]; if($event.source._selected === true ){ - this.selectedProductDatas.push(productName); + this.selectedProductDatas.push(productName.name); } else if($event.source._selected === false ){ - let index = this.selectedProductDatas.indexOf(productName); + let index = this.selectedProductDatas.indexOf(productName.name); this.selectedProductDatas.splice(index,1); } + + } + + /** To Edited form Data */ + onSubmit() { + + var pdTeamFormValues = this._pdTeamForm.value; + Object.keys(pdTeamFormValues).forEach( + (key) => ( pdTeamFormValues[key] == null) && delete pdTeamFormValues[key]); + + this._pdTeamService.editPdTeamDetail(pdTeamFormValues).subscribe( + + dataresult=>{ + if (dataresult.dataStatus == true){ + alert("Data Edited Successfully"); + this.notifier.notify('success', 'Record Edited Successfully.!'); + } + else{ + alert("SomeThing Wents Wrong Try Again !"); + this.notifier.notify('warning', 'SomeThing Wents Wrong Try Again !'); + } + }); } - } - /** End Of PD TEAM ADD Component */ \ No newline at end of file +} +/** End Of PD Team Edit Component */ \ No newline at end of file diff --git a/ng6-seed/src/app/settings/pd-team/pd-team-list/pd-team-list.component.html b/ng6-seed/src/app/settings/pd-team/pd-team-list/pd-team-list.component.html index 80bb14541..848631ed1 100644 --- a/ng6-seed/src/app/settings/pd-team/pd-team-list/pd-team-list.component.html +++ b/ng6-seed/src/app/settings/pd-team/pd-team-list/pd-team-list.component.html @@ -1,4 +1,5 @@ - +
+
PD Team Masters @@ -22,9 +23,7 @@
- - - + Sl @@ -67,7 +66,7 @@ Actions - + @@ -79,7 +78,10 @@
- - - \ No newline at end of file +
+
+ +
+ +
diff --git a/ng6-seed/src/app/settings/pd-team/pd-team-list/pd-team-list.component.ts b/ng6-seed/src/app/settings/pd-team/pd-team-list/pd-team-list.component.ts index 892b0e2f7..390529b82 100644 --- a/ng6-seed/src/app/settings/pd-team/pd-team-list/pd-team-list.component.ts +++ b/ng6-seed/src/app/settings/pd-team/pd-team-list/pd-team-list.component.ts @@ -11,8 +11,6 @@ import { PdTeamService } from '../../service/masters/pd-team.service'; import { NotifierService } from 'angular-notifier'; -/** Dialog Component */ -import { PdTeamDialogComponent } from '../pd-team-dialog/pd-team-dialog.component'; /** Add Component */ //import { } from '../pd-team-add/pd-team-add.component; /** Edit Component */ @@ -33,10 +31,13 @@ export class PdTeamListComponent implements OnInit { color = 'primary'; userData = null; noRecordFound: boolean = false; + private notifier: NotifierService; - + public listView: any = true; public dataLength: number; public dataSource = new MatTableDataSource(); + public parentMessage: any = []; + displayedColumns = ['serialno','team_name','lender_name','actions','isactive']; @ViewChild(MatPaginator) paginator: MatPaginator; @@ -50,7 +51,7 @@ export class PdTeamListComponent implements OnInit { this.notifier = notifier; } - ngOnInit() {} + ngOnInit() { this.getPdTeam(); } /** To add data */ addPdTeam() { @@ -58,10 +59,22 @@ export class PdTeamListComponent implements OnInit { } /** To edit data */ - editPdTeam() { - this.router.navigate(['/setting/pdteam/editpdteam']); + editPdTeam(detail){ + + this._PdTeamService.getAllPDTeamWithPDTeamID(detail).subscribe( + dataresult => { + this.parentMessage = dataresult; + this.parentMessage = this.parentMessage.records; + this.listView = false; + + }); } + changeListView(){ + this.getPdTeam(); + this.listView = true; + } + /** To get data for listing */ getPdTeam() { diff --git a/ng6-seed/src/app/settings/pd-team/pd-team.module.ts b/ng6-seed/src/app/settings/pd-team/pd-team.module.ts index c17d54794..cc7958bc3 100644 --- a/ng6-seed/src/app/settings/pd-team/pd-team.module.ts +++ b/ng6-seed/src/app/settings/pd-team/pd-team.module.ts @@ -1,6 +1,8 @@ import { NgModule } from '@angular/core'; import { RouterModule } from '@angular/router'; import { CommonModule } from '@angular/common'; +import { NotifierModule, NotifierOptions } from 'angular-notifier'; +import { FlexLayoutModule } from '@angular/flex-layout'; import { MatCardModule, MatIconModule, @@ -17,19 +19,17 @@ import { MatTooltipModule } from '@angular/material/tooltip'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { NgxMatSelectSearchModule } from 'ngx-mat-select-search'; import { NgxDatatableModule } from '@swimlane/ngx-datatable'; -import { NotifierModule, NotifierOptions } from 'angular-notifier'; -import { FlexLayoutModule } from '@angular/flex-layout'; -import { PdTeamDialogComponent } from './pd-team-dialog/pd-team-dialog.component'; import { PdTeamListComponent } from './pd-team-list/pd-team-list.component'; +import { PdTeamAddComponent } from './pd-team-add/pd-team-add.component'; +import { PdTeamEditComponent } from './pd-team-edit/pd-team-edit.component'; + /** Route */ import { PdTeamRoutes } from './pd-team.routing'; /** Service */ import { PdTeamService } from '../service/masters/pd-team.service'; -import { PdTeamAddComponent } from './pd-team-add/pd-team-add.component'; -import { PdTeamEditComponent } from './pd-team-edit/pd-team-edit.component'; /** * Custom angular notifier options @@ -100,12 +100,13 @@ const customNotifierOptions: NotifierOptions = { MatTooltipModule, NotifierModule.withConfig(customNotifierOptions), ], - declarations: [PdTeamDialogComponent, + declarations: [ PdTeamListComponent, PdTeamAddComponent, PdTeamEditComponent], - providers: [PdTeamService ], - entryComponents: [PdTeamDialogComponent] + providers: [PdTeamService] + + //entryComponents: [PdTeamDialogComponent] }) export class PdTeamModule { } diff --git a/ng6-seed/src/app/settings/service/masters/pd-team.service.ts b/ng6-seed/src/app/settings/service/masters/pd-team.service.ts index d2a4dbc68..1b339e139 100644 --- a/ng6-seed/src/app/settings/service/masters/pd-team.service.ts +++ b/ng6-seed/src/app/settings/service/masters/pd-team.service.ts @@ -25,6 +25,7 @@ export class PdTeamService { //private apiUrl = "http://ssa.sineedge.com/sparqapi/api/"; private apiUrl = "http://localhost/sparqapi/api/"; + pk: { "primary_key": any; }; constructor(private _http: HttpClient, @@ -37,7 +38,7 @@ private apiUrl = "http://localhost/sparqapi/api/"; * 1st argument is "Records": any - Set of Data To Adding to database */ addPdTeamDetail(Records: any): Observable { - console.log('From Service Data',Records); + console.log('Add PD team Details In Service',Records); Records.fk_createdby = this._aws.getlocale();//to get user id for who is created the Record Records.createdon = currentdate;//to get Current date and Time for when the Record is created // Records.fk_updatedby = this._aws.getlocale();//to get user id for who is update the record @@ -58,7 +59,7 @@ return this._http.post(this.apiUrl+"savePDTeam", ArrayData) * 1st argument is "Records": any - Set of Updated Data */ editPdTeamDetail(Records: any): Observable { - + console.log('Update PD team Details In Service',Records); Records.fk_updatedby = this._aws.getlocale();//to get user id for who is update the record Records.updatedon = currentdate;//to get Current date and Time for when the Record is updated @@ -134,16 +135,24 @@ return this._http.post(this.apiUrl+"savePDTeam", ArrayData) * TO Get the Master Datas using API Call * 1st argument is "TableName" :string - Table Name */ - getAllPdTeamList(): Observable { - - return this._http.get(this.apiUrl+"getListOfPDTeam") - .pipe( - catchError(this.handleError('role', [])) - ) + getAllPdTeam(): Observable { + + return this._http.post(this.apiUrl+'getListOfPDTeam','') + .pipe( + catchError(this.handleError('role', [])) + ) } + getAllPDTeamWithPDTeamID(Primarykey): Observable { - /** Get All PD Team Child Data using API call Based on Primary Key */ + var pk = { "primary_key":Primarykey } + return this._http.post(this.apiUrl+'getListOfPDTeam',pk) + .pipe( + catchError(this.handleError('role', [])) + ) +} + + // /** Get All PD Team Child Data using API call Based on Primary Key */ getAllPdTeamMapListWithPK(Primarykey): Observable { var pk = { "primary_key":Primarykey } @@ -165,6 +174,14 @@ return this._http.post(this.apiUrl+"savePDTeam", ArrayData) ) } + getAllPdTeamCityMapping(): Observable { + //var vaildateKey = { "vaildate_key": 'cityvaildation1' } + return this._http.get(this.apiUrl+'getListOfPDTeamCityMapping') + .pipe( + catchError(this.handleError('role', [])) + ) + } + /** * TO get City Data For Listing Screen @@ -192,12 +209,11 @@ return this._http.post(this.apiUrl+"savePDTeam", ArrayData) /** * */ -getAllPdTeam(): Observable { - return this._http.get(this.apiUrl+'getListOfPDTeam') - .pipe( - catchError(this.handleError('role', [])) - ) - -} +// getAllPdTeam(): Observable { +// return this._http.get(this.apiUrl+'getListOfPDTeam') +// .pipe( +// catchError(this.handleError('role', [])) +// ) +// } } \ No newline at end of file diff --git a/ng6-seed/src/assets/styles/scss/_app.variables.scss b/ng6-seed/src/assets/styles/scss/_app.variables.scss index cab788b37..406ea8711 100644 --- a/ng6-seed/src/assets/styles/scss/_app.variables.scss +++ b/ng6-seed/src/assets/styles/scss/_app.variables.scss @@ -37,7 +37,7 @@ $main-bg-color:linear-gradient(58deg, #f44336, #673ab7); // // Typography // -$font-size-base: 0.875rem !default; +$font-size-base: 1.2rem !default; $font-weight-base: 400 !default; $font-weight-medium: 500 !default; $font-weight-bold: 600 !default; diff --git a/ng6-seed/src/assets/styles/scss/_material.variables.scss b/ng6-seed/src/assets/styles/scss/_material.variables.scss index c218bf189..160dee2cb 100644 --- a/ng6-seed/src/assets/styles/scss/_material.variables.scss +++ b/ng6-seed/src/assets/styles/scss/_material.variables.scss @@ -4,7 +4,7 @@ @import '~@angular/material/theming'; /**-- $primary: mat-palette($mat-deep-purple); --*/ -$primary: mat-palette($mat-light-blue); +$primary: mat-palette($mat-red); $accent: mat-palette($mat-amber, A200, A100, A400); $warn: mat-palette($mat-red); $theme: mat-light-theme($primary, $accent, $warn); @@ -24,5 +24,5 @@ $dark-foreground: map-get($dark-theme, foreground); - + diff --git a/ng6-seed/src/assets/styles/scss/core/_main-header.scss b/ng6-seed/src/assets/styles/scss/core/_main-header.scss index 38eee1653..c33d92320 100644 --- a/ng6-seed/src/assets/styles/scss/core/_main-header.scss +++ b/ng6-seed/src/assets/styles/scss/core/_main-header.scss @@ -91,10 +91,10 @@ mat-toolbar { .head-menu { font-size: 1.3rem !important; border-bottom: 2px solid rgba(255, 255, 255, 0.2); - background: linear-gradient(58deg, #f44336, #673ab7); + background: linear-gradient(58deg, #ca2126, #ca2126); color: #fff; &:hover { - background: linear-gradient(58deg, #f44336, #673ab7); + background: linear-gradient(58deg, #ca2126, #673ab7); } } img { diff --git a/ng6-seed/src/assets/styles/scss/core/_main-sidebar.scss b/ng6-seed/src/assets/styles/scss/core/_main-sidebar.scss index 46d4e3064..67cb61bff 100644 --- a/ng6-seed/src/assets/styles/scss/core/_main-sidebar.scss +++ b/ng6-seed/src/assets/styles/scss/core/_main-sidebar.scss @@ -39,7 +39,7 @@ flex-direction: row; align-items: center; height: 48px; - padding: 0 16px; + padding: 0 8px; color: $sidebar-menu-color; } .sub-menu { diff --git a/ng6-seed/src/assets/styles/scss/material/_buttons.scss b/ng6-seed/src/assets/styles/scss/material/_buttons.scss index 1a100dade..bde7a368f 100644 --- a/ng6-seed/src/assets/styles/scss/material/_buttons.scss +++ b/ng6-seed/src/assets/styles/scss/material/_buttons.scss @@ -11,6 +11,10 @@ $mat-fab-padding: 16px !default; } } +[mat-raised-button] { + color:red; +} + [mat-icon-button] { &[mat-button-sm] { padding: 0;