﻿---------------------------Ali 2022-07-21------------------------

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) 
VALUES(1056,N'PMS',N'MeasureSetting',N'AssignEmployee',0,N'get',10127)
Go
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) 
VALUES(1057,N'PMS',N'MeasureSetting',N'AssignEmployee',0,N'post',10127)
Go

  INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(10128,N'عرض تفاصيل اعداد القياس',N'View Measure Setting Details',637,2)
Go
  INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(10129,N'امكانية الغاء التخصيص',N'Can Cancel Assignation',637,2)
Go
---------------------------End 2022-07-21------------------------

---------------------------Ali 2022-07-25------------------------

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(23106,N'ترحيل قيود اليوميه',N'Journal Entries Posting',604,2)
Go
ALTER TABLE dbo.TimePermissionsTypes ADD
	ShowInVacationsRequest bit NOT NULL CONSTRAINT DF_TimePermissionsTypes_ShowInVacationsRequest DEFAULT (0)
GO

---------------------------End 2022-07-25------------------------
---------------------------Hammad 2022-07-25---------------------


INSERT [dbo].[SystemMenu] ([SystemMenuCode], [Name], [Arabic_Name], [ParentID], [ControllerName], [ActionName], [ImageURL], [HTTPMethod], [Sequence], [IsVisible], [ShowInPrivilegePage])
VALUES(640,N'Employee Target',N'مستهدف الموظفين',496,N'/WorkFlow/TargetRequest',N'Index','fa fa-thumb-tack',N'get',22,1,1)
Go

INSERT[dbo].[SystemMenuModule]( [SystemMenuCode], [AppModuleCode]) VALUES(640,1)
Go

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(15310,N'مستهدف الموظفين',N'Employee Target',640,1)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(15311,N'عرض مستهدف الموظفين',N'View Employee Target',640,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(15312,N'إضافة مستهدف الموظفين',N'Add Employee Target',640,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(15313,N'تعديل مستهدف الموظفين',N'Edit Employee Target',640,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(15314,N'حذف مستهدف الموظفين',N'Delete Employee Target',640,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(15315,N'حفظ مستهدف الموظفين',N'Save Employee Target',640,2)
Go



INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1058,N'WorkFlow',N'TargetRequest',N'Index',0,N'get',15310)
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1059,N'WorkFlow',N'TargetRequest',N'TargetRequest_Read',0,N'post',15311)
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1060,N'WorkFlow',N'TargetRequest',N'Save',1,N'get',15312)
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1061,N'WorkFlow',N'TargetRequest',N'Save',2,N'get',15313)
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1062,N'WorkFlow',N'TargetRequest',N'Delete',0,N'post',15314)
INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1063,N'WorkFlow',N'TargetRequest',N'Save',0,N'post',15315)


INSERT[dbo].[WF_RequestType]([RequestTypeId], [RequestTypeName], [RequestTypeNameEn], [IsEditable], [SenderUserName], [SenderFrom], [SenderPassword], [SenderHostName], [SenderPort], [SenderName], [SubmitBeforRequestDate], [SubmitAfterRequestDate], [IsUsed], [CanDelegation], [DisplayUserName], [HaveAttachment],[WorkedByDefaultContract],[CategoryCode],[RequestTypeGroupCode])
 VALUES(57,N'مستهدف الموظفين',N'Employee Target',0,N'sayedmustafa84@yahoo.com',N'sayedmustafa84@yahoo.com',N'1',N'smtp.sendgrid.net',587,N'SST',NULL,NULL,1,1,0,0,0,1,1)
Go

SET IDENTITY_INSERT[dbo].[EmailTemplateType] ON
INSERT[dbo].[EmailTemplateType]([EmailTemplateTypeCode], [Name],[Arabic_Name], [IsEditable],[AppModuleCode]) VALUES(328,N'Employee Target Sending',N'ارسال مستهدف الموظفين',0,1)
INSERT[dbo].[EmailTemplateType]([EmailTemplateTypeCode], [Name],[Arabic_Name], [IsEditable],[AppModuleCode]) VALUES(329,N'Employee Target Accept',N'الموافقة على مستهدف الموظفين',0,1)
INSERT[dbo].[EmailTemplateType]([EmailTemplateTypeCode], [Name],[Arabic_Name], [IsEditable],[AppModuleCode]) VALUES(330,N'Employee Target Refuse',N'رفض مستهدف الموظفين',0,1)
INSERT[dbo].[EmailTemplateType]([EmailTemplateTypeCode], [Name],[Arabic_Name], [IsEditable],[AppModuleCode]) VALUES(331,N'Send Notification AFter Track',N'ارسال اشعار بعد نهاية المسار',0,1)

SET IDENTITY_INSERT [dbo].[EmailTemplateType] OFF

INSERT[dbo].[EmailTemplate]([Name], [Arabic_Name], [EmailTemplateTypeCode], [Subject], [Body], [IsDefault], [SubjectAppendCode]) VALUES(N'Employee Target Sending',N'ارسال مستهدف الموظفين',328,N'ارسال',N'ارسال',1,NULL)
INSERT[dbo].[EmailTemplate]([Name], [Arabic_Name], [EmailTemplateTypeCode], [Subject], [Body], [IsDefault], [SubjectAppendCode]) VALUES(N'Employee Target Accept',N'الموافقة على مستهدف الموظفين',329,N'الموافقة على',N'الموافقة على',1,NULL)
INSERT[dbo].[EmailTemplate]( [Name], [Arabic_Name], [EmailTemplateTypeCode], [Subject], [Body], [IsDefault], [SubjectAppendCode]) VALUES(N'Employee Target Refuse',N'رفض مستهدف الموظفين',330,N'رفض',N'رفض',1,NULL)
INSERT[dbo].[EmailTemplate]( [Name], [Arabic_Name], [EmailTemplateTypeCode], [Subject], [Body], [IsDefault], [SubjectAppendCode])  VALUES(N'Send Notification AFter Track',N'ارسال اشعار بعد نهاية المسار',331,N'ارسال اشعار بعد نهاية المسار',N'ارسال اشعار بعد نهاية المسار',1,NULL)
Go

INSERT [dbo].[SystemMenu] ([SystemMenuCode], [Name], [Arabic_Name], [ParentID], [ControllerName], [ActionName], [ImageURL], [HTTPMethod], [Sequence], [IsVisible], [ShowInPrivilegePage])
VALUES(641,N'Employee Target Signature',N'إعتماد مستهدف الموظفين',501,N'/WorkFlow/TargetRequestSignature',N'Index','fa fa-thumb-tack',N'get',25,1,1)
Go

INSERT[dbo].[SystemMenuModule]( [SystemMenuCode], [AppModuleCode]) VALUES(641,1)
Go

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(15316,N'إعتماد مستهدف الموظفين',N'Employee Target Signature',641,1)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(15317,N'عرض إعتماد مستهدف الموظفين',N'View Employee Target Signature',641,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(15318,N'تعديل إعتماد مستهدف الموظفين',N'Edit Employee Target Signature',641,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(15319,N'حفظ إعتماد مستهدف الموظفين',N'Save Employee Target Signature',641,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(15320,N'حفظ متعدد للاعتماد',N'Multiple Save',641,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(15321,N'عرض سجل الموظف',N'View Employee History',641,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(15322,N'ارجاع الطلب',N'Inverse Request',641,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(15323,N'اختيار كل الطلبات',N'Choose All Requests',641,2)

Go

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1064,N'WorkFlow',N'TargetRequestSignature',N'Index',0,N'get',15316)

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1065,N'WorkFlow',N'TargetRequestSignature',N'TargetRequestSignature_Read',0,N'post',15317)

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1066,N'WorkFlow',N'TargetRequestSignature',N'Save',2,N'get',15318)

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(1067,N'WorkFlow',N'TargetRequestSignature',N'Save',0,N'post',15319)
GO
SET IDENTITY_INSERT [dbo].[SecurityPrivilegeEndPoints] ON 
GO
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES (161, NULL, NULL, N'TargetRequest', N'SearchTargetRequest', N'Post')
GO
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES (162, NULL, NULL, N'TargetRequest', N'GetDetails', N'Get')
GO
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES (163, NULL, NULL, N'TargetRequest', N'GetWithOutSigById', N'Get')
GO
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES (164, NULL, NULL, N'TargetRequest', N'Get', N'Get')
GO
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES (165, NULL, NULL, N'TargetRequest', N'Delete', N'Delete')
GO
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES (166, NULL, NULL, N'TargetRequest', N'Post', N'Post')
GO
INSERT [dbo].[SecurityPrivilegeEndPoints] ([Id], [ApiName], [AreaName], [ControllerName], [ActionName], [HTTPMethod]) VALUES (167, NULL, NULL, N'TargetRequest', N'Put', N'Put')
Go
SET IDENTITY_INSERT [dbo].[SecurityPrivilegeEndPoints] OFF
GO

SET IDENTITY_INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ON 
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (293, 161, 15311, NULL)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (294, 162, 15311, NULL)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (295, 163, 15313, NULL)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (296, 164, 15313, NULL)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (297, 165, 15314, NULL)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (298, 166, 15315, NULL)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (300, 167, 15315, NULL)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (301, 9, 15317, 57)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (302, 10, 15317, 57)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (303, 8, 15318, 57)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (304, 13, 15320, 57)
GO
INSERT [dbo].[SecurityPrivilegeEndPointsDetails] ([Id], [SecurityPrivilegeEndPointId], [SecurityPrivilegeId], [RequestTypeId]) VALUES (305, 11, 15321, 57)
GO

SET IDENTITY_INSERT [dbo].[SecurityPrivilegeEndPointsDetails] OFF
GO
---------------------------End 2022-07-25---------------------
---------------------------Hammad 2022-07-26------------------
update EmailTemplateType set RequestTypeCode=57 where EmailTemplateTypeCode in (328,329,330,331)
Go
---------------------------End 2022-07-25---------------------
---------------------------Ali 2022-07-26---------------------

   INSERT[dbo].[ConfigParameter]  ([ConfigKey], [Name], [Arabic_Name], [ConfigValue], [ConfigCategoryCode], [OrderNo], [ConfigType], [IsVisible], [ModifiedBy], [ModificationDate], [RequestTypeId])
VALUES(N'WF_AddPermissionRequestWithBalance',N'Add Permission Request With Balance',N'اضافة طلب اذن برصيد',N'false',2,46,1,1,Null,Null,11)
Go
---------------------------End 2022-07-26---------------------
