﻿-----------------------------------------------Hammad 26-07-2023  old template not exist in boudel----------------------
 
SET IDENTITY_INSERT [dbo].[EmailTemplateType] ON 
GO
INSERT [dbo].[EmailTemplateType] ([EmailTemplateTypeCode], [Name], [Arabic_Name], [IsEditable], [AppModuleCode], [RequestTypeCode], [HaveUserAccount]) 
VALUES (342, N'Reset Password', N'إعادة تعيين كلمة المرور ', 0, 4, NULL, 1)
GO
SET IDENTITY_INSERT [dbo].[EmailTemplateType] OFF
GO
IF Not EXISTS (SELECT * FROM EmailTemplate WHERE EmailTemplateTypeCode = 342)
BEGIN
  INSERT [dbo].[EmailTemplate] ([Name], [Arabic_Name], [EmailTemplateTypeCode], [Subject], [Body], [IsDefault], [SubjectAppendCode], [GeneralTypeCode], [JobTypeCode], [MessageTemplate]) 
VALUES ( N'Reset Password', N'إعادة تعيين كلمة المرور', 342, N'Reset Password', N'<div style="text-align:left;">Hello @Raw(Model.CandidateName),<br /><br />We wanted to let you know that your password was reset.<br />new password :&nbsp; @Raw(Model.Password)<br /><br />Please do not reply to this email with your password<br />and we strongly discourage you from sharing it with anyone.<br /><br />Thank You.</div>', 1, NULL, NULL, NULL, NULL)
END

 -----------------------------------------------End 26-07-2023 ----------------------

 -----------------------------------------------Ali 27-7-2023  ------------------------------------

 
insert into SecurityPrivilege (ID, DescriptionAR, DescriptionEN , SystemMenuCode , PrivilegeType )
values (15339, N'إعتماد طلب العرض الوظيفى ', N' Job Offer Request Signature' , 1008, 1 )
insert into SecurityPrivilege (ID, DescriptionAR, DescriptionEN , SystemMenuCode , PrivilegeType )
values (15340, N'عرض إعتماد طلب العرض الوظيفى  ', N' View Job Offer Request Signature' , 1008, 2 )
insert into SecurityPrivilege (ID, DescriptionAR, DescriptionEN , SystemMenuCode , PrivilegeType )
values (15341, N' تعديل إعتماد طلب العرض الوظيفى  ', N'Edit Job Offer Request Signature ' , 1008, 2 )
insert into SecurityPrivilege (ID, DescriptionAR, DescriptionEN , SystemMenuCode , PrivilegeType )
values (15342, N'حفظ إعتماد طلب العرض الوظيفى   ', N'Save Job Offer Request Signature' , 1008, 2 )
insert into SecurityPrivilege (ID, DescriptionAR, DescriptionEN , SystemMenuCode , PrivilegeType )
values (15343, N'حفظ متعدد للاعتماد', N'Multiple Save' , 1008, 2 )
GO
 INSERT INTO [dbo].[SecurityUserDetail] (SecurityUserID,PrivilegeID)
SELECT SecurityUserID, CASE 
WHEN PrivilegeID=5149 THEN 15339
WHEN PrivilegeID=5150 THEN 15340 
WHEN PrivilegeID=5151 THEN 15341 
WHEN PrivilegeID=5152 THEN 15342 
WHEN PrivilegeID=5153 THEN 15343 
 ELSE 0 END AS PrivilegeID 
FROM [dbo].[SecurityUserDetail] WHERE PrivilegeID in (5149,5150,5151,5152,5153)
Go


update SecurityPrivilegeActions set SecurityPrivilegeID=15339  where ID=1088
update SecurityPrivilegeActions set SecurityPrivilegeID=15340  where ID=1089
update SecurityPrivilegeActions set SecurityPrivilegeID=15341  where ID=1090
update SecurityPrivilegeActions set SecurityPrivilegeID=15342  where ID=1091
update SecurityPrivilegeActions set SecurityPrivilegeID=15343  where ID=1092
Go

update SecurityPrivilegeEndPointsDetails set SecurityPrivilegeId=15340  where ID=953
update SecurityPrivilegeEndPointsDetails set SecurityPrivilegeId=15340  where ID=954
update SecurityPrivilegeEndPointsDetails set SecurityPrivilegeId=15341  where ID=955
Go
insert into SecurityPrivilegeEndPointsDetails (id , SecurityPrivilegeEndPointId, SecurityPrivilegeId , RequestTypeId )
values (956, 11, 15342, 58)
Go

delete from dbo.SecurityUserDetail where PrivilegeID in(  5149,5150,5150, 5152,5153)
Go
delete from SecurityPrivilege where ID in(  5149,5150,5150, 5152,5153)
Go

 -----------------------------------------------End ------------------------------------
