-
-
-
-
-
-
- | S.NO |
- {{element.serviceId}} |
-
+
+
-
-
-
- Service Name |
- {{element.servicesName}} |
-
-
-
- Duration |
- {{element.duration}} Mins |
-
+ 0" class="my-table mat-elevation-z8 len-table">
+
+
+
+ S.No
+ {{row.serviceId}}
+
+
+
+
+ Service Name
+ {{row.servicesName}}
+
-
- | Description |
- {{element.serviceDescription}} |
-
-
-
- Action |
-
- edit
- delete
- |
-
-
-
-
+
+
+ Duration
+ {{row.duration}}
+
+
+
+
+ Description
+ {{row.description}}
+
+
+
+
+ Action
+
+ edit
+ delete
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
+
+
+ No Data Available
+
+
-
\ No newline at end of file
diff --git a/ng-seed/src/app/appoinment/service-list-details/service-list/service-list.component.scss b/ng-seed/src/app/appoinment/service-list-details/service-list/service-list.component.scss
index 7f0f260..3cf4220 100644
--- a/ng-seed/src/app/appoinment/service-list-details/service-list/service-list.component.scss
+++ b/ng-seed/src/app/appoinment/service-list-details/service-list/service-list.component.scss
@@ -1,6 +1,9 @@
.my-table{
width: 100%;
}
+.scrollHV {
+ height: calc(100vh - 0px);
+ }
.button{
float: right;
background-color: #4caf50;
diff --git a/ng-seed/src/app/appoinment/service-list-details/service-list/service-list.component.ts b/ng-seed/src/app/appoinment/service-list-details/service-list/service-list.component.ts
index e71ae96..6301518 100644
--- a/ng-seed/src/app/appoinment/service-list-details/service-list/service-list.component.ts
+++ b/ng-seed/src/app/appoinment/service-list-details/service-list/service-list.component.ts
@@ -1,6 +1,8 @@
-import { Component, OnInit } from '@angular/core';
+import { Component, OnInit, ViewChild } from '@angular/core';
import { MatDialog } from '@angular/material/dialog';
-import { MatTableDataSource } from '@angular/material/table';
+import { MatPaginator, PageEvent } from '@angular/material/paginator';
+import { MatSort } from '@angular/material/sort';
+import { MatTable, MatTableDataSource } from '@angular/material/table';
import { NotifierService } from 'angular-notifier';
import Swal from 'sweetalert2';
import { AddServiceComponent } from '../add-service/add-service.component';
@@ -12,45 +14,72 @@ import { ApiServiceService } from '../service-api-services/api-service.service';
styleUrls: ['./service-list.component.scss']
})
export class ServiceListComponent implements OnInit {
- // doctors = ['Dr. Sanjeev', 'Dr. Gopi', 'Dr. Surendar', 'Dr. Kamali', 'Dr. Venkatadesh', 'Dr.Javeed', 'Dr.Cyril'];
- // serviceId = ['1', '2', '3'];
- servicesName = ['Allergist and Clinical Immunologist', 'Bariatrics', 'Breast surgery','Cardiology','Cardiothoracic & Vascular Surgery','Cold, Cough and Fever', 'Colorectal Surgery'];
- info = ['Manage allergies and treat immunity', 'For obesity-related disorders', 'For breast tissue removal', 'For heart and blood pressure problems', 'For surgical treatments of thoracic organs', 'For common health concerns', 'For disorders of rectum, anus, and colon'];
- specialties = ['Recurring infections, Immunity deficiency', 'Overweight, BMI over 30', 'Breast tissue surgery & removal, Mastectomy', 'Chest pain, Heart Failure, Cholesterol', 'Heart & lung disease, Cardiac transplantation','Fever, Eye Infection, Stomach Ache, Headache', 'Inflammatory bowel disease, Fistula, Intestinal blockage'];
serviceData: any = [];
addFormData: any;
push: any;
id: number;
displayedColumns: string[] = ['serviceId','servicesName','duration','description','action'];
serviceId: number;
- public servicesList:any = new MatTableDataSource();
+
+ public servicesListLength: number;
+ public servicesListSource = new MatTableDataSource();
+ @ViewChild(MatPaginator) paginator: MatPaginator;
+ @ViewChild(MatSort) sort: MatSort;
+ recordStatus: boolean;
+
+ @ViewChild(MatTable,{static:true}) table: MatTable
+ // pagination variable details
+ length = 5;
+ pageIndex = 0;
+ pageSize = 5;
+ pageEvent: PageEvent;
+ servicesList: any[] = [];
+ isLoading = true;
+
constructor(private notifierService: NotifierService,public _api:ApiServiceService, public dialog: MatDialog) { }
- ngOnInit(): void {
-
- for (let i = 0; i < 7; i++) {
- const random = i % 7;
- const obj: any = {
- servicesName: this.servicesName[random],
- // isFavourite: i % 5 === 0 ? true : false,
- // doctors: this.doctors,
- info: this.info[random],
- specialties: this.specialties[random],
- // apino: 21,
- // state: state[i % 4],
- //version: this.dropdown[0].name,
- };
- // this.serviceData.push(obj);
- }
+
+ ngOnInit(): void {
+ this.recordStatus=false;
this.getServicesList()
}
+ ngAfterViewInit() {
+ this.servicesListSource.paginator = this.paginator;
+ console.log(this.servicesListSource,this.paginator)
+ this.servicesListSource.sort = this.sort;
+ }
+
+
+ applyFilter(filterValue: string) {
+ filterValue = filterValue.trim(); // Remove whitespace
+ filterValue = filterValue.toLowerCase(); // Datasource defaults to lowercase matches
+ this.servicesListSource.filter = filterValue;
+ }
+
+
getServicesList() {
- this._api.getServicesListDetails().subscribe(res => {
- if (res.status == 200) {
- this.servicesList = res.data;
+ this._api.getServicesListDetails().subscribe(res => {
+ if (res.status == 200) {
+ this.isLoading = false;
+ this.servicesList = res.data;
+ console.log(this.servicesList)
+ this.servicesListLength = res.data.length;
+ console.log(this.servicesListLength)
+ this.servicesListSource['data'] = this.servicesList;
+ console.log(this.servicesListSource)
+ this.recordStatus=false;
}
- } );
+ else{
+ this.servicesList=[];
+ this.servicesListLength= null;
+ this.recordStatus=true;
+ }
+ }, error => this.isLoading = false);
+ }
+
+ pageChange(e) {
+ console.log(e);
}
confirmBox(event,element){
@@ -107,8 +136,8 @@ export class ServiceListComponent implements OnInit {
let addFormData = {
// busId: 'abc123',
// id: row_obj.id,
- serviceDescription:row_obj.serviceDescription,
- duration:row_obj.duration,
+ description:row_obj.description,
+ duration: parseInt(row_obj.duration),
serviceId: row_obj.serviceId,
servicesName: row_obj.servicesName
};
@@ -117,9 +146,9 @@ export class ServiceListComponent implements OnInit {
console.log(row_obj)
console.log('Update')
let updatevalue = {
- serviceDescription:row_obj.serviceDescription,
+ description:row_obj.description,
serviceId: row_obj.serviceId,
- duration:row_obj.duration,
+ duration: parseInt(row_obj.duration),
servicesName: row_obj.servicesName
}
formValue.push(updatevalue);
@@ -159,12 +188,5 @@ export class ServiceListComponent implements OnInit {
});
}
- applyFilter(event: Event) {
- const filterValue = (event.target as HTMLInputElement).value;
- this.servicesList.filter = filterValue.trim().toLowerCase();
- if (this.servicesList.paginator) {
- this.servicesList.paginator.firstPage();
- }
- }
}
diff --git a/ng-seed/src/app/appoinment/user/user-list/user-list.component.html b/ng-seed/src/app/appoinment/user/user-list/user-list.component.html
index 49302aa..2e53bee 100644
--- a/ng-seed/src/app/appoinment/user/user-list/user-list.component.html
+++ b/ng-seed/src/app/appoinment/user/user-list/user-list.component.html
@@ -1,3 +1,4 @@
+
Users Details
Filter
@@ -30,6 +31,7 @@
+
@@ -104,6 +106,12 @@
|
+
+
+
+
@@ -121,7 +129,6 @@
+
-
-
\ No newline at end of file
diff --git a/ng-seed/src/app/appoinment/user/user-list/user-list.component.scss b/ng-seed/src/app/appoinment/user/user-list/user-list.component.scss
index 221b1c2..9d94e9a 100644
--- a/ng-seed/src/app/appoinment/user/user-list/user-list.component.scss
+++ b/ng-seed/src/app/appoinment/user/user-list/user-list.component.scss
@@ -1,6 +1,9 @@
.my-table{
width: 100%;
}
+.scrollHV {
+ height: calc(100vh - 0px);
+}
.button{
float: right;
background-color: #4caf50;
diff --git a/ng-seed/src/app/appoinment/user/user-list/user-list.component.ts b/ng-seed/src/app/appoinment/user/user-list/user-list.component.ts
index 428a34d..34fe864 100644
--- a/ng-seed/src/app/appoinment/user/user-list/user-list.component.ts
+++ b/ng-seed/src/app/appoinment/user/user-list/user-list.component.ts
@@ -60,6 +60,7 @@ export class UserListComponent implements OnInit {
recordStatus: boolean= true;
usersListLength: any=5;
businessList: any;
+ isLoading = true
constructor(private notifierService: NotifierService,public dialog: MatDialog, public _use:UserService,public _bus:BusinessService) {
let open_go_admin = localStorage.getItem('go_admin')
if(open_go_admin == '0'){
@@ -78,6 +79,7 @@ export class UserListComponent implements OnInit {
//this._pd.getTabStatusPdDetails(this.tabStatus)
this._use.getUsersListDetails().subscribe(res => {
if (res.status == 200) {
+ this.isLoading = false
let usersList = res.data
this.usersList['data'] = usersList;
this.usersListLength = res.data.length;
@@ -88,12 +90,7 @@ export class UserListComponent implements OnInit {
// this.dataSource = null;
this.recordStatus=true;
}
- }
- ,error => {
- // this.errorMessage.push(error);
- // this.notifier.notify('error', 'Something Went Wrong Try Again.! \t\"' + (error.error_type == 2 ? error.error_status + ' ( ' + error.error_text + ' ) ' : ' ( ' + error.error_text + ' ) ') +'\" Error Occur.!');
- // alert(error.html_format);
- });
+ },error => this.isLoading = false);
}
getBusinessList() {
//this._pd.getTabStatusPdDetails(this.tabStatus)
@@ -128,6 +125,7 @@ export class UserListComponent implements OnInit {
filterValue = filterValue.trim(); // Remove whitespace
filterValue = filterValue.toLowerCase(); // Datasource defaults to lowercase matches
this.usersList.filter = filterValue;
+ console.log(this.usersList)
}
}
diff --git a/ng-seed/src/app/layouts/admin/admin-layout.component.html b/ng-seed/src/app/layouts/admin/admin-layout.component.html
index fcfa162..1f02a65 100644
--- a/ng-seed/src/app/layouts/admin/admin-layout.component.html
+++ b/ng-seed/src/app/layouts/admin/admin-layout.component.html
@@ -90,14 +90,14 @@
-
+
@@ -191,20 +191,20 @@
-
+
-