diff --git a/EmployeeNoUnique_DB_Changes.sql b/EmployeeNoUnique_DB_Changes.sql new file mode 100644 index 0000000..1d23901 --- /dev/null +++ b/EmployeeNoUnique_DB_Changes.sql @@ -0,0 +1,28 @@ +/* + EmployeeNoUnique_DB_Changes.sql + + Why: + dbo.EMPLOYEE.EMPLOYEENO had no uniqueness guard, so two employees could be saved with the + same Employee No (bulk upload, manual entry, ESS lookups by number all assume it is unique). + + What: + Adds unique constraint UQ_EMPLOYEE_EMPLOYEENO on dbo.EMPLOYEE (EMPLOYEENO). + Stops with an error (and changes nothing) if duplicate Employee Nos already exist - + fix those first with the query printed below. + + Run order: + Any time; no code depends on it. Re-runnable: does nothing when the constraint exists. +*/ + +IF EXISTS (SELECT 1 FROM sys.objects WHERE name = 'UQ_EMPLOYEE_EMPLOYEENO' AND parent_object_id = OBJECT_ID('dbo.EMPLOYEE')) + PRINT 'UQ_EMPLOYEE_EMPLOYEENO already exists - nothing to do.'; +ELSE IF EXISTS (SELECT EMPLOYEENO FROM dbo.EMPLOYEE GROUP BY EMPLOYEENO HAVING COUNT(*) > 1) +BEGIN + RAISERROR('Duplicate EMPLOYEENO values exist. Find them with: SELECT EMPLOYEENO, COUNT(*) FROM dbo.EMPLOYEE GROUP BY EMPLOYEENO HAVING COUNT(*) > 1', 16, 1); +END +ELSE +BEGIN + ALTER TABLE dbo.EMPLOYEE ADD CONSTRAINT UQ_EMPLOYEE_EMPLOYEENO UNIQUE NONCLUSTERED (EMPLOYEENO); + PRINT 'UQ_EMPLOYEE_EMPLOYEENO added.'; +END +GO diff --git a/HRM.BO/User/Users.cs b/HRM.BO/User/Users.cs index ba4a2cd..4954b16 100644 --- a/HRM.BO/User/Users.cs +++ b/HRM.BO/User/Users.cs @@ -136,7 +136,7 @@ namespace HRM.BO public int? EmployeeID { get; set; } public string MobileNo { get; set; } public string Email { get; set; } //erec - public string EmailAddress { get; set; } + //public string EmailAddress { get; set; } public string ADloginID { get; set; } #region Payroll Specific diff --git a/HRM.DA/DA/Users/UserDA.cs b/HRM.DA/DA/Users/UserDA.cs index 14af5b6..d6e8d0a 100644 --- a/HRM.DA/DA/Users/UserDA.cs +++ b/HRM.DA/DA/Users/UserDA.cs @@ -25,16 +25,16 @@ namespace HRM.DA string sql = SQLParser.MakeSQL(@"INSERT INTO Users(USERID, COMPUTERNAME, APPROVEDCOMPUTERNAME, USERTYPE, STATUS," + " LOCKEDWORKSTATION,PASSWORDHINT,LOGINID,USERNAME,PASSWORD, ApprovedBy," + " ApprovedDate, EMPLOYEEID,ChangePasswordAtNextLogon,NeverExpire,MacAddress,IPAddress," + - " ExpireDate,CreatedDate,OwnerID, reason, authorizedBy, authorizedDate, EmailAddress, Email)" + + " ExpireDate,CreatedDate,OwnerID, reason, authorizedBy, authorizedDate , Email)" + " VALUES(%n, %s, %s, %n, %n, " + "%s, %s, %s, %s, %s, %n, " + " %d, %n, %n, %n, %s, %s, " + - " %D, %D, %n, %s, %n, %D, %u, %s)" , + " %D, %D, %n, %s, %n, %D , %s)" , item.ID, item.ComputerName, item.ApprovedComputerName, item.UserType, item.UserStatus, item.LockedWorkStation, item.PasswordHints, item.LoginID, item.UserName, item.Password, item.ApprovedBy, item.ApprovedDate, item.EmployeeID, item.ChangePasswordAtNextLogon, item.NeverExpire, item.MacAddress, item.IPAddress, item.ExpireDate, item.CreatedDate,item.ParentID, item.Reason, item.AuthorizedBy, item.AuthorizedDate, - string.IsNullOrWhiteSpace(item.EmailAddress) ? null : item.EmailAddress.Trim(), + string.IsNullOrWhiteSpace(item.Email) ? null : item.Email.Trim()); tc.ExecuteNonQuery(sql); @@ -49,12 +49,12 @@ namespace HRM.DA string sql = SQLParser.MakeSQL(@"UPDATE Users SET COMPUTERNAME=%s, APPROVEDCOMPUTERNAME=%s, USERTYPE=%n, LOCKEDWORKSTATION=%s, " + " LOGINID=%s, USERNAME=%s,PASSWORD=%s, PASSWORDHINT=%s, ApprovedBy=%n, ApprovedDate=%D, EMPLOYEEID=%n, " + " ChangePasswordAtNextLogon=%n, NeverExpire=%n, MacAddress = %s, IPAddress = %s , " + - " ExpireDate = %D, Status = %n, reason = %s, authorizedBy = %n, authorizedDate = %D, EmailAddress = %u " + + " ExpireDate = %D, Status = %n, reason = %s, authorizedBy = %n, authorizedDate = %D, Email = %s " + " WHERE UserID=%n", item.ComputerName, item.ApprovedComputerName, item.UserType, item.LockedWorkStation, item.LoginID, item.UserName, item.Password, item.PasswordHints, item.ApprovedBy, DataReader.GetNullValue(item.ApprovedDate), item.EmployeeID, item.ChangePasswordAtNextLogon, item.NeverExpire, item.MacAddress, item.IPAddress, DataReader.GetNullValue(item.ExpireDate), item.UserStatus, item.Reason, item.AuthorizedBy, DataReader.GetNullValue(item.AuthorizedDate), - string.IsNullOrWhiteSpace(item.EmailAddress) ? null : item.EmailAddress.Trim(), item.ID); + item.ID); tc.ExecuteNonQuery(sql); } diff --git a/HRM.DA/Service/Users/UserRoleService.cs b/HRM.DA/Service/Users/UserRoleService.cs index 96b7e95..4030992 100644 --- a/HRM.DA/Service/Users/UserRoleService.cs +++ b/HRM.DA/Service/Users/UserRoleService.cs @@ -338,7 +338,7 @@ namespace HRM.DA userObject.EmployeeID = emp.ID; // the employee's e-mail becomes the user's (both e-mail columns); no e-mail on the employee leaves them empty userObject.Email = string.IsNullOrWhiteSpace(emp.EmailAddress) ? null : emp.EmailAddress.Trim(); - userObject.EmailAddress = userObject.Email; + // userObject.EmailAddress = userObject.Email; userObject.UserStatus = EnumAuthStatus.Approved; userObject.ChangePasswordAtNextLogon = true; userObject.SISU = false; diff --git a/HRM.DA/Service/Users/UserService.cs b/HRM.DA/Service/Users/UserService.cs index 3c9942b..d37d59a 100644 --- a/HRM.DA/Service/Users/UserService.cs +++ b/HRM.DA/Service/Users/UserService.cs @@ -53,7 +53,7 @@ namespace HRM.DA oUser.ChangePasswordAtNextLogon = oReader.GetBoolean("ChangePasswordAtNextLogon", false); oUser.EmployeeID = oReader.GetInt32("EmployeeID"); oUser.Email = oReader.GetString("Email", true, string.Empty); - oUser.EmailAddress = oReader.GetString("EmailAddress", true, null); + // oUser.EmailAddress = oReader.GetString("EmailAddress", true, null); // oUser.LogInPayrollTypeID = oReader.GetInt32("PAYROLLTYPEID", 0); // oUser.ChangePasswordAtNextLogon = oReader.GetBoolean("ChangePasswordAtNextLogon").Value; //oUser.NeverExpire = oReader.GetBoolean("NeverExpire").Value; diff --git a/HRM.UI/ClientApp/package-lock.json b/HRM.UI/ClientApp/package-lock.json index f903773..d7e14a9 100644 --- a/HRM.UI/ClientApp/package-lock.json +++ b/HRM.UI/ClientApp/package-lock.json @@ -64,13 +64,14 @@ "date-fns": "^4.4.0", "exceljs": "^4.4.0", "file-saver": "^2.0.5", + "fix": "^0.0.3", "hammerjs": "^2.0.8", "ng2-pdf-viewer": "^10.4.0", "ngx-extended-pdf-viewer": "^31.0.1", "primeflex": "^4.0.0", "primeicons": "^7.0.0", "prismjs": "^1.30.0", - "quill": "^2.0.3", + "quill": "^2.0.2", "rxjs": "^7.8.2", "sweetalert2": "^11.26.25", "tslib": "^2.9.1", @@ -79,8 +80,8 @@ }, "devDependencies": { "@angular-eslint/builder": "^22.6.0", - "@angular-eslint/eslint-plugin": "^22.6.0", - "@angular-eslint/eslint-plugin-template": "^22.6.0", + "@angular-eslint/eslint-plugin": "^17.1.1", + "@angular-eslint/eslint-plugin-template": "^17.1.1", "@angular-eslint/template-parser": "^22.6.0", "@angular/build": "^22.2.5", "@angular/cli": "^22.2.5", @@ -201,42 +202,163 @@ "license": "MIT" }, "node_modules/@angular-eslint/eslint-plugin": { - "version": "22.6.0", - "resolved": "https://registry.npmjs.org/@angular-eslint/eslint-plugin/-/eslint-plugin-22.6.0.tgz", - "integrity": "sha512-zLQSfwNiOaWYp1IRQh4TlgBbUmaGm0OWNEO98E2U9DstHJTPTghRwG4wZX4Ly/YOYsb3WU06pD1/cCRUYHRgmw==", + "version": "17.1.1", + "resolved": "https://registry.npmjs.org/@angular-eslint/eslint-plugin/-/eslint-plugin-17.1.1.tgz", + "integrity": "sha512-fFOBlCOVObVu3gjLj+0BypqO1ZR/0bfJnDElqMdYwJG7zRaFT8NNQbrOo/q/GQoqOFoNna6mw3teTGsd5JnL2A==", "dev": true, "license": "MIT", "dependencies": { - "@angular-eslint/bundled-angular-compiler": "22.6.0", - "@angular-eslint/utils": "22.6.0", - "ts-api-utils": "^2.1.0" + "@angular-eslint/utils": "17.1.1", + "@typescript-eslint/utils": "6.13.1" }, "peerDependencies": { - "@typescript-eslint/utils": "^8.0.0", - "eslint": "^9.0.0 || ^10.0.0", + "eslint": "^7.20.0 || ^8.0.0", "typescript": "*" } }, "node_modules/@angular-eslint/eslint-plugin-template": { - "version": "22.6.0", - "resolved": "https://registry.npmjs.org/@angular-eslint/eslint-plugin-template/-/eslint-plugin-template-22.6.0.tgz", - "integrity": "sha512-e3ueYzr1ARovQtoBaiAeYtLR3MLIeJNKA46LBwKbRhVl1S8L1FiwYsWJvx0lRvcgdFWFt+WrSXeTxuc0ITW9eA==", + "version": "17.1.1", + "resolved": "https://registry.npmjs.org/@angular-eslint/eslint-plugin-template/-/eslint-plugin-template-17.1.1.tgz", + "integrity": "sha512-unZ6QNwtxuB8Eni7UPdw7uK6iZipZUXIsH+ZuLMOxwFgGMqeRnpv8SW0212rto3d/Ec0jESzVHKcwZ9pT+jxgw==", "dev": true, "license": "MIT", "dependencies": { - "@angular-eslint/bundled-angular-compiler": "22.6.0", - "@angular-eslint/utils": "22.6.0", - "aria-query": "5.3.2", - "axobject-query": "4.1.0" + "@angular-eslint/bundled-angular-compiler": "17.1.1", + "@angular-eslint/utils": "17.1.1", + "@typescript-eslint/type-utils": "6.13.1", + "@typescript-eslint/utils": "6.13.1", + "aria-query": "5.3.0", + "axobject-query": "4.0.0" }, "peerDependencies": { - "@angular-eslint/template-parser": "22.6.0", - "@typescript-eslint/types": "^8.0.0", - "@typescript-eslint/utils": "^8.0.0", - "eslint": "^9.0.0 || ^10.0.0", + "eslint": "^7.20.0 || ^8.0.0", "typescript": "*" } }, + "node_modules/@angular-eslint/eslint-plugin-template/node_modules/@angular-eslint/bundled-angular-compiler": { + "version": "17.1.1", + "resolved": "https://registry.npmjs.org/@angular-eslint/bundled-angular-compiler/-/bundled-angular-compiler-17.1.1.tgz", + "integrity": "sha512-xRlSh9qjdUdUKAy/0UQsxX7wf1tHApAsHsfismebPriqfmVAPyEg4HBrM8ImWaZxiqaTGC1AyHsUBQD5FK8o6w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@angular-eslint/eslint-plugin-template/node_modules/@angular-eslint/utils": { + "version": "17.1.1", + "resolved": "https://registry.npmjs.org/@angular-eslint/utils/-/utils-17.1.1.tgz", + "integrity": "sha512-CTNPOb05S/DII/Fm8JYUvKo+B4u/ctHjGJ0X1YXUR0q31oaGqTE3KePGq76+Y6swRDf9NjUIcfcnZp3u3j4CBQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@angular-eslint/bundled-angular-compiler": "17.1.1", + "@typescript-eslint/utils": "6.13.1" + }, + "peerDependencies": { + "eslint": "^7.20.0 || ^8.0.0", + "typescript": "*" + } + }, + "node_modules/@angular-eslint/eslint-plugin-template/node_modules/@typescript-eslint/type-utils": { + "version": "6.13.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.13.1.tgz", + "integrity": "sha512-A2qPlgpxx2v//3meMqQyB1qqTg1h1dJvzca7TugM3Yc2USDY+fsRBiojAEo92HO7f5hW5mjAUF6qobOPzlBCBQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/typescript-estree": "6.13.1", + "@typescript-eslint/utils": "6.13.1", + "debug": "^4.3.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@angular-eslint/eslint-plugin-template/node_modules/@typescript-eslint/utils": { + "version": "6.13.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.13.1.tgz", + "integrity": "sha512-ouPn/zVoan92JgAegesTXDB/oUp6BP1v8WpfYcqh649ejNc9Qv+B4FF2Ff626kO1xg0wWwwG48lAJ4JuesgdOw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@types/json-schema": "^7.0.12", + "@types/semver": "^7.5.0", + "@typescript-eslint/scope-manager": "6.13.1", + "@typescript-eslint/types": "6.13.1", + "@typescript-eslint/typescript-estree": "6.13.1", + "semver": "^7.5.4" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + } + }, + "node_modules/@angular-eslint/eslint-plugin/node_modules/@angular-eslint/bundled-angular-compiler": { + "version": "17.1.1", + "resolved": "https://registry.npmjs.org/@angular-eslint/bundled-angular-compiler/-/bundled-angular-compiler-17.1.1.tgz", + "integrity": "sha512-xRlSh9qjdUdUKAy/0UQsxX7wf1tHApAsHsfismebPriqfmVAPyEg4HBrM8ImWaZxiqaTGC1AyHsUBQD5FK8o6w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@angular-eslint/eslint-plugin/node_modules/@angular-eslint/utils": { + "version": "17.1.1", + "resolved": "https://registry.npmjs.org/@angular-eslint/utils/-/utils-17.1.1.tgz", + "integrity": "sha512-CTNPOb05S/DII/Fm8JYUvKo+B4u/ctHjGJ0X1YXUR0q31oaGqTE3KePGq76+Y6swRDf9NjUIcfcnZp3u3j4CBQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@angular-eslint/bundled-angular-compiler": "17.1.1", + "@typescript-eslint/utils": "6.13.1" + }, + "peerDependencies": { + "eslint": "^7.20.0 || ^8.0.0", + "typescript": "*" + } + }, + "node_modules/@angular-eslint/eslint-plugin/node_modules/@typescript-eslint/utils": { + "version": "6.13.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.13.1.tgz", + "integrity": "sha512-ouPn/zVoan92JgAegesTXDB/oUp6BP1v8WpfYcqh649ejNc9Qv+B4FF2Ff626kO1xg0wWwwG48lAJ4JuesgdOw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@types/json-schema": "^7.0.12", + "@types/semver": "^7.5.0", + "@typescript-eslint/scope-manager": "6.13.1", + "@typescript-eslint/types": "6.13.1", + "@typescript-eslint/typescript-estree": "6.13.1", + "semver": "^7.5.4" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + } + }, "node_modules/@angular-eslint/template-parser": { "version": "22.6.0", "resolved": "https://registry.npmjs.org/@angular-eslint/template-parser/-/template-parser-22.6.0.tgz", @@ -252,21 +374,6 @@ "typescript": "*" } }, - "node_modules/@angular-eslint/utils": { - "version": "22.6.0", - "resolved": "https://registry.npmjs.org/@angular-eslint/utils/-/utils-22.6.0.tgz", - "integrity": "sha512-Nd5pZGgkBTvcCNMBt88iG6r/Tzk1XTWHpQQccwYUWYhz4PMim0yyXAEvqAabxag8S9iLPUEufpaOw20OOxNJ3w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@angular-eslint/bundled-angular-compiler": "22.6.0" - }, - "peerDependencies": { - "@typescript-eslint/utils": "^8.0.0", - "eslint": "^9.0.0 || ^10.0.0", - "typescript": "*" - } - }, "node_modules/@angular/animations": { "version": "22.2.4", "resolved": "https://registry.npmjs.org/@angular/animations/-/animations-22.2.4.tgz", @@ -3740,6 +3847,44 @@ "@emnapi/runtime": "^1.7.1 || 2.0.0-beta.2" } }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/@oxc-parser/binding-android-arm-eabi": { "version": "0.150.0", "resolved": "https://registry.npmjs.org/@oxc-parser/binding-android-arm-eabi/-/binding-android-arm-eabi-0.150.0.tgz", @@ -6037,75 +6182,32 @@ "@types/node": "*" } }, - "node_modules/@typescript-eslint/project-service": { - "version": "8.72.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.72.1.tgz", - "integrity": "sha512-fAuVMkwdO/huI8nyo/WKnNKf6Gag93S56Rh3Ts5mGcavwSdaN8tRg1gCeIGX8PF+nzp1BjGfO4gHhGzW1J6jTg==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@typescript-eslint/tsconfig-utils": "^8.72.1", - "@typescript-eslint/types": "^8.72.1", - "debug": "^4.4.3" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "typescript": ">=4.8.4 <6.1.0" - } - }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.72.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.72.1.tgz", - "integrity": "sha512-lC/t6eMCZZQAAKZEYGL6RDVSuFehpdmMT6h+nJIjIa6oylN/PwDgDVtEIbB7O9xFfZYtZAYLoLlDNWKJhtF+uQ==", + "version": "6.13.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.13.1.tgz", + "integrity": "sha512-BW0kJ7ceiKi56GbT2KKzZzN+nDxzQK2DS6x0PiSMPjciPgd/JRQGMibyaN2cPt2cAvuoH0oNvn2fwonHI+4QUQ==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { - "@typescript-eslint/types": "8.72.1", - "@typescript-eslint/visitor-keys": "8.72.1" + "@typescript-eslint/types": "6.13.1", + "@typescript-eslint/visitor-keys": "6.13.1" }, "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@typescript-eslint/tsconfig-utils": { - "version": "8.72.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.72.1.tgz", - "integrity": "sha512-e4D5R5vpeAEPBxT2BAzsFQL3sbwyeeeo5+aczgNSRK1V734jE7pTqaGFU+fXapWEQwnZbpFaTn32+Z8DwS6OTg==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "typescript": ">=4.8.4 <6.1.0" - } - }, "node_modules/@typescript-eslint/types": { - "version": "8.72.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.72.1.tgz", - "integrity": "sha512-LmE5IhQet1BWOWEXqBrVtBPsMAOQ6Nzk35d+WLh3mk4EUF33sqlfxjio1MdYeSvKSG5skactKKuixBIKXhL4Rw==", + "version": "6.13.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.13.1.tgz", + "integrity": "sha512-gjeEskSmiEKKFIbnhDXUyiqVma1gRCQNbVZ1C8q7Zjcxh3WZMbzWVfGE9rHfWd1msQtPS0BVD9Jz9jded44eKg==", "dev": true, "license": "MIT", - "peer": true, "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", @@ -6113,92 +6215,51 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.72.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.72.1.tgz", - "integrity": "sha512-DAlUoUV93hIvrtIQLwCbmZQYVZwOMhiHJrOVUUIWicFZaIYjTRqlY3I/NZevfkLmSqkNHRu2qYDcq9lrn16oOQ==", + "version": "6.13.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.13.1.tgz", + "integrity": "sha512-sBLQsvOC0Q7LGcUHO5qpG1HxRgePbT6wwqOiGLpR8uOJvPJbfs0mW3jPA3ujsDvfiVwVlWUDESNXv44KtINkUQ==", "dev": true, - "license": "MIT", - "peer": true, + "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/project-service": "8.72.1", - "@typescript-eslint/tsconfig-utils": "8.72.1", - "@typescript-eslint/types": "8.72.1", - "@typescript-eslint/visitor-keys": "8.72.1", - "debug": "^4.4.3", - "minimatch": "^10.2.2", - "semver": "^7.7.3", - "tinyglobby": "^0.2.15", - "ts-api-utils": "^2.5.0" + "@typescript-eslint/types": "6.13.1", + "@typescript-eslint/visitor-keys": "6.13.1", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" }, "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, - "peerDependencies": { - "typescript": ">=4.8.4 <6.1.0" - } - }, - "node_modules/@typescript-eslint/utils": { - "version": "8.72.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.72.1.tgz", - "integrity": "sha512-5v5liypurJBFHCBNqh/RjsymAD+VWcE0djuGY/BUqp5fC3Qn+luWDEksjuTtWjPn6i5zQlUtkZCRG/CYG0yCkA==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@eslint-community/eslint-utils": "^4.9.1", - "@typescript-eslint/scope-manager": "8.72.1", - "@typescript-eslint/types": "8.72.1", - "@typescript-eslint/typescript-estree": "8.72.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", - "typescript": ">=4.8.4 <6.1.0" + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.72.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.72.1.tgz", - "integrity": "sha512-SB8xqipSzZHUePCCLNeYxqnxq83X61/qzNhjQGbTfjxGZIeOEP7tBgWYX05Tcd6CgE02WdTJnh5b8kMZJ/+bnQ==", + "version": "6.13.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.13.1.tgz", + "integrity": "sha512-NDhQUy2tg6XGNBGDRm1XybOHSia8mcXmlbKWoQP+nm1BIIMxa55shyJfZkHpEBN62KNPLrocSM2PdPcaLgDKMQ==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { - "@typescript-eslint/types": "8.72.1", - "eslint-visitor-keys": "^5.0.0" + "@typescript-eslint/types": "6.13.1", + "eslint-visitor-keys": "^3.4.1" }, "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz", - "integrity": "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==", - "dev": true, - "license": "Apache-2.0", - "peer": true, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, "node_modules/@vitejs/plugin-basic-ssl": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/@vitejs/plugin-basic-ssl/-/plugin-basic-ssl-2.3.0.tgz", @@ -6480,13 +6541,13 @@ "license": "Python-2.0" }, "node_modules/aria-query": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.2.tgz", - "integrity": "sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.0.tgz", + "integrity": "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==", "dev": true, "license": "Apache-2.0", - "engines": { - "node": ">= 0.4" + "dependencies": { + "dequal": "^2.0.3" } }, "node_modules/array-buffer-byte-length": { @@ -6528,6 +6589,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/array.prototype.findlastindex": { "version": "1.2.6", "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.6.tgz", @@ -6640,13 +6711,13 @@ } }, "node_modules/axobject-query": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-4.1.0.tgz", - "integrity": "sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-4.0.0.tgz", + "integrity": "sha512-+60uv1hiVFhHZeO+Lz0RYzsVHy5Wr1ayX0mwda9KPDVLNJgZ1T9Ny7VmFbLDzxsH0D87I86vgj3gFrjTJUYznw==", "dev": true, "license": "Apache-2.0", - "engines": { - "node": ">= 0.4" + "dependencies": { + "dequal": "^2.0.3" } }, "node_modules/balanced-match": { @@ -7632,6 +7703,16 @@ "node": ">= 0.8" } }, + "node_modules/dequal": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", + "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/destroy": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", @@ -7660,6 +7741,19 @@ "dev": true, "license": "MIT" }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/doctrine": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", @@ -8677,6 +8771,36 @@ "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==", "license": "Apache-2.0" }, + "node_modules/fast-glob": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.8" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", @@ -8734,6 +8858,16 @@ "fast-string-width": "^3.0.2" } }, + "node_modules/fastq": { + "version": "1.20.3", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.20.3.tgz", + "integrity": "sha512-XKv5nnLs6nLF71NgiKJLIZFLkPyIEuOselLG7ujZnGrRfQK8HpvY+WqKhAJUAdLomwVHErVS4LfxFlPq0/FTAw==", + "dev": true, + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, "node_modules/fdir": { "version": "6.5.0", "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", @@ -8801,6 +8935,17 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/fix": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/fix/-/fix-0.0.3.tgz", + "integrity": "sha512-nDbGTpfpPiWYuJ2qwrF2Qxqga8ANe3BV31vFA943FmEvX9iUROH3YmCOM4aq3DPZWF2WsKHoH9+Gw3qLdXfcSA==", + "dependencies": { + "pipe": "0.0.1" + }, + "engines": { + "node": "0.2.5" + } + }, "node_modules/flat-cache": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", @@ -9205,6 +9350,27 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/gopd": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", @@ -11522,6 +11688,43 @@ "node": ">= 0.4" } }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/micromatch/node_modules/picomatch": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", + "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/mime": { "version": "2.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-2.6.0.tgz", @@ -11560,23 +11763,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/minimatch": { - "version": "10.2.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz", - "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==", - "dev": true, - "license": "BlueOak-1.0.0", - "peer": true, - "dependencies": { - "brace-expansion": "^5.0.8" - }, - "engines": { - "node": "18 || 20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/minimist": { "version": "1.2.8", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", @@ -12304,6 +12490,16 @@ "node": "20 || >=22" } }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/path2d": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/path2d/-/path2d-0.2.2.tgz", @@ -12346,6 +12542,14 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/pipe": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/pipe/-/pipe-0.0.1.tgz", + "integrity": "sha512-8tESQnbeUKIuET8aTNt3HL0EG7RuPT7C8gDrZ2lK2AjEUi7TOu6NPaJvk2Voe+tc7NkBqe4HRdftDA6w+caAvg==", + "engines": { + "node": "0.2.5" + } + }, "node_modules/piscina": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/piscina/-/piscina-5.3.2.tgz", @@ -12552,10 +12756,31 @@ "node": ">=0.9" } }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, "node_modules/quill": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/quill/-/quill-2.0.3.tgz", - "integrity": "sha512-xEYQBqfYx/sfb33VJiKnSJp8ehloavImQ2A6564GAbqG55PGw1dAWUn1MUbQB62t0azawUS2CZZhWCjO8gRvTw==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/quill/-/quill-2.0.2.tgz", + "integrity": "sha512-QfazNrhMakEdRG57IoYFwffUIr04LWJxbS/ZkidRFXYCQt63c1gK6Z7IHUXMx/Vh25WgPBU42oBaNzQ0K1R/xw==", "license": "BSD-3-Clause", "dependencies": { "eventemitter3": "^5.0.1", @@ -12822,6 +13047,17 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/reusify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", + "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, "node_modules/rfdc": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.4.1.tgz", @@ -12943,6 +13179,30 @@ "url": "https://github.com/sponsors/oxc-project" } }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, "node_modules/rxjs": { "version": "7.8.2", "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz", @@ -13661,6 +13921,16 @@ "simple-concat": "^1.0.0" } }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/slice-ansi": { "version": "10.0.0", "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-10.0.0.tgz", @@ -14155,16 +14425,16 @@ } }, "node_modules/ts-api-utils": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.5.0.tgz", - "integrity": "sha512-OJ/ibxhPlqrMM0UiNHJ/0CKQkoKF243/AEmplt3qpRgkW8VG7IfOS41h7V8TjITqdByHzrjcS/2si+y4lIh8NA==", + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.4.3.tgz", + "integrity": "sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw==", "dev": true, "license": "MIT", "engines": { - "node": ">=18.12" + "node": ">=16" }, "peerDependencies": { - "typescript": ">=4.8.4" + "typescript": ">=4.2.0" } }, "node_modules/tsconfig-paths": { diff --git a/HRM.UI/ClientApp/package.json b/HRM.UI/ClientApp/package.json index 4718e4c..cd5a5de 100644 --- a/HRM.UI/ClientApp/package.json +++ b/HRM.UI/ClientApp/package.json @@ -66,13 +66,14 @@ "date-fns": "^4.4.0", "exceljs": "^4.4.0", "file-saver": "^2.0.5", + "fix": "^0.0.3", "hammerjs": "^2.0.8", "ng2-pdf-viewer": "^10.4.0", "ngx-extended-pdf-viewer": "^31.0.1", "primeflex": "^4.0.0", "primeicons": "^7.0.0", "prismjs": "^1.30.0", - "quill": "^2.0.3", + "quill": "^2.0.2", "rxjs": "^7.8.2", "sweetalert2": "^11.26.25", "tslib": "^2.9.1", @@ -81,8 +82,8 @@ }, "devDependencies": { "@angular-eslint/builder": "^22.6.0", - "@angular-eslint/eslint-plugin": "^22.6.0", - "@angular-eslint/eslint-plugin-template": "^22.6.0", + "@angular-eslint/eslint-plugin": "^17.1.1", + "@angular-eslint/eslint-plugin-template": "^17.1.1", "@angular-eslint/template-parser": "^22.6.0", "@angular/build": "^22.2.5", "@angular/cli": "^22.2.5", @@ -112,6 +113,10 @@ }, "allowScripts": { "@progress/kendo-licensing@1.12.0": true, - "esbuild@0.28.2": true + "esbuild@0.28.2": true, + "canvas@3.2.3": true, + "@parcel/watcher@2.6.0": true, + "lmdb@3.5.6": true, + "msgpackr-extract@3.0.6": true } -} \ No newline at end of file +} diff --git a/HRM.UI/ClientApp/src/app/_services/employee/employee.service.ts b/HRM.UI/ClientApp/src/app/_services/employee/employee.service.ts index 87e80c1..0ac5621 100644 --- a/HRM.UI/ClientApp/src/app/_services/employee/employee.service.ts +++ b/HRM.UI/ClientApp/src/app/_services/employee/employee.service.ts @@ -129,6 +129,9 @@ export class EmployeeServices { getEmployeeByID(empID: number) { return this.apiService.httpGet('/Employee/getEmployeeByID' + '/' + empID); } + getEmployeeByEmpNo(empNo: string) { + return this.apiService.httpGet('/Employee/getEmployeeByEmpNo' + '/' + empNo); + } getEmployeeDetailByEmpID(empID: number) { return this.apiService.httpGet('/Employee/getEmployeeDetailByEmpID' + '/' + empID); } diff --git a/HRM.UI/ClientApp/src/app/authentication/users/users-entry/users-entry.component.html b/HRM.UI/ClientApp/src/app/authentication/users/users-entry/users-entry.component.html index da3d8e6..8d33723 100644 --- a/HRM.UI/ClientApp/src/app/authentication/users/users-entry/users-entry.component.html +++ b/HRM.UI/ClientApp/src/app/authentication/users/users-entry/users-entry.component.html @@ -16,37 +16,37 @@
- +
- +
- +
- +
-
+
- +
-
+ + @@ -81,10 +81,11 @@
-->
- +
-
- +
+ +
diff --git a/HRM.UI/ClientApp/src/app/authentication/users/users-entry/users-entry.component.ts b/HRM.UI/ClientApp/src/app/authentication/users/users-entry/users-entry.component.ts index 4f782fe..c2d05c3 100644 --- a/HRM.UI/ClientApp/src/app/authentication/users/users-entry/users-entry.component.ts +++ b/HRM.UI/ClientApp/src/app/authentication/users/users-entry/users-entry.component.ts @@ -36,6 +36,7 @@ export class UsersEntryComponent implements OnInit { isNew: boolean = true; status: any = EnumExtension.getNamesAndValues(EnumAuthStatus); currentUser: User = undefined; + employeeNo:string ="" @Output() saveCompleted: EventEmitter = new EventEmitter(); constructor(public userServiceFactory: AuthService, public apiService: ApiService, @@ -78,24 +79,26 @@ export class UsersEntryComponent implements OnInit { private CreateFormValidator(): void { this.fromValidator = new FormBuilder().group({ - loginId: ['', Validators.required], + loginId: ['', [ + Validators.required, + Validators.minLength(3), + Validators.maxLength(30), + Validators.pattern(/^[a-zA-Z0-9._-]+$/) // letters, digits, . _ - only (no spaces) + ]], name: ['', Validators.required], password: ['', Validators.required], confirmPassword: ['', Validators.required], passwordHints: '', email: '', emailAddress: ['', [Validators.email, Validators.maxLength(254)]], + employeeNo: '', /* status: ['', Validators.required]*/ }); } - public onSave(e): void { - if (this.selectedEmployee == undefined) { - this._user.employeeID = undefined; - } else { - this._user.employeeID = this.selectedEmployee.employeeID; - } + public saveUser() { + var oUser; if (this._user.isNew == true) { this._user.userType = EnumUserType.User; @@ -126,6 +129,37 @@ export class UsersEntryComponent implements OnInit { this.loadingPanel.ShowLoadingPanel = false; }); } + public onSave(e): void { + this.loadingPanel.ShowLoadingPanel = true; + if (this.employeeNo == undefined || this.employeeNo == null || this.employeeNo == '') { + this.saveUser(); + } + else { + var employee; + this.employeeService.getEmployeeByEmpNo(this.employeeNo).subscribe( + (x) => { + employee = x; + }, + (x) => { + this.notificationService.showError(x.error); + this.loadingPanel.ShowLoadingPanel = false; + }, + () => { + this.loadingPanel.ShowLoadingPanel = false; + if (employee == undefined || employee == null) { + this.notificationService.showError('Employee not found.'); + } + else { + + this._user.employeeID = this.selectedEmployee.employeeID; + this.saveUser(); + } + + }); + } + + + } public onCancel(e): void { this.saveCompleted.emit(undefined); diff --git a/HRM.UI/ClientApp/src/app/authentication/users/users-list/users-list.component.html b/HRM.UI/ClientApp/src/app/authentication/users/users-list/users-list.component.html index a54c409..3a423e4 100644 --- a/HRM.UI/ClientApp/src/app/authentication/users/users-list/users-list.component.html +++ b/HRM.UI/ClientApp/src/app/authentication/users/users-list/users-list.component.html @@ -41,7 +41,7 @@ - - + --> @@ -62,7 +62,7 @@ - + @if (dataItem.userStatus ==1 || dataItem.userStatus ==5) {