gohary 5 lat temu
rodzic
commit
f4b28ae3fa

+ 1 - 1
src/app/dashboard/advertising-services/add-advertising-service/add-advertising-service.component.ts

@@ -124,7 +124,7 @@ export class AddAdvertisingServiceComponent implements OnInit {
     console.log(formData);
     if(this.typeMode) {
 
-      this.dashboardSer.editItem(formData, this.advertisingId, 'advertising').subscribe(
+      this.dashboardSer.editItem(this.advertisingId, formData,'advertising').subscribe(
         (responce) => {
           console.log(responce);
           this.toastr.success('تم التعديل بنجاح ');

+ 1 - 1
src/app/dashboard/bar-events/add-bar-event/add-bar-event.component.ts

@@ -102,7 +102,7 @@ export class AddBarEventComponent implements OnInit {
 
     if(this.typeMode) {
 
-      this.dashboardSer.editItem(dataFormEventBar, this.barEventId, 'barEvent').subscribe(
+      this.dashboardSer.editItem(this.barEventId,dataFormEventBar, 'barEvent').subscribe(
         (responce) => {
           console.log(responce);
           this.toastr.success('تم التعديل بنجاح ');

+ 2 - 2
src/app/dashboard/contact-us/add-contact-us/add-contact-us.component.ts

@@ -43,7 +43,7 @@ export class AddContactUsComponent implements OnInit {
         if(params['typeContactUs'] == 'edit') {
           this.spinner.show();
           this.typeMode = true;
-         this.contactUsId = parseInt(localStorage.getItem('editcontactUsIdStorage'));
+          this.contactUsId = parseInt(localStorage.getItem('editcontactUsIdStorage'));
           this.typeLink = 'تعديل محتوي الصفحة';
           this.dashboardSer.getItemData(this.contactUsId, 'contactUs').subscribe(
             (responce) => {
@@ -70,7 +70,7 @@ export class AddContactUsComponent implements OnInit {
     const dataFormContactUs = this.dataForm.value;
     if(this.typeMode) {
 
-      this.dashboardSer.editItem(dataFormContactUs, this.contactUsId, 'contactUs').subscribe(
+      this.dashboardSer.editItem( this.contactUsId,dataFormContactUs, 'contactUs').subscribe(
         (responce) => {
           console.log(responce);
           this.toastr.success('تم التعديل بنجاح ');

+ 2 - 2
src/app/dashboard/contact-us/contact-us-list/contact-us-list.component.ts

@@ -116,9 +116,9 @@ export class ContactUsListComponent implements OnInit {
 
       //edit function
       onEdit(editTabID) {
-      // localStorage.setItem('editcontactUsIdStorage', editTabID);
+      localStorage.setItem('editcontactUsIdStorage', editTabID);
 
-      this.router.navigate(['service/' + this.userLoginId + '/' + this.serviceId + '/contactUs/edit/' + editTabID]);
+      this.router.navigate(['service/' + this.userLoginId + '/' + this.serviceId + '/contactUs/edit/' +editTabID]);
       console.log('service/' + this.userLoginId + '/' + this.serviceId + '/contactUs/edit/' + editTabID);
       };
 

+ 1 - 1
src/app/dashboard/event-calendars/add-event-calendar/add-event-calendar.component.ts

@@ -83,7 +83,7 @@ export class AddEventCalendarComponent implements OnInit {
 
         if(this.typeMode) {
 
-          this.dashboardSer.editItem(dataFormEventBar, this.eventCalendarId, 'eventCalendar').subscribe(
+          this.dashboardSer.editItem( this.eventCalendarId,dataFormEventBar, 'eventCalendar').subscribe(
             (responce) => {
               console.log(responce);
               this.toastr.success('تم التعديل بنجاح ');

+ 2 - 2
src/app/dashboard/external-achievements/add-external-achievement/add-external-achievement.component.ts

@@ -96,11 +96,11 @@ export class AddExternalAchievementComponent implements OnInit {
             this.checkDisabledSave = true;
             const dataFormEventBar = this.dataForm.value;
             dataFormEventBar['achievement_time']  = this.higriDateVal;
-            console.log(dataFormEventBar);          
+            console.log(dataFormEventBar);
 
             if(this.typeMode) {
 
-              this.dashboardSer.editItem(dataFormEventBar, this.externalAchievementId, 'externalAchievement').subscribe(
+              this.dashboardSer.editItem( this.externalAchievementId,dataFormEventBar, 'externalAchievement').subscribe(
                 (responce) => {
                   console.log(responce);
                   this.toastr.success('تم التعديل بنجاح ');

+ 1 - 1
src/app/dashboard/statistics/add-statistic/add-statistic.component.ts

@@ -93,7 +93,7 @@ export class AddStatisticComponent implements OnInit {
 
       if(this.typeMode) {
 
-        this.dashboardSer.editItem(dataFormEventBar, this.statisticId, 'statistic').subscribe(
+        this.dashboardSer.editItem( this.statisticId, dataFormEventBar,'statistic').subscribe(
           (responce) => {
             console.log(responce);
             this.toastr.success('تم التعديل بنجاح ');

+ 1 - 1
src/app/dashboard/visiting-times/add-visiting-time/add-visiting-time.component.ts

@@ -77,7 +77,7 @@ export class AddVisitingTimeComponent implements OnInit {
       console.log(dataFormContactUs)
       if(this.typeMode) {
 
-        this.dashboardSer.editItem(dataFormContactUs, this.visitingTimeId, 'visitingTime').subscribe(
+        this.dashboardSer.editItem( this.visitingTimeId,dataFormContactUs, 'visitingTime').subscribe(
           (responce) => {
             console.log(responce);
             this.toastr.success('تم التعديل بنجاح ');

+ 10 - 10
src/app/shared/dashboard.service.ts

@@ -16,19 +16,19 @@ export class DashboardService {
     private authService: AuthServiceService,
     private spinner: NgxSpinnerService) { }
 
-     //get hospitals list 
+     //get hospitals list
      getListData(pageId: number, currentPage: number, dataTableNumber: number){
       this.spinner.show();
       console.log(this.authService.pathApi +'/page_list/' + pageId + '/' + currentPage + '/' + dataTableNumber + '/all');
       return this.http.get(this.authService.pathApi +'/page_list/' + pageId + '/' + currentPage + '/' + dataTableNumber + '/all');
     }
-  
-     //get data user from searchBar 
+
+     //get data user from searchBar
      getDataUSerSearchBar(data, pageId, pagenationNumber, dataTableNumber) {
       console.log('url', this.authService.pathApi + '/page_list' + '/' + pageId + '/' + pagenationNumber + '/' + dataTableNumber + '/all/' + data);
        return this.http.get(this.authService.pathApi + '/page_list' + '/' + pageId + '/' + pagenationNumber + '/' + dataTableNumber + '/all/' + data);
     }
-  
+
     //addEvent
     addItem(data, addType) {
       if(addType == 'advertisiment'){
@@ -71,7 +71,7 @@ export class DashboardService {
         return this.http.post(this.authService.pathApi + "/add_advertising_service", data);
       }
     }
-  
+
     //edit event
     editItem(editId,dataEdit,editPageName){
       const editData = dataEdit;
@@ -129,7 +129,7 @@ export class DashboardService {
         return this.http.post(this.authService.pathApi + '/edit_advertising_service', editData);
       }
     }
-  
+
     //get event data
     getItemData(pageId: number, typeGetData:string) {
       console.log('wwwwwwwwwwwwwwwwwwwwwwwwwwww', pageId);
@@ -163,10 +163,10 @@ export class DashboardService {
         return this.http.get(this.authService.pathApi + '/get_advertising_service/' + pageId);
       }
   }
-  
-    //delete event 
+
+    //delete event
     deleteItem(dataIds, pageId) {
-      
+
       console.log(dataIds);
       console.log(pageId);
 
@@ -209,7 +209,7 @@ export class DashboardService {
       } else if (pageId == 22){
         return this.http.post(this.authService.pathApi + '/delete_advertising_services' , {'advertising_services_id' : dataIds});
       }
-    
+
     };