diff --git a/ng-seed/src/app/app.routing.ts b/ng-seed/src/app/app.routing.ts
index 76842bc..a6a049a 100644
--- a/ng-seed/src/app/app.routing.ts
+++ b/ng-seed/src/app/app.routing.ts
@@ -30,11 +30,15 @@ export const AppRoutes: Routes = [{
{
path: 'customers',
loadChildren: () => import('./appoinment/customers/customers.module').then(m => m.CustomersModule)
- },
+ },
{
path: 'users',
loadChildren: () => import('./appoinment/user/user.module').then(m => m.UserModule)
},
+ {
+ path: 'services',
+ loadChildren: () => import('./appoinment/service-list-details/service-list.module').then(m => m.ServiceListModule)
+ },
{
path: 'consultant-setting',
loadChildren: () => import('./appoinment/consultant-setting/consultant-setting.module').then(m => m.ConsultantSettingModule)
diff --git a/ng-seed/src/app/appoinment/appoinments/dialog-box/dialog-box.component.scss b/ng-seed/src/app/appoinment/appoinments/dialog-box/dialog-box.component.scss
index f8954ae..420c3de 100644
--- a/ng-seed/src/app/appoinment/appoinments/dialog-box/dialog-box.component.scss
+++ b/ng-seed/src/app/appoinment/appoinments/dialog-box/dialog-box.component.scss
@@ -77,9 +77,9 @@
.field-inline{
display: inline-flex;
}
-::ng-deep .swal2-height-auto {
- // height: auto!important;
-}
+// ::ng-deep .swal2-height-auto {
+// // height: auto!important;
+// }
::ng-deep .mat-dialog-content {
max-height: 75vh!important;
overflow: unset!important;
diff --git a/ng-seed/src/app/appoinment/business/add-business/add-business.component.html b/ng-seed/src/app/appoinment/business/add-business/add-business.component.html
index cdfe5f3..37c3d1f 100644
--- a/ng-seed/src/app/appoinment/business/add-business/add-business.component.html
+++ b/ng-seed/src/app/appoinment/business/add-business/add-business.component.html
@@ -1,66 +1,66 @@
-
{{action}} Business
-
-
-
-
-
-
\ No newline at end of file
+ {{action}} Business
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ng-seed/src/app/appoinment/business/business-list/business-list.component.ts b/ng-seed/src/app/appoinment/business/business-list/business-list.component.ts
index 6fa7242..a2bb14f 100644
--- a/ng-seed/src/app/appoinment/business/business-list/business-list.component.ts
+++ b/ng-seed/src/app/appoinment/business/business-list/business-list.component.ts
@@ -4,6 +4,7 @@ import { MatPaginator } from '@angular/material/paginator';
import { MatSort } from '@angular/material/sort';
import { MatTable, MatTableDataSource } from '@angular/material/table';
import { Router } from '@angular/router';
+import { DialogBoxComponent } from 'app/appoinment/appoinments/dialog-box/dialog-box.component';
import Swal from 'sweetalert2/dist/sweetalert2.js';
import { AddBusinessComponent } from '../add-business/add-business.component';
import { BusinessService } from '../business-service/business.service';
diff --git a/ng-seed/src/app/appoinment/business/dialog-box/dialog-box.component.html b/ng-seed/src/app/appoinment/business/dialog-box/dialog-box.component.html
deleted file mode 100644
index 036af84..0000000
--- a/ng-seed/src/app/appoinment/business/dialog-box/dialog-box.component.html
+++ /dev/null
@@ -1,66 +0,0 @@
-
- {{action}} Business
-
-
-
-
-
-
\ No newline at end of file
diff --git a/ng-seed/src/app/appoinment/service-list-details/service-api-services/api-service.service.spec.ts b/ng-seed/src/app/appoinment/service-list-details/service-api-services/api-service.service.spec.ts
new file mode 100644
index 0000000..7fdb5e5
--- /dev/null
+++ b/ng-seed/src/app/appoinment/service-list-details/service-api-services/api-service.service.spec.ts
@@ -0,0 +1,16 @@
+import { TestBed } from '@angular/core/testing';
+
+import { ApiServiceService } from './api-service.service';
+
+describe('ApiServiceService', () => {
+ let service: ApiServiceService;
+
+ beforeEach(() => {
+ TestBed.configureTestingModule({});
+ service = TestBed.inject(ApiServiceService);
+ });
+
+ it('should be created', () => {
+ expect(service).toBeTruthy();
+ });
+});
diff --git a/ng-seed/src/app/appoinment/service-list-details/service-api-services/api-service.service.ts b/ng-seed/src/app/appoinment/service-list-details/service-api-services/api-service.service.ts
new file mode 100644
index 0000000..7a43b7b
--- /dev/null
+++ b/ng-seed/src/app/appoinment/service-list-details/service-api-services/api-service.service.ts
@@ -0,0 +1,34 @@
+import { HttpClient } from '@angular/common/http';
+import { Injectable } from '@angular/core';
+import { environment } from 'environments/environment';
+import { Observable } from 'rxjs';
+import { catchError } from 'rxjs/operators';
+
+@Injectable({
+ providedIn: 'root'
+})
+export class ApiServiceService {
+
+ private apiUrl = environment.apiEndpoint;
+ constructor(private _http: HttpClient) { }
+
+ getServicesListDetails(): Observable {
+ console.log('IN')
+ return this._http.get(this.apiUrl + "getServicesDetails ")
+ // .pipe(
+ // catchError(this.handleError('role', []))
+ // )
+ }
+
+ addFormDetails(addParams): Observable {
+ return this._http.post(this.apiUrl + 'CreateService', addParams)
+ // .pipe(
+ // catchError(this.handleError('role', []))
+ // )
+ }
+
+
+ handleError(arg0: string, arg1: undefined[]): (err: any, caught: Observable) => import("rxjs").ObservableInput {
+ throw new Error('Method not implemented.');
+ }
+}
diff --git a/ng-seed/src/app/appoinment/service-list-details/service-list-routing.module.ts b/ng-seed/src/app/appoinment/service-list-details/service-list-routing.module.ts
new file mode 100644
index 0000000..b3de5ac
--- /dev/null
+++ b/ng-seed/src/app/appoinment/service-list-details/service-list-routing.module.ts
@@ -0,0 +1,16 @@
+import { NgModule } from '@angular/core';
+import { RouterModule, Routes } from '@angular/router';
+import { ServiceListComponent } from './service-list/service-list.component';
+
+const routes: Routes = [
+ {
+ path: '',
+ component: ServiceListComponent
+ },
+];
+
+@NgModule({
+ imports: [RouterModule.forChild(routes)],
+ exports: [RouterModule]
+})
+export class ServiceListRoutingModule { }
diff --git a/ng-seed/src/app/appoinment/service-list-details/service-list/service-list.component.html b/ng-seed/src/app/appoinment/service-list-details/service-list/service-list.component.html
new file mode 100644
index 0000000..88dfcea
--- /dev/null
+++ b/ng-seed/src/app/appoinment/service-list-details/service-list/service-list.component.html
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+

+
+
+
+
+ {{serviceListDetails.servicesName}}
+ {{serviceListDetails.info}}
+ edit
+ delete
+
+ {{serviceListDetails.specialties}}
+
+
+
+
+
+
+
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
new file mode 100644
index 0000000..7b2ec62
--- /dev/null
+++ b/ng-seed/src/app/appoinment/service-list-details/service-list/service-list.component.scss
@@ -0,0 +1,105 @@
+$white: #fff;
+$black_10: rgba(0, 0, 0, 0.1);
+$black_30: rgba(0, 0, 0, 0.3);
+$icon-size: 3rem;
+$icon-color: #D8D8D8;
+$main-color: #f44336;
+.Specialties-list-card {
+ background: $white;
+ box-shadow: 0 2px 6px $black_10;
+ transition: all 0.3s ease-in-out 0s;
+ &:hover {
+ box-shadow: 0 0 21px $black_30;
+ cursor: pointer;
+ transform: scale(1.04);
+ }
+}
+.consultant-card-cover {
+ // padding: 0rem 6rem;
+ position: relative;
+ background-size: cover;
+ margin-left: 0.5rem;
+ margin-right: 1rem;
+}
+.consultant-thumb {
+ // position: absolute;
+ // margin-top: 20px;
+ // margin-left: -45rem;
+ img {
+ border: 5px solid #fff;;
+ border-radius: 100%;
+ height: 50px;
+ width: 50px;
+ // margin-right: -8rem;
+ }
+}
+.service-info{
+ line-height: 1.5rem!important;
+}
+.info{
+ font-size: 12px!important;
+ font-weight: 500;
+ color: rgba(2,71,91,.6);
+ padding: 0 0 10px;
+ max-height: 38px;
+ display: -webkit-box;
+ overflow: hidden;
+ -webkit-line-clamp: 2;
+ -webkit-box-orient: vertical;
+}
+.service-Specialties{
+ font-size: 10px;
+ font-weight: 600;
+ color: #02475b;
+ padding: 10px 0 0;
+ // border-top: 1px solid rgba(2,71,91,.3);
+}
+
+.Specialties-rightArrow{
+ top: 1rem;
+ right: 0;
+ position: absolute;
+ padding-right: 0.5rem;
+}
+.flx{
+ width: 47%;
+}
+.Specialties-spContent{
+ width: 100%;
+ padding: 0 10px 0 0;
+ position: relative;
+ // min-height: 60px;
+ height: 65px;
+}
+.mb{
+ margin-bottom: 0.60rem;
+}
+::ng-deep body .mat-card .mat-card-title {
+ padding-left: 0rem!important;
+}
+::ng-deep body .mat-card .mat-card-subtitle {
+ padding-left: 0rem!important;
+}
+.buttons{
+ float: right;
+ background-color: #4caf50;
+ color: #ffff;
+}
+.edit-color{
+ color: white;
+}
+.edit-color:hover {
+ color: #4caf50;
+ }
+ .delete:hover {
+ color:#ff0000;
+ }
+ .icon-lft{
+ margin-left: 6rem;
+ }
+ .Specialties-rightUpdate{
+ top: 1rem;
+ right: 0;
+ position: absolute;
+ padding-right: 2.5rem;
+}
diff --git a/ng-seed/src/app/appoinment/service-list-details/service-list/service-list.component.spec.ts b/ng-seed/src/app/appoinment/service-list-details/service-list/service-list.component.spec.ts
new file mode 100644
index 0000000..97c7949
--- /dev/null
+++ b/ng-seed/src/app/appoinment/service-list-details/service-list/service-list.component.spec.ts
@@ -0,0 +1,25 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { ServiceListComponent } from './service-list.component';
+
+describe('ServiceListComponent', () => {
+ let component: ServiceListComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async () => {
+ await TestBed.configureTestingModule({
+ declarations: [ ServiceListComponent ]
+ })
+ .compileComponents();
+ });
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(ServiceListComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
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
new file mode 100644
index 0000000..a047760
--- /dev/null
+++ b/ng-seed/src/app/appoinment/service-list-details/service-list/service-list.component.ts
@@ -0,0 +1,167 @@
+import { Component, OnInit } from '@angular/core';
+import { MatDialog } from '@angular/material/dialog';
+import { MatTableDataSource } from '@angular/material/table';
+import Swal from 'sweetalert2';
+import { AddServiceComponent } from '../add-service/add-service.component';
+import { ApiServiceService } from '../service-api-services/api-service.service';
+
+@Component({
+ selector: 'app-service-list',
+ templateUrl: './service-list.component.html',
+ 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;
+ serviceId: number;
+ public servicesList:any = new MatTableDataSource();
+ constructor(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);
+ }
+ this.getServicesList()
+ }
+
+ getServicesList() {
+ //this._pd.getTabStatusPdDetails(this.tabStatus)
+ this._api.getServicesListDetails().subscribe(res => {
+ if (res.status == 200) {
+ this.servicesList = res.data;
+ // console.log(this.servicesList)
+ // this.dataSource = res.data.length;
+ // console.log(this.dataSource)
+ // this.dataSource.data = this.servicesList;
+ // console.log(this.dataSource.data)
+ // this.recordStatus=false;
+ }
+ else{
+ // this.servicesList=[];
+ // 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);
+ });
+ }
+
+ confirmBox(event,element){
+ console.log(event,element)
+ Swal.fire({
+ title: 'Are you sure want to remove?',
+ text: 'You will not be able to recover this file!',
+ icon: 'warning',
+ showCancelButton: true,
+ confirmButtonText: 'Yes, delete it!',
+ cancelButtonText: 'No, keep it'
+ }).then((result) => {
+ if (result.value) {
+ // this.deleteRowData(element);
+ this.formAddUpdateAndDelete(event,element)
+ Swal.fire(
+ 'Deleted!',
+ 'Your imaginary file has been deleted.',
+ 'success'
+ )
+ } else if (result.dismiss === Swal.DismissReason.cancel) {
+ Swal.fire(
+ 'Cancelled',
+ 'Your imaginary file is safe :)',
+ 'error'
+ )
+ }
+
+ })
+ }
+
+ openDialog(action,obj) {
+ obj.action = action;
+ const dialogRef = this.dialog.open(AddServiceComponent, {
+ width: '39%',
+ height: '100%',
+ // maxWidth: '38vw',
+ position: { right: '0' },
+ data:obj
+ });
+ dialogRef.afterClosed().subscribe(result => {
+ if(result != undefined){
+ console.log(result)
+ this.formAddUpdateAndDelete(result,result.data)
+ }
+ });
+ }
+
+ formAddUpdateAndDelete(result,row_obj){
+ console.log(result,row_obj)
+ let formValue = []
+ if(result.event == 'Add'){
+ console.log('add')
+ let addFormData = {
+ // busId: 'abc123',
+ // id: row_obj.id,
+
+ serviceId: row_obj.serviceId,
+ servicesName: row_obj.servicesName
+ };
+ formValue.push(addFormData);
+ }else if(result.event == 'Update'){
+ console.log(row_obj)
+ console.log('Update')
+let updatevalue = { serviceId: row_obj.serviceId,
+ servicesName: row_obj.servicesName }
+ formValue.push(updatevalue);
+ }
+ else if(result == 'Delete'){
+ console.log('delete')
+ let val = {
+ isActive:0,
+ serviceId: row_obj.serviceId
+ }
+ formValue.push(val);
+ }
+
+ // var d = this.customersList.length+1
+ console.log(formValue[0])
+ this._api.addFormDetails(formValue[0]).subscribe(res => {
+ if (res.status == 200) {
+ // this.customersList = res.data;
+ this.getServicesList()
+ }
+ else{
+ // this.customersList=[];
+ // this.dataSource = null;
+ // this.recordStatus=true;
+ }
+ }
+ // , error => {this.errorMessage = error});
+ ,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);
+ });
+ }
+
+}
diff --git a/ng-seed/src/app/appoinment/user/add-user/add-user.component.html b/ng-seed/src/app/appoinment/user/add-user/add-user.component.html
index e8c4089..ac17926 100644
--- a/ng-seed/src/app/appoinment/user/add-user/add-user.component.html
+++ b/ng-seed/src/app/appoinment/user/add-user/add-user.component.html
@@ -1,67 +1,82 @@
- {{action}} Users
-
-
-
-
-
- Sure to delete {{local_data.name}}?
-
-
-
-
-
-
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/ng-seed/src/app/appoinment/user/add-user/add-user.component.ts b/ng-seed/src/app/appoinment/user/add-user/add-user.component.ts
index 5a47b6f..4d23399 100644
--- a/ng-seed/src/app/appoinment/user/add-user/add-user.component.ts
+++ b/ng-seed/src/app/appoinment/user/add-user/add-user.component.ts
@@ -23,7 +23,7 @@ export class AddUserComponent implements OnInit {
local_data:any;
url: string | ArrayBuffer;
businessList: any;
- public role = [{'name':'BADMIN'},{'name':'CONSULT'},{'name':'FRONTDESK'}]
+ public role = [{'name':'BADMIN'},{'name':'PRACTITIONER'},{'name':'FRONTDESK'}]
constructor(private router: Router,private formBuilder: FormBuilder,
public dialogRef: MatDialogRef,
@Optional() @Inject(MAT_DIALOG_DATA) public data: UsersData,public _bus:BusinessService) {
diff --git a/ng-seed/src/app/appoinment/user/user-dialog-box/user-dialog-box.component.html b/ng-seed/src/app/appoinment/user/user-dialog-box/user-dialog-box.component.html
deleted file mode 100644
index caea405..0000000
--- a/ng-seed/src/app/appoinment/user/user-dialog-box/user-dialog-box.component.html
+++ /dev/null
@@ -1,82 +0,0 @@
-
- {{action}} Users
-
-
-
-
-
-
-
- Sure to delete {{local_data.name}}?
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/ng-seed/src/app/end-user/search-category/search-category.component.ts b/ng-seed/src/app/end-user/search-category/search-category.component.ts
index 3b7c537..44ded6e 100644
--- a/ng-seed/src/app/end-user/search-category/search-category.component.ts
+++ b/ng-seed/src/app/end-user/search-category/search-category.component.ts
@@ -126,7 +126,7 @@ export class SearchCategoryComponent implements OnInit {
this._use.getUsersListDetails().subscribe(res => {
if (res.status == 200) {
console.log(res)
- // let data = res['data'].filter(val => val.role == 'CONSULT')
+ // let data = res['data'].filter(val => val.role == 'PRACTITIONER')
this.usersList = this.consultants;
console.log(this.usersList)
}
diff --git a/ng-seed/src/app/layouts/role-menu-items.pipe.ts b/ng-seed/src/app/layouts/role-menu-items.pipe.ts
index 762a6de..206aec7 100644
--- a/ng-seed/src/app/layouts/role-menu-items.pipe.ts
+++ b/ng-seed/src/app/layouts/role-menu-items.pipe.ts
@@ -12,8 +12,8 @@ export class RoleMenuItemsPipe implements PipeTransform {
switch(localStorage.getItem('user_role')){
case 'SADMIN': return value.filter(val=>val.state!="appoinments" && val.state!="customers" && val.state != "consultant-setting");
case 'BADMIN': return value.filter(val=>val.state !="business" && val.state!="appoinments" && val.state!="customers" && val.state!="consultants" && val.state != "consultant-setting");
- case 'CONSULT': return value.filter(val=>val.state !="business" && val.state!="consultants" && val.state!="users" && val.state!="services");
- // case 'CONSULT':
+ case 'PRACTITIONER': return value.filter(val=>val.state !="business" && val.state!="consultants" && val.state!="users" && val.state!="services");
+ // case 'PRACTITIONER':
// case '3': return value.filter(val=>val.state!="settings");
// case '4': return value.filter(val=>val.state!="settings" && val.state!="quality_check_discussion" && val.state!="reports" && val.state!="sales-pd-list");
// case '5': return value.filter(val=>val.state!="settings" && val.state!="quality_check_discussion" && val.state!="reports" && val.state!="sales-pd-list");
diff --git a/ng-seed/src/app/shared/menu-items/menu-items.ts b/ng-seed/src/app/shared/menu-items/menu-items.ts
index c7c8989..51a3725 100644
--- a/ng-seed/src/app/shared/menu-items/menu-items.ts
+++ b/ng-seed/src/app/shared/menu-items/menu-items.ts
@@ -93,30 +93,30 @@ const MENUITEMS : Menu[] = [
// // {state: 'add-user-list', name: 'Add Users '},
// ]
},
- {
- state: 'consultant-setting',
- name: 'My Settings',
- type: 'link',
- icon: 'settings_system_daydream'
- },
- {
- state: 'business-centers',
- name: 'Centers',
- type: 'link',
- icon: 'settings_system_daydream'
- },
- {
- state: 'search-category',
- name: 'search Category',
- type: 'link',
- icon: 'settings_system_daydream'
- },
- {
- state: 'slot-booking',
- name: 'Slot Booking',
- type: 'link',
- icon: 'settings_system_daydream'
- }
+ // {
+ // state: 'consultant-setting',
+ // name: 'My Settings',
+ // type: 'link',
+ // icon: 'settings_system_daydream'
+ // },
+ // {
+ // state: 'business-centers',
+ // name: 'Centers',
+ // type: 'link',
+ // icon: 'settings_system_daydream'
+ // },
+ // {
+ // state: 'search-category',
+ // name: 'search Category',
+ // type: 'link',
+ // icon: 'settings_system_daydream'
+ // },
+ // {
+ // state: 'slot-booking',
+ // name: 'Slot Booking',
+ // type: 'link',
+ // icon: 'settings_system_daydream'
+ // }
];