Compare commits
10 commits
d1455223ee
...
69bd18184a
| Author | SHA1 | Date | |
|---|---|---|---|
| 69bd18184a | |||
| 75d02cec97 | |||
| f5d94aadad | |||
| 279e4e7bdc | |||
| 83a92ad3c1 | |||
| 28a057f1a4 | |||
| 49675cc75d | |||
| bfeab157bc | |||
| 0c273b85da | |||
| 0e8118864d |
20 changed files with 383 additions and 176 deletions
|
|
@ -19,7 +19,7 @@ require (
|
|||
github.com/gin-contrib/sse v1.1.0 // indirect
|
||||
github.com/go-playground/locales v0.14.1 // indirect
|
||||
github.com/go-playground/universal-translator v0.18.1 // indirect
|
||||
github.com/go-playground/validator/v10 v10.29.0 // indirect
|
||||
github.com/go-playground/validator/v10 v10.30.1 // indirect
|
||||
github.com/goccy/go-json v0.10.5 // indirect
|
||||
github.com/goccy/go-yaml v1.19.1 // indirect
|
||||
github.com/json-iterator/go v1.1.12 // indirect
|
||||
|
|
@ -30,7 +30,7 @@ require (
|
|||
github.com/modern-go/reflect2 v1.0.2 // indirect
|
||||
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
|
||||
github.com/quic-go/qpack v0.6.0 // indirect
|
||||
github.com/quic-go/quic-go v0.57.1 // indirect
|
||||
github.com/quic-go/quic-go v0.58.0 // indirect
|
||||
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
|
||||
github.com/ugorji/go/codec v1.3.1 // indirect
|
||||
go.uber.org/mock v0.6.0 // indirect
|
||||
|
|
|
|||
|
|
@ -27,6 +27,10 @@ github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJn
|
|||
github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY=
|
||||
github.com/go-playground/validator/v10 v10.29.0 h1:lQlF5VNJWNlRbRZNeOIkWElR+1LL/OuHcc0Kp14w1xk=
|
||||
github.com/go-playground/validator/v10 v10.29.0/go.mod h1:D6QxqeMlgIPuT02L66f2ccrZ7AGgHkzKmmTMZhk/Kc4=
|
||||
github.com/go-playground/validator/v10 v10.30.0 h1:5YBPNs273uzsZJD1I8uiB4Aqg9sN6sMDVX3s6LxmhWU=
|
||||
github.com/go-playground/validator/v10 v10.30.0/go.mod h1:oSuBIQzuJxL//3MelwSLD5hc2Tu889bF0Idm9Dg26cM=
|
||||
github.com/go-playground/validator/v10 v10.30.1 h1:f3zDSN/zOma+w6+1Wswgd9fLkdwy06ntQJp0BBvFG0w=
|
||||
github.com/go-playground/validator/v10 v10.30.1/go.mod h1:oSuBIQzuJxL//3MelwSLD5hc2Tu889bF0Idm9Dg26cM=
|
||||
github.com/go-sql-driver/mysql v1.9.3 h1:U/N249h2WzJ3Ukj8SowVFjdtZKfu9vlLZxjPXV1aweo=
|
||||
github.com/go-sql-driver/mysql v1.9.3/go.mod h1:qn46aNg1333BRMNU69Lq93t8du/dwxI64Gl8i5p1WMU=
|
||||
github.com/goccy/go-json v0.10.5 h1:Fq85nIqj+gXn/S5ahsiTlK3TmC85qgirsdTP/+DeaC4=
|
||||
|
|
@ -59,6 +63,8 @@ github.com/quic-go/qpack v0.6.0 h1:g7W+BMYynC1LbYLSqRt8PBg5Tgwxn214ZZR34VIOjz8=
|
|||
github.com/quic-go/qpack v0.6.0/go.mod h1:lUpLKChi8njB4ty2bFLX2x4gzDqXwUpaO1DP9qMDZII=
|
||||
github.com/quic-go/quic-go v0.57.1 h1:25KAAR9QR8KZrCZRThWMKVAwGoiHIrNbT72ULHTuI10=
|
||||
github.com/quic-go/quic-go v0.57.1/go.mod h1:ly4QBAjHA2VhdnxhojRsCUOeJwKYg+taDlos92xb1+s=
|
||||
github.com/quic-go/quic-go v0.58.0 h1:ggY2pvZaVdB9EyojxL1p+5mptkuHyX5MOSv4dgWF4Ug=
|
||||
github.com/quic-go/quic-go v0.58.0/go.mod h1:upnsH4Ju1YkqpLXC305eW3yDZ4NfnNbmQRCMWS58IKU=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
|
||||
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
|
||||
|
|
|
|||
|
|
@ -423,6 +423,17 @@ func connect() {
|
|||
"result": array,
|
||||
})
|
||||
|
||||
case "get-headname":
|
||||
err = db.QueryRow("SELECT IFNULL(employeename, '') AS result FROM employee WHERE is_head = 1").Scan(&result)
|
||||
if err != nil {
|
||||
c.AbortWithError(http.StatusBadRequest, err)
|
||||
c.String(http.StatusBadRequest, err.Error())
|
||||
return
|
||||
}
|
||||
c.JSON(http.StatusOK, gin.H{
|
||||
"result": result,
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
})
|
||||
|
|
|
|||
|
|
@ -33,11 +33,11 @@
|
|||
"solidjs-use": "^2.3.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@biomejs/biome": "^2.3.9",
|
||||
"@biomejs/biome": "^2.3.11",
|
||||
"@nanostores/solid": "^1.1.1",
|
||||
"@types/crypto-js": "^4.2.2",
|
||||
"@types/node": "^24.10.4",
|
||||
"sass-embedded": "^1.97.0",
|
||||
"sass-embedded": "^1.97.1",
|
||||
"typescript": "~5.8.3",
|
||||
"vite": "^7.3.0",
|
||||
"vite-plugin-compression2": "^2.4.0",
|
||||
|
|
|
|||
258
pnpm-lock.yaml
generated
258
pnpm-lock.yaml
generated
|
|
@ -73,8 +73,8 @@ importers:
|
|||
version: 2.3.0
|
||||
devDependencies:
|
||||
'@biomejs/biome':
|
||||
specifier: ^2.3.9
|
||||
version: 2.3.9
|
||||
specifier: ^2.3.11
|
||||
version: 2.3.11
|
||||
'@nanostores/solid':
|
||||
specifier: ^1.1.1
|
||||
version: 1.1.1(nanostores@1.1.0)(solid-js@1.9.10)
|
||||
|
|
@ -85,20 +85,20 @@ importers:
|
|||
specifier: ^24.10.4
|
||||
version: 24.10.4
|
||||
sass-embedded:
|
||||
specifier: ^1.97.0
|
||||
version: 1.97.0
|
||||
specifier: ^1.97.1
|
||||
version: 1.97.1
|
||||
typescript:
|
||||
specifier: ~5.8.3
|
||||
version: 5.8.3
|
||||
vite:
|
||||
specifier: ^7.3.0
|
||||
version: 7.3.0(@types/node@24.10.4)(sass-embedded@1.97.0)(sass@1.97.0)
|
||||
version: 7.3.0(@types/node@24.10.4)(sass-embedded@1.97.1)(sass@1.97.1)
|
||||
vite-plugin-compression2:
|
||||
specifier: ^2.4.0
|
||||
version: 2.4.0(rollup@4.52.1)
|
||||
vite-plugin-solid:
|
||||
specifier: ^2.11.10
|
||||
version: 2.11.10(solid-js@1.9.10)(vite@7.3.0(@types/node@24.10.4)(sass-embedded@1.97.0)(sass@1.97.0))
|
||||
version: 2.11.10(solid-js@1.9.10)(vite@7.3.0(@types/node@24.10.4)(sass-embedded@1.97.1)(sass@1.97.1))
|
||||
|
||||
packages:
|
||||
|
||||
|
|
@ -187,55 +187,55 @@ packages:
|
|||
resolution: {integrity: sha512-bkFqkLhh3pMBUQQkpVgWDWq/lqzc2678eUyDlTBhRqhCHFguYYGM0Efga7tYk4TogG/3x0EEl66/OQ+WGbWB/Q==}
|
||||
engines: {node: '>=6.9.0'}
|
||||
|
||||
'@biomejs/biome@2.3.9':
|
||||
resolution: {integrity: sha512-js+34KpnY65I00k8P71RH0Uh2rJk4BrpxMGM5m2nBfM9XTlKE5N1URn5ydILPRyXXq4ebhKCjsvR+txS+D4z2A==}
|
||||
'@biomejs/biome@2.3.11':
|
||||
resolution: {integrity: sha512-/zt+6qazBWguPG6+eWmiELqO+9jRsMZ/DBU3lfuU2ngtIQYzymocHhKiZRyrbra4aCOoyTg/BmY+6WH5mv9xmQ==}
|
||||
engines: {node: '>=14.21.3'}
|
||||
hasBin: true
|
||||
|
||||
'@biomejs/cli-darwin-arm64@2.3.9':
|
||||
resolution: {integrity: sha512-hHbYYnna/WBwem5iCpssQQLtm5ey8ADuDT8N2zqosk6LVWimlEuUnPy6Mbzgu4GWVriyL5ijWd+1zphX6ll4/A==}
|
||||
'@biomejs/cli-darwin-arm64@2.3.11':
|
||||
resolution: {integrity: sha512-/uXXkBcPKVQY7rc9Ys2CrlirBJYbpESEDme7RKiBD6MmqR2w3j0+ZZXRIL2xiaNPsIMMNhP1YnA+jRRxoOAFrA==}
|
||||
engines: {node: '>=14.21.3'}
|
||||
cpu: [arm64]
|
||||
os: [darwin]
|
||||
|
||||
'@biomejs/cli-darwin-x64@2.3.9':
|
||||
resolution: {integrity: sha512-sKMW5fpvGDmPdqCchtVH5MVlbVeSU3ad4CuKS45x8VHt3tNSC8CZ2QbxffAOKYK9v/mAeUiPC6Cx6+wtyU1q7g==}
|
||||
'@biomejs/cli-darwin-x64@2.3.11':
|
||||
resolution: {integrity: sha512-fh7nnvbweDPm2xEmFjfmq7zSUiox88plgdHF9OIW4i99WnXrAC3o2P3ag9judoUMv8FCSUnlwJCM1B64nO5Fbg==}
|
||||
engines: {node: '>=14.21.3'}
|
||||
cpu: [x64]
|
||||
os: [darwin]
|
||||
|
||||
'@biomejs/cli-linux-arm64-musl@2.3.9':
|
||||
resolution: {integrity: sha512-JOHyG2nl8XDpncbMazm1uBSi1dPX9VbQDOjKcfSVXTqajD0PsgodMOKyuZ/PkBu5Lw877sWMTGKfEfpM7jE7Cw==}
|
||||
'@biomejs/cli-linux-arm64-musl@2.3.11':
|
||||
resolution: {integrity: sha512-XPSQ+XIPZMLaZ6zveQdwNjbX+QdROEd1zPgMwD47zvHV+tCGB88VH+aynyGxAHdzL+Tm/+DtKST5SECs4iwCLg==}
|
||||
engines: {node: '>=14.21.3'}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
|
||||
'@biomejs/cli-linux-arm64@2.3.9':
|
||||
resolution: {integrity: sha512-BXBB6HbAgZI6T6QB8q6NSwIapVngqArP6K78BqkMerht7YjL6yWctqfeTnJm0qGF2bKBYFexslrbV+VTlM2E6g==}
|
||||
'@biomejs/cli-linux-arm64@2.3.11':
|
||||
resolution: {integrity: sha512-l4xkGa9E7Uc0/05qU2lMYfN1H+fzzkHgaJoy98wO+b/7Gl78srbCRRgwYSW+BTLixTBrM6Ede5NSBwt7rd/i6g==}
|
||||
engines: {node: '>=14.21.3'}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
|
||||
'@biomejs/cli-linux-x64-musl@2.3.9':
|
||||
resolution: {integrity: sha512-FUkb/5beCIC2trpqAbW9e095X4vamdlju80c1ExSmhfdrojLZnWkah/XfTSixKb/dQzbAjpD7vvs6rWkJ+P07Q==}
|
||||
'@biomejs/cli-linux-x64-musl@2.3.11':
|
||||
resolution: {integrity: sha512-vU7a8wLs5C9yJ4CB8a44r12aXYb8yYgBn+WeyzbMjaCMklzCv1oXr8x+VEyWodgJt9bDmhiaW/I0RHbn7rsNmw==}
|
||||
engines: {node: '>=14.21.3'}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
|
||||
'@biomejs/cli-linux-x64@2.3.9':
|
||||
resolution: {integrity: sha512-PjYuv2WLmvf0WtidxAkFjlElsn0P6qcvfPijrqu1j+3GoW3XSQh3ywGu7gZ25J25zrYj3KEovUjvUZB55ATrGw==}
|
||||
'@biomejs/cli-linux-x64@2.3.11':
|
||||
resolution: {integrity: sha512-/1s9V/H3cSe0r0Mv/Z8JryF5x9ywRxywomqZVLHAoa/uN0eY7F8gEngWKNS5vbbN/BsfpCG5yeBT5ENh50Frxg==}
|
||||
engines: {node: '>=14.21.3'}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
|
||||
'@biomejs/cli-win32-arm64@2.3.9':
|
||||
resolution: {integrity: sha512-w48Yh/XbYHO2cBw8B5laK3vCAEKuocX5ItGXVDAqFE7Ze2wnR00/1vkY6GXglfRDOjWHu2XtxI0WKQ52x1qxEA==}
|
||||
'@biomejs/cli-win32-arm64@2.3.11':
|
||||
resolution: {integrity: sha512-PZQ6ElCOnkYapSsysiTy0+fYX+agXPlWugh6+eQ6uPKI3vKAqNp6TnMhoM3oY2NltSB89hz59o8xIfOdyhi9Iw==}
|
||||
engines: {node: '>=14.21.3'}
|
||||
cpu: [arm64]
|
||||
os: [win32]
|
||||
|
||||
'@biomejs/cli-win32-x64@2.3.9':
|
||||
resolution: {integrity: sha512-90+J63VT7qImy9s3pkWL0ZX27VzVwMNCRzpLpe5yMzMYPbO1vcjL/w/Q5f/juAGMvP7a2Fd0H7IhAR6F7/i78A==}
|
||||
'@biomejs/cli-win32-x64@2.3.11':
|
||||
resolution: {integrity: sha512-43VrG813EW+b5+YbDbz31uUsheX+qFKCpXeY9kfdAx+ww3naKxeVkTD9zLIWxUPfJquANMHrmW3wbe/037G0Qg==}
|
||||
engines: {node: '>=14.21.3'}
|
||||
cpu: [x64]
|
||||
os: [win32]
|
||||
|
|
@ -1534,117 +1534,117 @@ packages:
|
|||
safe-buffer@5.2.1:
|
||||
resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==}
|
||||
|
||||
sass-embedded-all-unknown@1.97.0:
|
||||
resolution: {integrity: sha512-9F6MyQcwp3YiuGMk5bC7g9jL+D1KkW/ONQgrkoTQ7ALcmoPKmsauZg5WgRhLYW9UhpnGTgANrWrZdiREAR1YkA==}
|
||||
sass-embedded-all-unknown@1.97.1:
|
||||
resolution: {integrity: sha512-0au5gUNibfob7W/g+ycBx74O22CL8vwHiZdEDY6J0uzMkHPiSJk//h0iRf5AUnMArFHJjFd3urIiQIaoRKYa1Q==}
|
||||
cpu: ['!arm', '!arm64', '!riscv64', '!x64']
|
||||
|
||||
sass-embedded-android-arm64@1.97.0:
|
||||
resolution: {integrity: sha512-uDG/0DS6A+KRiOYUV1UNHBq67DHvO+/54Ja+dg8S5fl5uvPwZGHpJFheemA9R6vvddwyjGmzVacvCQxdmECcfQ==}
|
||||
sass-embedded-android-arm64@1.97.1:
|
||||
resolution: {integrity: sha512-h62DmOiS2Jn87s8+8GhJcMerJnTKa1IsIa9iIKjLiqbAvBDKCGUs027RugZkM+Zx7I+vhPq86PUXBYZ9EkRxdw==}
|
||||
engines: {node: '>=14.0.0'}
|
||||
cpu: [arm64]
|
||||
os: [android]
|
||||
|
||||
sass-embedded-android-arm@1.97.0:
|
||||
resolution: {integrity: sha512-VLxeVR5FMwSZoOliBY8Qy2trZCWYz3w4ILf0QZ68eep3mIQjtykY3BSKC2R/w9DkPQDNJXdgbgnxeOubC8k5xw==}
|
||||
sass-embedded-android-arm@1.97.1:
|
||||
resolution: {integrity: sha512-B5dlv4utJ+yC8ZpBeWTHwSZPVKRlqA8pcaD0FAzeNm/DelIFgQUQtt0UwgYoAI6wDIiie5uSVpMK9l2DaCbiBQ==}
|
||||
engines: {node: '>=14.0.0'}
|
||||
cpu: [arm]
|
||||
os: [android]
|
||||
|
||||
sass-embedded-android-riscv64@1.97.0:
|
||||
resolution: {integrity: sha512-yrwsyPR08CXW5Ggr0kI1jTUcKkBOtjODbDj11nRrBwyrXRqhf1obqfchQxTW0HlYT8VZmZGfnHvPNNDwOSdfZg==}
|
||||
sass-embedded-android-riscv64@1.97.1:
|
||||
resolution: {integrity: sha512-tGup88vgaXPnUHEgDMujrt5rfYadvkiVjRb/45FJTx2hQFoGVbmUXz5XqUFjIIbEjQ3kAJqp86A2jy11s43UiQ==}
|
||||
engines: {node: '>=14.0.0'}
|
||||
cpu: [riscv64]
|
||||
os: [android]
|
||||
|
||||
sass-embedded-android-x64@1.97.0:
|
||||
resolution: {integrity: sha512-a1QW1pFykLCtV8J3AZ+wtrwOx0ORZsW4orF6fOrBYL2sLhlzhB3iK+QzWezFvH5+FMgLQBC4xgYYk4NV9WCO9g==}
|
||||
sass-embedded-android-x64@1.97.1:
|
||||
resolution: {integrity: sha512-CAzKjjzu90LZduye2O9+UGX1oScMyF5/RVOa5CxACKALeIS+3XL3LVdV47kwKPoBv5B1aFUvGLscY0CR7jBAbg==}
|
||||
engines: {node: '>=14.0.0'}
|
||||
cpu: [x64]
|
||||
os: [android]
|
||||
|
||||
sass-embedded-darwin-arm64@1.97.0:
|
||||
resolution: {integrity: sha512-5XV42FEqhQEGFQ/w8HUk///k0XMHLyBt1j2alxTr9ZI77HqiAIl6kVZp0kxJ++gt/y3E6hKoMLngHHC6zIBR5A==}
|
||||
sass-embedded-darwin-arm64@1.97.1:
|
||||
resolution: {integrity: sha512-tyDzspzh5PbqdAFGtVKUXuf0up6Lff3c1U8J7+4Y7jW6AWRBnq95vTzIIxfnNifGCTI2fW5e7GAZpYygKpNwcw==}
|
||||
engines: {node: '>=14.0.0'}
|
||||
cpu: [arm64]
|
||||
os: [darwin]
|
||||
|
||||
sass-embedded-darwin-x64@1.97.0:
|
||||
resolution: {integrity: sha512-Kc0aKFfKPd/kz8mSGtRKTEN7FKnqs30iZf6APb0ZHMuvMVfOfdD+fZ/85htT+j5k2F+UUSFBpbx04W0gZW020A==}
|
||||
sass-embedded-darwin-x64@1.97.1:
|
||||
resolution: {integrity: sha512-FMrRuSPI2ICt2M2SYaLbiG4yxn86D6ae+XtrRdrrBMhWprAcB7Iyu67bgRzZkipMZNIKKeTR7EUvJHgZzi5ixQ==}
|
||||
engines: {node: '>=14.0.0'}
|
||||
cpu: [x64]
|
||||
os: [darwin]
|
||||
|
||||
sass-embedded-linux-arm64@1.97.0:
|
||||
resolution: {integrity: sha512-ofm9esPA9P0sB6wJPcDhQYjSDfa7RoVKD0IHvFPMrK9OLTKg8lw80/afH49a9URYeYiE4wFP76Fr9t+s7A6E1Q==}
|
||||
sass-embedded-linux-arm64@1.97.1:
|
||||
resolution: {integrity: sha512-im80gfDWRivw9Su3r3YaZmJaCATcJgu3CsCSLodPk1b1R2+X/E12zEQayvrl05EGT9PDwTtuiqKgS4ND4xjwVg==}
|
||||
engines: {node: '>=14.0.0'}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
|
||||
sass-embedded-linux-arm@1.97.0:
|
||||
resolution: {integrity: sha512-pwM5A1+w3l1T/FXwJNqZD0WukCENeRkgxPSpZmsO4/QNLdTpGCz16D5spYPQ7f7GZo9aNaHt1EaDLHCjlEA8LQ==}
|
||||
sass-embedded-linux-arm@1.97.1:
|
||||
resolution: {integrity: sha512-48VxaTUApLyx1NXFdZhKqI/7FYLmz8Ju3Ki2V/p+mhn5raHgAiYeFgn8O1WGxTOh+hBb9y3FdSR5a8MNTbmKMQ==}
|
||||
engines: {node: '>=14.0.0'}
|
||||
cpu: [arm]
|
||||
os: [linux]
|
||||
|
||||
sass-embedded-linux-musl-arm64@1.97.0:
|
||||
resolution: {integrity: sha512-8VF4nc7oUklhUGGAY0T6Ktd9T9ZFwoOsWje7ocOV57tjbocFp/eeAPqX1v2BpiZtMVURyYwaZsRSAL79DT7oRw==}
|
||||
sass-embedded-linux-musl-arm64@1.97.1:
|
||||
resolution: {integrity: sha512-kD35WSD9o0279Ptwid3Jnbovo1FYnuG2mayYk9z4ZI4mweXEK6vTu+tlvCE/MdF/zFKSj11qaxaH+uzXe2cO5A==}
|
||||
engines: {node: '>=14.0.0'}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
|
||||
sass-embedded-linux-musl-arm@1.97.0:
|
||||
resolution: {integrity: sha512-+rsW0OreW4sPtdXDewDESxJLJdxW3B0EL7ICajkRFs3KbeNdgOVnP5DJQ39hquAoZH0AcEEGcd6236ZMMzEbwQ==}
|
||||
sass-embedded-linux-musl-arm@1.97.1:
|
||||
resolution: {integrity: sha512-FUFs466t3PVViVOKY/60JgLLtl61Pf7OW+g5BeEfuqVcSvYUECVHeiYHtX1fT78PEVa0h9tHpM6XpWti+7WYFA==}
|
||||
engines: {node: '>=14.0.0'}
|
||||
cpu: [arm]
|
||||
os: [linux]
|
||||
|
||||
sass-embedded-linux-musl-riscv64@1.97.0:
|
||||
resolution: {integrity: sha512-nlaeeZ5P7tde/c/aMiIl5UduQZPA9ftEyWJxdmWcs3pASFSykslVJR5D4L161EUHzB5z+MxSnbbzcrck0F1slA==}
|
||||
sass-embedded-linux-musl-riscv64@1.97.1:
|
||||
resolution: {integrity: sha512-ZgpYps5YHuhA2+KiLkPukRbS5298QObgUhPll/gm5i0LOZleKCwrFELpVPcbhsSBuxqji2uaag5OL+n3JRBVVg==}
|
||||
engines: {node: '>=14.0.0'}
|
||||
cpu: [riscv64]
|
||||
os: [linux]
|
||||
|
||||
sass-embedded-linux-musl-x64@1.97.0:
|
||||
resolution: {integrity: sha512-QB6JLr2p1UuEXhiTXEYNypf+w2x/SCMY17vcnXKM47CeaJ88v2C9fJ9oVne6eZntlCylSow/vZCov0JMhklknA==}
|
||||
sass-embedded-linux-musl-x64@1.97.1:
|
||||
resolution: {integrity: sha512-wcAigOyyvZ6o1zVypWV7QLZqpOEVnlBqJr9MbpnRIm74qFTSbAEmShoh8yMXBymzuVSmEbThxAwW01/TLf62tA==}
|
||||
engines: {node: '>=14.0.0'}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
|
||||
sass-embedded-linux-riscv64@1.97.0:
|
||||
resolution: {integrity: sha512-m7QaK4M+YhQ6FZWMI9O8g4tqmM4JrvzJl/YC/eEJXpfgwxMeXsDsPVQWFiBdWOuxqMSH8WhFksw/Bg0J+kK6VQ==}
|
||||
sass-embedded-linux-riscv64@1.97.1:
|
||||
resolution: {integrity: sha512-9j1qE1ZrLMuGb+LUmBzw93Z4TNfqlRkkxjPVZy6u5vIggeSfvGbte7eRoYBNWX6SFew/yBCL90KXIirWFSGrlQ==}
|
||||
engines: {node: '>=14.0.0'}
|
||||
cpu: [riscv64]
|
||||
os: [linux]
|
||||
|
||||
sass-embedded-linux-x64@1.97.0:
|
||||
resolution: {integrity: sha512-yc7yLWJrAtTBCjEAoNxvE040EGYdsgmaWMSyI9LSIOFlSwrOc4x+W/8IMhLWCygTAgorNPuNlRfPDgkQm1sJmw==}
|
||||
sass-embedded-linux-x64@1.97.1:
|
||||
resolution: {integrity: sha512-7nrLFYMH/UgvEgXR5JxQJ6y9N4IJmnFnYoDxN0nw0jUp+CQWQL4EJ4RqAKTGelneueRbccvt2sEyPK+X0KJ9Jg==}
|
||||
engines: {node: '>=14.0.0'}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
|
||||
sass-embedded-unknown-all@1.97.0:
|
||||
resolution: {integrity: sha512-dDky3ETKeOo543myScL4sp3pj2cANLNKea5aR6v8ZCpDSCDTRxqv4Sj/goTmkVqnp/HOVF88qB3GHtQ8rFtULQ==}
|
||||
sass-embedded-unknown-all@1.97.1:
|
||||
resolution: {integrity: sha512-oPSeKc7vS2dx3ZJHiUhHKcyqNq0GWzAiR8zMVpPd/kVMl5ZfVyw+5HTCxxWDBGkX02lNpou27JkeBPCaneYGAQ==}
|
||||
os: ['!android', '!darwin', '!linux', '!win32']
|
||||
|
||||
sass-embedded-win32-arm64@1.97.0:
|
||||
resolution: {integrity: sha512-JMU2SKIgUJDw4oaKBcVbuobWRU6f2XmFuYqJdkxJhlITAGimwjZ860gttlzjNtZcVI4+p4ovT14HwpsEcIzfnw==}
|
||||
sass-embedded-win32-arm64@1.97.1:
|
||||
resolution: {integrity: sha512-L5j7J6CbZgHGwcfVedMVpM3z5MYeighcyZE8GF2DVmjWzZI3JtPKNY11wNTD/P9o1Uql10YPOKhGH0iWIXOT7Q==}
|
||||
engines: {node: '>=14.0.0'}
|
||||
cpu: [arm64]
|
||||
os: [win32]
|
||||
|
||||
sass-embedded-win32-x64@1.97.0:
|
||||
resolution: {integrity: sha512-mKIJGXxEl6OoWEoT4ee5OsBOfExla2ilY5J8tupVwSCxf/i3aOJNLm7ZzRWG9er2K3bC8aovgMisMIVGlBM5hw==}
|
||||
sass-embedded-win32-x64@1.97.1:
|
||||
resolution: {integrity: sha512-rfaZAKXU8cW3E7gvdafyD6YtgbEcsDeT99OEiHXRT0UGFuXT8qCOjpAwIKaOA3XXr2d8S42xx6cXcaZ1a+1fgw==}
|
||||
engines: {node: '>=14.0.0'}
|
||||
cpu: [x64]
|
||||
os: [win32]
|
||||
|
||||
sass-embedded@1.97.0:
|
||||
resolution: {integrity: sha512-Unwu0MtlAt9hQGHutB2NJhwhPcxiJX99AI7PSz7W4lkikQg9S/HYFtgxtIjpTB4DW7sOYX2xnxvtU/nep9HXTA==}
|
||||
sass-embedded@1.97.1:
|
||||
resolution: {integrity: sha512-wH3CbOThHYGX0bUyqFf7laLKyhVWIFc2lHynitkqMIUCtX2ixH9mQh0bN7+hkUu5BFt/SXvEMjFbkEbBMpQiSQ==}
|
||||
engines: {node: '>=16.0.0'}
|
||||
hasBin: true
|
||||
|
||||
sass@1.97.0:
|
||||
resolution: {integrity: sha512-KR0igP1z4avUJetEuIeOdDlwaUDvkH8wSx7FdSjyYBS3dpyX3TzHfAMO0G1Q4/3cdjcmi3r7idh+KCmKqS+KeQ==}
|
||||
sass@1.97.1:
|
||||
resolution: {integrity: sha512-uf6HoO8fy6ClsrShvMgaKUn14f2EHQLQRtpsZZLeU/Mv0Q1K5P0+x2uvH6Cub39TVVbWNSrraUhDAoFph6vh0A==}
|
||||
engines: {node: '>=14.0.0'}
|
||||
hasBin: true
|
||||
|
||||
|
|
@ -2016,39 +2016,39 @@ snapshots:
|
|||
'@babel/helper-string-parser': 7.27.1
|
||||
'@babel/helper-validator-identifier': 7.27.1
|
||||
|
||||
'@biomejs/biome@2.3.9':
|
||||
'@biomejs/biome@2.3.11':
|
||||
optionalDependencies:
|
||||
'@biomejs/cli-darwin-arm64': 2.3.9
|
||||
'@biomejs/cli-darwin-x64': 2.3.9
|
||||
'@biomejs/cli-linux-arm64': 2.3.9
|
||||
'@biomejs/cli-linux-arm64-musl': 2.3.9
|
||||
'@biomejs/cli-linux-x64': 2.3.9
|
||||
'@biomejs/cli-linux-x64-musl': 2.3.9
|
||||
'@biomejs/cli-win32-arm64': 2.3.9
|
||||
'@biomejs/cli-win32-x64': 2.3.9
|
||||
'@biomejs/cli-darwin-arm64': 2.3.11
|
||||
'@biomejs/cli-darwin-x64': 2.3.11
|
||||
'@biomejs/cli-linux-arm64': 2.3.11
|
||||
'@biomejs/cli-linux-arm64-musl': 2.3.11
|
||||
'@biomejs/cli-linux-x64': 2.3.11
|
||||
'@biomejs/cli-linux-x64-musl': 2.3.11
|
||||
'@biomejs/cli-win32-arm64': 2.3.11
|
||||
'@biomejs/cli-win32-x64': 2.3.11
|
||||
|
||||
'@biomejs/cli-darwin-arm64@2.3.9':
|
||||
'@biomejs/cli-darwin-arm64@2.3.11':
|
||||
optional: true
|
||||
|
||||
'@biomejs/cli-darwin-x64@2.3.9':
|
||||
'@biomejs/cli-darwin-x64@2.3.11':
|
||||
optional: true
|
||||
|
||||
'@biomejs/cli-linux-arm64-musl@2.3.9':
|
||||
'@biomejs/cli-linux-arm64-musl@2.3.11':
|
||||
optional: true
|
||||
|
||||
'@biomejs/cli-linux-arm64@2.3.9':
|
||||
'@biomejs/cli-linux-arm64@2.3.11':
|
||||
optional: true
|
||||
|
||||
'@biomejs/cli-linux-x64-musl@2.3.9':
|
||||
'@biomejs/cli-linux-x64-musl@2.3.11':
|
||||
optional: true
|
||||
|
||||
'@biomejs/cli-linux-x64@2.3.9':
|
||||
'@biomejs/cli-linux-x64@2.3.11':
|
||||
optional: true
|
||||
|
||||
'@biomejs/cli-win32-arm64@2.3.9':
|
||||
'@biomejs/cli-win32-arm64@2.3.11':
|
||||
optional: true
|
||||
|
||||
'@biomejs/cli-win32-x64@2.3.9':
|
||||
'@biomejs/cli-win32-x64@2.3.11':
|
||||
optional: true
|
||||
|
||||
'@bufbuild/protobuf@2.9.0': {}
|
||||
|
|
@ -3249,65 +3249,65 @@ snapshots:
|
|||
|
||||
safe-buffer@5.2.1: {}
|
||||
|
||||
sass-embedded-all-unknown@1.97.0:
|
||||
sass-embedded-all-unknown@1.97.1:
|
||||
dependencies:
|
||||
sass: 1.97.0
|
||||
sass: 1.97.1
|
||||
optional: true
|
||||
|
||||
sass-embedded-android-arm64@1.97.0:
|
||||
sass-embedded-android-arm64@1.97.1:
|
||||
optional: true
|
||||
|
||||
sass-embedded-android-arm@1.97.0:
|
||||
sass-embedded-android-arm@1.97.1:
|
||||
optional: true
|
||||
|
||||
sass-embedded-android-riscv64@1.97.0:
|
||||
sass-embedded-android-riscv64@1.97.1:
|
||||
optional: true
|
||||
|
||||
sass-embedded-android-x64@1.97.0:
|
||||
sass-embedded-android-x64@1.97.1:
|
||||
optional: true
|
||||
|
||||
sass-embedded-darwin-arm64@1.97.0:
|
||||
sass-embedded-darwin-arm64@1.97.1:
|
||||
optional: true
|
||||
|
||||
sass-embedded-darwin-x64@1.97.0:
|
||||
sass-embedded-darwin-x64@1.97.1:
|
||||
optional: true
|
||||
|
||||
sass-embedded-linux-arm64@1.97.0:
|
||||
sass-embedded-linux-arm64@1.97.1:
|
||||
optional: true
|
||||
|
||||
sass-embedded-linux-arm@1.97.0:
|
||||
sass-embedded-linux-arm@1.97.1:
|
||||
optional: true
|
||||
|
||||
sass-embedded-linux-musl-arm64@1.97.0:
|
||||
sass-embedded-linux-musl-arm64@1.97.1:
|
||||
optional: true
|
||||
|
||||
sass-embedded-linux-musl-arm@1.97.0:
|
||||
sass-embedded-linux-musl-arm@1.97.1:
|
||||
optional: true
|
||||
|
||||
sass-embedded-linux-musl-riscv64@1.97.0:
|
||||
sass-embedded-linux-musl-riscv64@1.97.1:
|
||||
optional: true
|
||||
|
||||
sass-embedded-linux-musl-x64@1.97.0:
|
||||
sass-embedded-linux-musl-x64@1.97.1:
|
||||
optional: true
|
||||
|
||||
sass-embedded-linux-riscv64@1.97.0:
|
||||
sass-embedded-linux-riscv64@1.97.1:
|
||||
optional: true
|
||||
|
||||
sass-embedded-linux-x64@1.97.0:
|
||||
sass-embedded-linux-x64@1.97.1:
|
||||
optional: true
|
||||
|
||||
sass-embedded-unknown-all@1.97.0:
|
||||
sass-embedded-unknown-all@1.97.1:
|
||||
dependencies:
|
||||
sass: 1.97.0
|
||||
sass: 1.97.1
|
||||
optional: true
|
||||
|
||||
sass-embedded-win32-arm64@1.97.0:
|
||||
sass-embedded-win32-arm64@1.97.1:
|
||||
optional: true
|
||||
|
||||
sass-embedded-win32-x64@1.97.0:
|
||||
sass-embedded-win32-x64@1.97.1:
|
||||
optional: true
|
||||
|
||||
sass-embedded@1.97.0:
|
||||
sass-embedded@1.97.1:
|
||||
dependencies:
|
||||
'@bufbuild/protobuf': 2.9.0
|
||||
buffer-builder: 0.2.0
|
||||
|
|
@ -3318,26 +3318,26 @@ snapshots:
|
|||
sync-child-process: 1.0.2
|
||||
varint: 6.0.0
|
||||
optionalDependencies:
|
||||
sass-embedded-all-unknown: 1.97.0
|
||||
sass-embedded-android-arm: 1.97.0
|
||||
sass-embedded-android-arm64: 1.97.0
|
||||
sass-embedded-android-riscv64: 1.97.0
|
||||
sass-embedded-android-x64: 1.97.0
|
||||
sass-embedded-darwin-arm64: 1.97.0
|
||||
sass-embedded-darwin-x64: 1.97.0
|
||||
sass-embedded-linux-arm: 1.97.0
|
||||
sass-embedded-linux-arm64: 1.97.0
|
||||
sass-embedded-linux-musl-arm: 1.97.0
|
||||
sass-embedded-linux-musl-arm64: 1.97.0
|
||||
sass-embedded-linux-musl-riscv64: 1.97.0
|
||||
sass-embedded-linux-musl-x64: 1.97.0
|
||||
sass-embedded-linux-riscv64: 1.97.0
|
||||
sass-embedded-linux-x64: 1.97.0
|
||||
sass-embedded-unknown-all: 1.97.0
|
||||
sass-embedded-win32-arm64: 1.97.0
|
||||
sass-embedded-win32-x64: 1.97.0
|
||||
sass-embedded-all-unknown: 1.97.1
|
||||
sass-embedded-android-arm: 1.97.1
|
||||
sass-embedded-android-arm64: 1.97.1
|
||||
sass-embedded-android-riscv64: 1.97.1
|
||||
sass-embedded-android-x64: 1.97.1
|
||||
sass-embedded-darwin-arm64: 1.97.1
|
||||
sass-embedded-darwin-x64: 1.97.1
|
||||
sass-embedded-linux-arm: 1.97.1
|
||||
sass-embedded-linux-arm64: 1.97.1
|
||||
sass-embedded-linux-musl-arm: 1.97.1
|
||||
sass-embedded-linux-musl-arm64: 1.97.1
|
||||
sass-embedded-linux-musl-riscv64: 1.97.1
|
||||
sass-embedded-linux-musl-x64: 1.97.1
|
||||
sass-embedded-linux-riscv64: 1.97.1
|
||||
sass-embedded-linux-x64: 1.97.1
|
||||
sass-embedded-unknown-all: 1.97.1
|
||||
sass-embedded-win32-arm64: 1.97.1
|
||||
sass-embedded-win32-x64: 1.97.1
|
||||
|
||||
sass@1.97.0:
|
||||
sass@1.97.1:
|
||||
dependencies:
|
||||
chokidar: 4.0.3
|
||||
immutable: 5.1.3
|
||||
|
|
@ -3524,7 +3524,7 @@ snapshots:
|
|||
transitivePeerDependencies:
|
||||
- rollup
|
||||
|
||||
vite-plugin-solid@2.11.10(solid-js@1.9.10)(vite@7.3.0(@types/node@24.10.4)(sass-embedded@1.97.0)(sass@1.97.0)):
|
||||
vite-plugin-solid@2.11.10(solid-js@1.9.10)(vite@7.3.0(@types/node@24.10.4)(sass-embedded@1.97.1)(sass@1.97.1)):
|
||||
dependencies:
|
||||
'@babel/core': 7.28.4
|
||||
'@types/babel__core': 7.20.5
|
||||
|
|
@ -3532,12 +3532,12 @@ snapshots:
|
|||
merge-anything: 5.1.7
|
||||
solid-js: 1.9.10
|
||||
solid-refresh: 0.6.3(solid-js@1.9.10)
|
||||
vite: 7.3.0(@types/node@24.10.4)(sass-embedded@1.97.0)(sass@1.97.0)
|
||||
vitefu: 1.1.1(vite@7.3.0(@types/node@24.10.4)(sass-embedded@1.97.0)(sass@1.97.0))
|
||||
vite: 7.3.0(@types/node@24.10.4)(sass-embedded@1.97.1)(sass@1.97.1)
|
||||
vitefu: 1.1.1(vite@7.3.0(@types/node@24.10.4)(sass-embedded@1.97.1)(sass@1.97.1))
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
vite@7.3.0(@types/node@24.10.4)(sass-embedded@1.97.0)(sass@1.97.0):
|
||||
vite@7.3.0(@types/node@24.10.4)(sass-embedded@1.97.1)(sass@1.97.1):
|
||||
dependencies:
|
||||
esbuild: 0.27.2
|
||||
fdir: 6.5.0(picomatch@4.0.3)
|
||||
|
|
@ -3548,12 +3548,12 @@ snapshots:
|
|||
optionalDependencies:
|
||||
'@types/node': 24.10.4
|
||||
fsevents: 2.3.3
|
||||
sass: 1.97.0
|
||||
sass-embedded: 1.97.0
|
||||
sass: 1.97.1
|
||||
sass-embedded: 1.97.1
|
||||
|
||||
vitefu@1.1.1(vite@7.3.0(@types/node@24.10.4)(sass-embedded@1.97.0)(sass@1.97.0)):
|
||||
vitefu@1.1.1(vite@7.3.0(@types/node@24.10.4)(sass-embedded@1.97.1)(sass@1.97.1)):
|
||||
optionalDependencies:
|
||||
vite: 7.3.0(@types/node@24.10.4)(sass-embedded@1.97.0)(sass@1.97.0)
|
||||
vite: 7.3.0(@types/node@24.10.4)(sass-embedded@1.97.1)(sass@1.97.1)
|
||||
|
||||
webworkify@1.5.0: {}
|
||||
|
||||
|
|
|
|||
39
src/components/Switch/Switch.sass
Normal file
39
src/components/Switch/Switch.sass
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
.switch
|
||||
display: inline-flex
|
||||
align-items: center
|
||||
cursor: pointer
|
||||
|
||||
&__control
|
||||
display: inline-flex
|
||||
align-items: center
|
||||
height: 24px
|
||||
width: 44px
|
||||
border: 1px solid rgba(195, 195, 195, 0.9)
|
||||
border-radius: 12px
|
||||
padding: 0 2px
|
||||
background-color: rgba(202, 202, 202, 0.9)
|
||||
transition: 250ms background-color
|
||||
|
||||
&__input:focus-visible + &__control
|
||||
outline: 2px solid hsl(200 98% 39%)
|
||||
outline-offset: 2px
|
||||
|
||||
&__control[data-checked]
|
||||
border-color: rgb(75, 117, 158)
|
||||
background-color: rgb(72, 111, 149)
|
||||
|
||||
&__thumb
|
||||
height: 20px
|
||||
width: 20px
|
||||
border-radius: 10px
|
||||
background-color: white
|
||||
transition: 250ms transform
|
||||
|
||||
&__thumb[data-checked]
|
||||
transform: translateX(calc(100% - 1px))
|
||||
|
||||
&__label
|
||||
margin-right: 1rem
|
||||
color: white
|
||||
font-size: 1rem
|
||||
user-select: none
|
||||
25
src/components/Switch/Switch.tsx
Normal file
25
src/components/Switch/Switch.tsx
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
import { Switch } from "@kobalte/core/switch";
|
||||
import "./Switch.sass";
|
||||
import { Show } from "solid-js/web";
|
||||
|
||||
interface Props {
|
||||
label: string
|
||||
checked: boolean
|
||||
onChange: () => void
|
||||
}
|
||||
|
||||
export default (props: Props) => {
|
||||
return (
|
||||
<>
|
||||
<Switch class="switch" checked={props.checked} onChange={props.onChange}>
|
||||
<Show when={props.label}>
|
||||
<Switch.Label class="switch__label">{props.label}</Switch.Label>
|
||||
</Show>
|
||||
<Switch.Input class="switch__input" />
|
||||
<Switch.Control class="switch__control">
|
||||
<Switch.Thumb class="switch__thumb" />
|
||||
</Switch.Control>
|
||||
</Switch>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
|
@ -22,6 +22,7 @@ export { default as Input } from './Input/Input'
|
|||
export { default as Radio } from './Radio/Radio'
|
||||
export { default as Copyright } from './Copyright/Copyright'
|
||||
export { default as Clickable } from './Clickable/Clickable'
|
||||
export { default as Switch } from './Switch/Switch'
|
||||
// export { default as OptimizeBackground } from './Optimizers/OptimizeBackground'
|
||||
// export { default as OptimizeImage } from './Optimizers/OptimizeImage'
|
||||
// export { default as OptimizeLogo } from './Optimizers/OptimizeLogo'
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
@use '/src/styles/variables.sass' as vars
|
||||
@use '/src/styles/classes.sass'
|
||||
@use 'sass:color'
|
||||
|
||||
.modal
|
||||
font-weight: 500
|
||||
|
|
@ -52,5 +54,29 @@
|
|||
font-weight: 700
|
||||
padding: 0.5rem 1rem
|
||||
|
||||
.profile
|
||||
cursor: pointer
|
||||
.config
|
||||
display: flex
|
||||
flex-direction: column
|
||||
gap: 1rem
|
||||
|
||||
&__row
|
||||
display: flex
|
||||
flex-direction: column
|
||||
gap: 0.5rem
|
||||
|
||||
&__edit
|
||||
padding: 1rem 0 0 0
|
||||
display: flex
|
||||
flex-direction: column
|
||||
gap: 0.5rem
|
||||
|
||||
&__title
|
||||
font-weight: bold
|
||||
font-size: 1.15rem
|
||||
|
||||
&__info
|
||||
font-size: 0.75rem
|
||||
opacity: 0.6
|
||||
|
||||
&__button
|
||||
padding: 1rem 0 0 0
|
||||
|
|
|
|||
|
|
@ -32,9 +32,9 @@ import {
|
|||
_type,
|
||||
_units,
|
||||
} from '../../stores/pdfinfo.ts';
|
||||
import { checkConnection, createPdfElectrical, createPdfOccupancy, getApi, getApiMulti, postApi, statusPopsApi, voidPopsApi } from '../../utils/functions/index.ts';
|
||||
import { checkConnection, createPdfElectrical, createPdfOccupancy, getApi, getApiMulti, postApi, statusPopsApi, voidPopsApi, saveNewName, saveNewPassword } from '../../utils/functions/index.ts';
|
||||
import './Assessor.sass';
|
||||
// import { AiOutlineQuestionCircle } from 'solid-icons/ai'
|
||||
import { FaSolidUserGear } from 'solid-icons/fa'
|
||||
|
||||
const PESO = import.meta.env.VITE_PESO
|
||||
|
||||
|
|
@ -60,6 +60,16 @@ export default () => {
|
|||
const [printed, setPrinted] = createSignal(false)
|
||||
const [printedApplication, setPrintedApplication] = createSignal('')
|
||||
|
||||
const [openConfig, setOpenConfig] = createSignal(false)
|
||||
const [configEncPassword, setConfigEncPassword] = createSignal('')
|
||||
const [configNewName, setConfigNewName] = createSignal('')
|
||||
const [configPassword, setConfigPassword] = createSignal('')
|
||||
const [configNewPassword, setConfigNewPassword] = createSignal('')
|
||||
const [configNewEncPassword, setConfigNewEncPassword] = createSignal('')
|
||||
const [configError, setConfigError] = createSignal('')
|
||||
|
||||
const [configNotification, setConfigNotification] = createSignal(false)
|
||||
|
||||
const [isBuilding, setIsBuilding] = createSignal(false)
|
||||
const [isOccupancy, setIsOccupancy] = createSignal(false)
|
||||
const [isElectrical, setIsElectrical] = createSignal(false)
|
||||
|
|
@ -484,10 +494,10 @@ export default () => {
|
|||
navigate('/')
|
||||
}
|
||||
|
||||
const gotoProfile = () => {
|
||||
sessionStorage.setItem('name', employeeName())
|
||||
navigate('/profile')
|
||||
}
|
||||
// const gotoProfile = () => {
|
||||
// sessionStorage.setItem('name', employeeName())
|
||||
// navigate('/profile')
|
||||
// }
|
||||
|
||||
const voidPopsOp = async (application: string) => {
|
||||
const response = await voidPopsApi(application)
|
||||
|
|
@ -500,6 +510,13 @@ export default () => {
|
|||
return response
|
||||
}
|
||||
|
||||
const saveConfig = async () => {
|
||||
if (configNewName() !== '') await saveNewName(parseInt(employeeId()), configNewName())
|
||||
if (configNewPassword() !== '') await saveNewPassword(parseInt(employeeId()), configNewEncPassword())
|
||||
|
||||
setConfigNotification(true)
|
||||
}
|
||||
|
||||
onMount(async () => {
|
||||
const logged = await checkLogged()
|
||||
|
||||
|
|
@ -539,10 +556,16 @@ export default () => {
|
|||
|
||||
<Row content="left" gap={1}>
|
||||
<Box curved thickness={0} padding="1.25rem 2.25rem" background="#0f131d56">
|
||||
<span class="profile" onClick={gotoProfile}>
|
||||
<span class="profile">
|
||||
{employeeName()}
|
||||
</span>
|
||||
</Box>
|
||||
<Clickable onClick={() => setOpenConfig(true)}>
|
||||
<Row gap={0.5}>
|
||||
<FaSolidUserGear size={25} />
|
||||
<span>Config</span>
|
||||
</Row>
|
||||
</Clickable>
|
||||
<Clickable onClick={logout}>
|
||||
<Row gap={0.5}>
|
||||
<FiLogOut size={25} />
|
||||
|
|
@ -939,6 +962,51 @@ export default () => {
|
|||
</Padding>
|
||||
</Modal>
|
||||
</div>
|
||||
|
||||
<Modal trigger={openConfig()} background="#16212c" color="#ffffffed" opacity={0.8}>
|
||||
<Padding top={1} bottom={1} left={4} right={4}>
|
||||
<section class='config'>
|
||||
<div class='config__row'>
|
||||
Name:
|
||||
<span>{employeeName()}</span>
|
||||
</div>
|
||||
|
||||
<div class='config__row'>
|
||||
Encrypted Password:
|
||||
<span>{configEncPassword()}</span>
|
||||
</div>
|
||||
|
||||
<div class='config__edit'>
|
||||
<span class='config__edit__title'>Change Displayed Name</span>
|
||||
<Input value={configNewName()} onChange={setConfigNewName} placeholder='Enter new name' />
|
||||
<span class='config__edit__info'>Leave blank to remain unchanged.</span>
|
||||
</div>
|
||||
|
||||
<div class='config__edit'>
|
||||
<span class='config__edit__title'>Change Password</span>
|
||||
<Input value={configPassword()} onChange={setConfigPassword} placeholder='Enter current password' />
|
||||
<Input value={configNewPassword()} onChange={setConfigNewPassword} placeholder='Enter new password' />
|
||||
|
||||
<Show when={configNewPassword().length !== 0}>
|
||||
<span style="padding: 1rem 0 0 0">New Encrypted Password:</span>
|
||||
<span>{configNewEncPassword()}</span>
|
||||
</Show>
|
||||
</div>
|
||||
|
||||
<Show when={configError() !== ''}>
|
||||
<span class="required-config">{configError()}</span>
|
||||
<Button label='Cancel' edges='curved' design='bo-danger' onClick={() => setOpenConfig(false)} wide />
|
||||
</Show>
|
||||
|
||||
<div class='config__button'>
|
||||
<Show when={configError() === ''}>
|
||||
<Button label='Confirm' edges='curved' design='bo-primary' onClick={saveConfig} wide />
|
||||
<Button label='Cancel' edges='curved' design='bo-danger' onClick={() => setOpenConfig(false)} wide />
|
||||
</Show>
|
||||
</div>
|
||||
</section>
|
||||
</Padding>
|
||||
</Modal >
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
.approver-name
|
||||
font-size: 1.25rem
|
||||
|
||||
.required
|
||||
.required-login
|
||||
padding: 1rem
|
||||
border-radius: 8px
|
||||
background-color: color.adjust(#0D64E4, $blackness: 20%)
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import { useNavigate } from '@solidjs/router'
|
|||
import { IoChevronBack } from 'solid-icons/io'
|
||||
import { createEffect, createSignal } from 'solid-js'
|
||||
import { Show } from 'solid-js/web'
|
||||
import { Box, Button, Column, Combobox, Display, Input, Link, Logo, Modal, Padding, Page, Radio, Row } from '../../components'
|
||||
import { Box, Button, Column, Combobox, Display, Input, Link, Logo, Modal, Padding, Page, Radio, Row, Switch } from '../../components'
|
||||
import { _employeeId, _employeeName } from '../../stores/employee'
|
||||
import { checkConnection, getApi, securePassword } from '../../utils/functions'
|
||||
import './Login.sass'
|
||||
|
|
@ -19,6 +19,7 @@ export default () => {
|
|||
const [loggedin, setLoggedin] = createSignal(0)
|
||||
const [errorMessage, setErrorMessage] = createSignal('')
|
||||
const [connected, setConnected] = createSignal(true)
|
||||
const [encryptionVersion, setEncryptionVersion] = createSignal('v1')
|
||||
|
||||
const login = async () => {
|
||||
setConnected(await checkConnection())
|
||||
|
|
@ -29,7 +30,7 @@ export default () => {
|
|||
|
||||
const employeeid = await getApi('get-employeeid', name())
|
||||
const dbpassword = await getApi('get-password', employeeid)
|
||||
const hashPassword = await securePassword(password())
|
||||
const hashPassword = await securePassword(password(), encryptionVersion())
|
||||
|
||||
if (dbpassword === '0') {
|
||||
setErrorMessage('Not yet registered. Please proceed to Registration.')
|
||||
|
|
@ -105,6 +106,9 @@ export default () => {
|
|||
<Row>
|
||||
<span class="box-title">Login</span>
|
||||
</Row>
|
||||
<Row content='right'>
|
||||
<Switch label={`Enc ${encryptionVersion()}`} checked={encryptionVersion() === 'v1' ? false : true} onChange={() => encryptionVersion() === 'v1' ? setEncryptionVersion('v2') : setEncryptionVersion('v1')} />
|
||||
</Row>
|
||||
|
||||
<Padding top={2} left={2} right={2} bottom={0}>
|
||||
<Row>
|
||||
|
|
@ -137,19 +141,19 @@ export default () => {
|
|||
|
||||
<Show when={!password() && name()}>
|
||||
<Row>
|
||||
<span class="required">Required password</span>
|
||||
<span class="required-login">Required password</span>
|
||||
</Row>
|
||||
</Show>
|
||||
|
||||
<Show when={!password() && !name()}>
|
||||
<Row>
|
||||
<span class="required">Required name and password</span>
|
||||
<span class="required-login">Required name and password</span>
|
||||
</Row>
|
||||
</Show>
|
||||
|
||||
<Show when={password() && !name()}>
|
||||
<Row>
|
||||
<span class="required">Required name</span>
|
||||
<span class="required-login">Required name</span>
|
||||
</Row>
|
||||
</Show>
|
||||
</Padding>
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ h1
|
|||
&__button
|
||||
padding: 1rem 0 0 0
|
||||
|
||||
.required
|
||||
.required-config
|
||||
padding: 0.75rem 1rem
|
||||
border-radius: 8px
|
||||
background-color: color.adjust(#0D64E4, $blackness: 20%)
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import { FiLogOut } from 'solid-icons/fi'
|
|||
import { VsRefresh } from 'solid-icons/vs'
|
||||
import { createSignal, onMount, createEffect } from 'solid-js'
|
||||
import { Box, Button, Clickable, Column, Link, Logo, Modal, ModalButton, Padding, Page, Row, Input } from '../../components/'
|
||||
import { checkConnection, getApi, getApiMulti, postApi, securePassword } from '../../utils/functions'
|
||||
import { checkConnection, getApi, getApiMulti, postApi, saveNewName, saveNewPassword, securePassword } from '../../utils/functions'
|
||||
import { FaSolidUserGear } from 'solid-icons/fa'
|
||||
import { Show } from 'solid-js/web'
|
||||
import './Main.sass'
|
||||
|
|
@ -322,7 +322,7 @@ export default () => {
|
|||
}
|
||||
|
||||
const checkCurrentPassword = async () => {
|
||||
const encCurrentPassword = await securePassword(configPassword())
|
||||
const encCurrentPassword = await securePassword(configPassword(), 'v2')
|
||||
if (encCurrentPassword === configEncPassword()) {
|
||||
if (configNewPassword() === '') {
|
||||
setConfigError('New Password not provided')
|
||||
|
|
@ -339,39 +339,39 @@ export default () => {
|
|||
}
|
||||
|
||||
const encryptNewPassword = async () => {
|
||||
const encNewPassword = await securePassword(configNewPassword())
|
||||
const encNewPassword = await securePassword(configNewPassword(), 'v2')
|
||||
setConfigNewEncPassword(encNewPassword)
|
||||
}
|
||||
|
||||
const saveConfig = async () => {
|
||||
if (configNewName() !== '') await saveNewName(configNewName())
|
||||
if (configNewPassword() !== '') await saveNewPassword(configNewEncPassword())
|
||||
if (configNewName() !== '') await saveNewName(parseInt(ID), configNewName())
|
||||
if (configNewPassword() !== '') await saveNewPassword(parseInt(ID), configNewEncPassword())
|
||||
|
||||
setConfigNotification(true)
|
||||
}
|
||||
|
||||
const saveNewName = async (name: string) => {
|
||||
await postApi('update-name', {
|
||||
data: parseInt(ID),
|
||||
data2: name
|
||||
})
|
||||
}
|
||||
// const saveNewName = async (name: string) => {
|
||||
// await postApi('update-name', {
|
||||
// data: parseInt(ID),
|
||||
// data2: name
|
||||
// })
|
||||
// }
|
||||
|
||||
const saveNewPassword = async (password: string) => {
|
||||
await postApi('update-password', {
|
||||
data: parseInt(ID),
|
||||
data2: password
|
||||
})
|
||||
}
|
||||
// const saveNewPassword = async (password: string) => {
|
||||
// await postApi('update-password', {
|
||||
// data: parseInt(ID),
|
||||
// data2: password
|
||||
// })
|
||||
// }
|
||||
|
||||
const logout = async () => {
|
||||
removeEmployee()
|
||||
navigate('/')
|
||||
}
|
||||
|
||||
const gotoProfile = () => {
|
||||
navigate('/profile')
|
||||
}
|
||||
// const gotoProfile = () => {
|
||||
// navigate('/profile')
|
||||
// }
|
||||
|
||||
onMount(async () => {
|
||||
const logged = await checkLogged()
|
||||
|
|
@ -407,7 +407,7 @@ export default () => {
|
|||
|
||||
<Row content="left" gap={1.5}>
|
||||
<Box curved thickness={0} padding="1.25rem 2.25rem" background="#0f131d56">
|
||||
<span onClick={gotoProfile} class="name">{employeeName()}</span>
|
||||
<span class="name">{employeeName()}</span>
|
||||
</Box>
|
||||
<Clickable onClick={() => setOpenConfig(true)}>
|
||||
<Row gap={0.5}>
|
||||
|
|
@ -770,7 +770,7 @@ export default () => {
|
|||
</div>
|
||||
|
||||
<Show when={configError() !== ''}>
|
||||
<span class="required">{configError()}</span>
|
||||
<span class="required-config">{configError()}</span>
|
||||
<Button label='Cancel' edges='curved' design='bo-danger' onClick={() => setOpenConfig(false)} wide />
|
||||
</Show>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import { lazy } from 'solid-js'
|
||||
import type { RouteDefinition } from '@solidjs/router'
|
||||
|
||||
import Index from './pages/IndexPage/Index'
|
||||
import { lazy } from 'solid-js'
|
||||
|
||||
export const routes: RouteDefinition[] = [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -122,3 +122,11 @@
|
|||
&__disabled
|
||||
@extend .table
|
||||
cursor: not-allowed
|
||||
|
||||
.required-config
|
||||
padding: 0.75rem 1rem
|
||||
border-radius: 8px
|
||||
background-color: color.adjust(#0D64E4, $blackness: 20%)
|
||||
opacity: 0.6
|
||||
text-align: center
|
||||
margin: 1rem 0 -0.75rem 0
|
||||
|
|
|
|||
|
|
@ -7,3 +7,5 @@ export { default as postApi } from './postApi.ts';
|
|||
export { default as statusPopsApi } from './statusPopsApi.ts';
|
||||
export { default as voidPopsApi } from './voidPopsApi.ts';
|
||||
export { default as securePassword } from './securePassword.ts';
|
||||
export { default as saveNewName } from './saveNewName.ts';
|
||||
export { default as saveNewPassword } from './saveNewPassword.ts';
|
||||
|
|
|
|||
8
src/utils/functions/saveNewName.ts
Normal file
8
src/utils/functions/saveNewName.ts
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
import { postApi } from './index.ts'
|
||||
|
||||
export default async(id: number, name: string) => {
|
||||
await postApi('update-name', {
|
||||
data: id,
|
||||
data2: name
|
||||
})
|
||||
}
|
||||
8
src/utils/functions/saveNewPassword.ts
Normal file
8
src/utils/functions/saveNewPassword.ts
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
import { postApi } from './index.ts'
|
||||
|
||||
export default async(id: number, password: string) => {
|
||||
await postApi('update-password', {
|
||||
data: id,
|
||||
data2: password
|
||||
})
|
||||
}
|
||||
|
|
@ -1,8 +1,10 @@
|
|||
import { SHA1, SHA384 } from 'crypto-js'
|
||||
import { SHA1, SHA384, SHA3 } from 'crypto-js'
|
||||
|
||||
export default async (password: string) => {
|
||||
type versions = 'v1' | 'v2'
|
||||
|
||||
export default async (password: string, version: versions) => {
|
||||
const firstHashing = SHA1(password)
|
||||
const secondHashing = SHA384(firstHashing.toString())
|
||||
const secondHashing = version === 'v1' ? SHA3(firstHashing.toString()) : SHA384(firstHashing.toString())
|
||||
const thirdHashing = SHA1(secondHashing.toString())
|
||||
|
||||
return thirdHashing.toString()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue