﻿-----------------------------mostafa 2024-05-15 ------------------------------------------------------
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1825,N'WorkFlow',N'CostCenter',N'Index',0,N'get',3485)
GO
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1826,N'WorkFlow',N'CostCenter',N'CostCenter_Read',0,N'post',3596)
GO
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1827,N'WorkFlow',N'CostCenter',N'Save',1,N'get',3597)
GO
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1828,N'WorkFlow',N'CostCenter',N'Save',2,N'get',3598)
GO
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1829,N'WorkFlow',N'CostCenter',N'Delete',0,N'post',3599)
GO
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1830,N'WorkFlow',N'CostCenter',N'Save',0,N'post',3600)
GO
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1238,NULL, NULL,N'CostCenter',N'GetCostCenterSearch',N'post')
GO
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1239,NULL, NULL,N'CostCenter',N'GetCostCenter',N'Get')
GO
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1240,NULL, NULL,N'CostCenter',N'Put',N'Put')
GO
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1241,NULL, NULL,N'CostCenter',N'post',N'post')
GO
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1242,NULL, NULL,N'CostCenter',N'Delete',N'Delete')
GO
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1243,NULL, NULL,N'CostCenter',N'Get',N'Get')
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1519,1238,3596, NULL)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1520,1239,3596, NULL)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1521,1240,3600, NULL)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1522,1241,3600, NULL)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1523,1242,3599, NULL)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1524,1243,3598, NULL)
GO
UPDATE WF_CostCenter SET CreatedBy = 1 WHERE CreatedBy IS NULL OR CreatedBy = 0;
GO
UPDATE WF_CostCenter SET CreationDate = GETDATE() WHERE CreationDate IS NULL;
GO
UPDATE   WF_CostCenter SET Name = CASE WHEN COALESCE(Name, '') = '' OR Name IS NULL THEN Arabic_Name ELSE Name END, Arabic_Name = CASE WHEN COALESCE(Arabic_Name, '') = '' OR Arabic_Name IS NULL THEN Name  ELSE Arabic_Name END;
GO
-----------------------------End 2024-05-15 ------------------------------------------------------
-----------------------------Hammad 2024-05-15 ---------------------------------------------------
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod])
VALUES (850, NULL, NULL, N'Home', N'GetNotificationServiceLog', N'Get')
Go

INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (1075, 850, 16037, null)
GO

-----------------------------Hammad 2024-05-15 ---------------------------------------------------

-----------------------------Negm 2024-05-15 ---------------------------------------------------
   ALTER TABLE [dbo].[WF_letterTypes] ADD
 ReportName nvarchar(50)  NULL
 GO
  ALTER TABLE [dbo].[WF_letterTypes] ADD
   IsShowAccordingFinancial bit NOT NULL DEFAULT ((1))
  GO

  update WF_RequestType set NotifSignCountController= N'PermissionRequestSignatureApi' where RequestTypeId=2
  Go 
  update WF_RequestType set NotifSignCountController= N'FingerPrintRequestSignatureApi' where RequestTypeId=6
  Go 
  update WF_RequestType set NotifSignCountController= N'CompensationDayOfRestRequestSignatureApi' where RequestTypeId=21
  Go 
  update WF_RequestType set NotifSignCountController= N'CompensationReqFinalDayRestSignatureApi' where RequestTypeId=22
  Go 
  update WF_RequestType set NotifSignCountController= N'LoanRequestSignatureApi' where RequestTypeId=9
  Go 
  update WF_RequestType set NotifSignCountController= N'MonthlyEffectsRequestSignatureApi' where RequestTypeId=27
  Go 
  update WF_RequestType set NotifSignCountController= N'PenaltyRequestSignatureApi' where RequestTypeId=13
  Go 
  update WF_RequestType set NotifSignCountController= N'PromotionRequestSignatureApi' where RequestTypeId=10
  Go
  update WF_RequestType set NotifSignCountController= N'ReimbursementRequestSignatureApi' where RequestTypeId=52
  Go
  update WF_RequestType set NotifSignCountController= N'ResignationRequestSignatureApi' where RequestTypeId=7
  Go
  update WF_RequestType set NotifSignCountController= N'DisclaimerRequestSignatureApi' where RequestTypeId=17
  Go

  update SystemMenu set ControllerName =N'/WorkFlow/PromotionRequestApi' where SystemMenuCode=89
 Go
update SystemMenu set ControllerName =N'/WorkFlow/PromotionRequestSignatureApi' where SystemMenuCode=90
 Go
 update SystemMenu set ControllerName =N'/WorkFlow/PenaltyRequestApi' where SystemMenuCode=124
 Go
update SystemMenu set ControllerName =N'/WorkFlow/PenaltyRequestSignatureApi' where SystemMenuCode=126
 Go
update SystemMenu set ControllerName =N'/WorkFlow/FingerPrintRequestApi' where SystemMenuCode=69
 Go
update SystemMenu set ControllerName =N'/WorkFlow/FingerPrintRequestSignatureApi' where SystemMenuCode=70
 Go
update SystemMenu set ControllerName =N'/WorkFlow/CompensationRequestForADayOfRestApi' where SystemMenuCode=220
 Go
 update SystemMenu set ControllerName =N'/WorkFlow/CompensationDayOfRestRequestSignatureApi' where SystemMenuCode=221
 Go
 update SystemMenu set ControllerName =N'/WorkFlow/CompensationReqFinalDayRestSignatureApi' where SystemMenuCode=223
 Go
update SystemMenu set ControllerName =N'/WorkFlow/PermissionRequestApi' where SystemMenuCode=36
 Go
update SystemMenu set ControllerName =N'/WorkFlow/PermissionRequestSignatureApi' where SystemMenuCode=37
 Go
 update SystemMenu set ControllerName =N'/WorkFlow/ResignationRequestApi' where SystemMenuCode=80
 Go
 update SystemMenu set ControllerName =N'/WorkFlow/ResignationRequestSignatureApi' where SystemMenuCode=81
 Go
  update SystemMenu set ControllerName =N'/WorkFlow/DisclaimerRequestSignatureApi' where SystemMenuCode=148
 Go
 update SystemMenu set ControllerName =N'/WorkFlow/LoanRequestApi' where SystemMenuCode=84
 Go
 update SystemMenu set ControllerName =N'/WorkFlow/LoanRequestSignatureApi' where SystemMenuCode=85
 Go
 update SystemMenu set ControllerName =N'/WorkFlow/MonthlyEffectsRequestApi' where SystemMenuCode=239
 Go
 update SystemMenu set ControllerName =N'/WorkFlow/MonthlyEffectsRequestSignatureApi' where SystemMenuCode=240
 Go
-----------------------------Negm 2024-05-15 ---------------------------------------------------
-----------------------------Mostafa 2024-05-15 ---------------------------------------------------

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1873,N'WorkFlow',N'FingerPrintType',N'Index',0,N'get',3968)
GO
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1874,N'WorkFlow',N'FingerPrintType',N'FingerPrintType_Read',0,N'post',3969)
GO
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1875,N'WorkFlow',N'FingerPrintType',N'Save',1,N'get',3970)
GO
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1876,N'WorkFlow',N'FingerPrintType',N'Save',2,N'get',3971)
GO
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1877,N'WorkFlow',N'FingerPrintType',N'Delete',0,N'post',3972)
GO
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1878,N'WorkFlow',N'FingerPrintType',N'Save',0,N'post',3973)
GO
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1285,NULL, NULL,N'FingerPrintType',N'GetFingerPrintTypeSearch',N'post')
GO
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1286,NULL, NULL,N'FingerPrintType',N'GetFingerPrintType',N'Get')
GO
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1287,NULL, NULL,N'FingerPrintType',N'Put',N'Put')
GO
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1288,NULL, NULL,N'FingerPrintType',N'post',N'post')
GO
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1289,NULL, NULL,N'FingerPrintType',N'Delete',N'Delete')
GO
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES(1290,NULL, NULL,N'FingerPrintType',N'Get',N'Get')
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1561,1285,3969, NULL)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1562,1286,3969, NULL)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1563,1287,3973, NULL)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1564,1288,3973, NULL)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1565,1289,3972, NULL)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES(1566,1290,3971, NULL)
GO
UPDATE WF_FingerPrintType SET CreatedBy = 1 WHERE CreatedBy IS NULL OR CreatedBy = 0;
GO
UPDATE WF_FingerPrintType SET CreationDate = GETDATE() WHERE CreationDate IS NULL;
GO

-----------------------------End 2024-05-15 ---------------------------------------------------
