﻿---------------------Mostafa 2022-01-23----- 
 delete SecurityPrivilegeActions where ID=783
 Go
 ---------------------End 2022-01-23----- 
 ---------------------Hammad 2022-02-01----- 
update WF_RequestType set IsUsed=0 where RequestTypeId=24
update SystemMenu set IsVisible=0,ShowInPrivilegePage=0 where SystemMenuCode=330
update SystemMenu set IsVisible=0,ShowInPrivilegePage=0 where SystemMenuCode=331
Go
 ---------------------End 2022-02-01----- 
 ---------------------AK 2022-02-01----- 
CREATE TABLE [dbo].[FingerArea](
	[FingerAreaCode] [int] IDENTITY(1,1) NOT NULL,
	[Arabic_Name] [nvarchar](150) NOT NULL,
	[Name] [nvarchar](150) NOT NULL,
	[CreatedBy] [int] NOT NULL,
	[CreationDate] [datetime] NOT NULL,
	[ModifiedBy] [int] NULL,
	[ModificationDate] [datetime] NULL,
 CONSTRAINT [PK_FingerArea] PRIMARY KEY CLUSTERED 
(
	[FingerAreaCode] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[FingerAreaPoint](
	[FingerAreaPointCode] [int] IDENTITY(1,1) NOT NULL,
	[FingerAreaCode] [int] NOT NULL,
	[Latitude] [float] NOT NULL,
	[Longitude] [float] NOT NULL,
 CONSTRAINT [PK_FingerAreaPoint] PRIMARY KEY CLUSTERED 
(
	[FingerAreaPointCode] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO

ALTER TABLE [dbo].[FingerAreaPoint]  WITH CHECK ADD  CONSTRAINT [FK_FingerAreaPoint_FingerArea] FOREIGN KEY([FingerAreaCode])
REFERENCES [dbo].[FingerArea] ([FingerAreaCode])
GO

ALTER TABLE [dbo].[FingerAreaPoint] CHECK CONSTRAINT [FK_FingerAreaPoint_FingerArea]
GO
 ---------------------End 2022-02-01-----
 ---------------------Mostafa 2022-02-02-----


 INSERT [dbo].[SystemMenu] ([SystemMenuCode], [Name], [Arabic_Name], [ParentID], [ControllerName], [ActionName], [ImageURL], [HTTPMethod], [Sequence], [IsVisible], [ShowInPrivilegePage])
VALUES(582,N'Finger Area',N'مساحة البصمة',345,N'/Attendance/FingerArea',N'Index','fa fa-street-view',N'get',8,1,1)
Go

INSERT[dbo].[SystemMenuModule]( [SystemMenuCode], [AppModuleCode]) VALUES(582,11)
Go

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(13080,N'مساحة البصمة',N'Finger Area',582,1)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(13081,N'عرض مساحة البصمة',N'View Finger Area',582,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(13082,N'إضافة مساحة البصمة',N'Add Finger Area',582,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(13083,N'تعديل مساحة البصمة',N'Edit Finger Area',582,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(13084,N'حذف مساحة البصمة',N'Delete Finger Area',582,2)

INSERT[dbo].[SecurityPrivilege]([ID], [DescriptionAR], [DescriptionEN], [SystemMenuCode], [PrivilegeType]) VALUES(13085,N'حفظ مساحة البصمة',N'Save Finger Area',582,2)
Go


INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(946,N'Attendance',N'FingerArea',N'Index',0,N'get',13080)

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(947,N'Attendance',N'FingerArea',N'FingerArea_Read',0,N'post',13081)

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(948,N'Attendance',N'FingerArea',N'Save',1,N'get',13082)

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(949,N'Attendance',N'FingerArea',N'Save',2,N'get',13083)

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(950,N'Attendance',N'FingerArea',N'Delete',0,N'post',13084)

INSERT [dbo].[SecurityPrivilegeActions] ([ID], [AreaName], [ControllerName], [ActionName], [ActionType], [HTTPMethod], [SecurityPrivilegeID]) VALUES(951,N'Attendance',N'FingerArea',N'Save',0,N'post',13085)

 ---------------------End 2022-02-02-----
---------------------AK 2022-02-02----- 
CREATE TABLE [dbo].[FingerAreaCheckPointLogs](
	[FingerAreaCheckPointLogCode] [int] IDENTITY(1,1) NOT NULL,
	[EmployeeCode] [int] NOT NULL,
	[DirectionType] [int] NOT NULL,
	[CheckDateTime] [datetime] NOT NULL,
	[DeviceMacAddress] [varchar](50) NOT NULL,
	[FingerAreaCode] [int] NULL,
 CONSTRAINT [PK_FingerAreaCheckPointLog] PRIMARY KEY CLUSTERED 
(
	[FingerAreaCheckPointLogCode] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO

ALTER TABLE [dbo].[FingerAreaCheckPointLogs]  WITH CHECK ADD  CONSTRAINT [FK_FingerAreaCheckPointLogs_FingerArea] FOREIGN KEY([FingerAreaCode])
REFERENCES [dbo].[FingerArea] ([FingerAreaCode])
GO

ALTER TABLE [dbo].[FingerAreaCheckPointLogs] CHECK CONSTRAINT [FK_FingerAreaCheckPointLogs_FingerArea]
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'0 In 1 Out' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'FingerAreaCheckPointLogs', @level2type=N'COLUMN',@level2name=N'DirectionType'
GO
 ---------------------End 2022-02-02-----
 ---------------------Hammad 2022-02-06-----
 update [SST.ERP_Client].[dbo].[Clients] set SessionExpireNotificationMinutes=1
Go
 ---------------------End 2022-02-06-----
 ---------------------AK 2022-02-02----- 
DROP TABLE [dbo].[FingerAreaCheckPointLogs]
GO

CREATE TABLE [dbo].[FingerAreaCheckPointLogs](
	[FingerAreaCheckPointLogCode] [int] IDENTITY(1,1) NOT NULL,
	[EmployeeCode] [int] NOT NULL,
	[DirectionType] [int] NOT NULL,
	[CheckDateTime] [datetime] NOT NULL,
	[DeviceMacAddress] [varchar](50) NOT NULL,
	[FingerAreaCode] [int] NULL,
 CONSTRAINT [PK_FingerAreaCheckPointLog] PRIMARY KEY CLUSTERED 
(
	[FingerAreaCheckPointLogCode] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO

ALTER TABLE [dbo].[FingerAreaCheckPointLogs]  WITH CHECK ADD  CONSTRAINT [FK_FingerAreaCheckPointLogs_FingerArea] FOREIGN KEY([FingerAreaCode])
REFERENCES [dbo].[FingerArea] ([FingerAreaCode])
GO

ALTER TABLE [dbo].[FingerAreaCheckPointLogs] CHECK CONSTRAINT [FK_FingerAreaCheckPointLogs_FingerArea]
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'0 In 1 Out' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'FingerAreaCheckPointLogs', @level2type=N'COLUMN',@level2name=N'DirectionType'
GO
 ---------------------End 2022-02-02-----