684 Commits

Author SHA1 Message Date
Samuele Locatelli 52a52b3993 Merge tag 'FixUserPwd01' into develop
Fix stringhe connessione con utente dedicato
2024-08-19 10:48:38 +02:00
Samuele Locatelli 6f243eb188 Merge branch 'release/FixUserPwd01' 2024-08-19 10:47:36 +02:00
Samuele Locatelli 28a7c403d9 Merge branch 'net8.0' into develop 2024-08-19 10:44:44 +02:00
Samuele Locatelli f4f2b7c857 Merge branch 'net8.0' of https://gitlab.steamware.net/steamware/gpw_next into net8.0 2024-08-19 10:44:34 +02:00
Samuele Locatelli 3d6e818b8d Update connString user 2024-08-19 10:44:30 +02:00
Samuele E. Locatelli ec48ab08b0 Aggiunto servizio server clock (NON ok) 2024-08-15 15:36:14 +02:00
Samuele Locatelli d5a2406704 update x cache parametri su prerendering 2024-08-09 18:43:57 +02:00
Samuele Locatelli 2044515ce4 Bozza soluzione hybrid dotnet 8.0 2024-08-09 18:10:41 +02:00
Samuele Locatelli 3000a43330 Merge tag 'FixReloadHome01' into develop
Update gestione reset rilettura pagina
2024-08-07 16:23:51 +02:00
Samuele Locatelli 61fafe9236 Merge branch 'release/FixReloadHome01' 2024-08-07 16:23:23 +02:00
Samuele Locatelli 3879bcc6f3 Reorg codice 2024-08-07 16:22:39 +02:00
Samuele Locatelli b678109ec0 Update reload home 2024-08-07 16:16:53 +02:00
Samuele Locatelli 67a3f582bf Merge tag 'FixEntrataStep01' into develop
Fix gestione arrotondamento entrata in worklog
2024-08-05 19:29:43 +02:00
Samuele Locatelli 0d08c57112 Merge branch 'release/FixEntrataStep01' 2024-08-05 19:29:08 +02:00
Samuele Locatelli a62d1688b1 Fix calcolo e display giornata cona rrotondamento ingresso 2024-08-05 19:28:17 +02:00
Samuele Locatelli d3ef9ce45f Merge tag 'AddRobotCacheVeto06' into develop
Fix commenti in RegNewDevice
2024-07-23 12:08:21 +02:00
Samuele Locatelli 46f3146d85 Merge branch 'release/AddRobotCacheVeto06' 2024-07-23 12:08:14 +02:00
Samuele Locatelli 22c9e1186c Fix commenti anche in regNewDevice 2024-07-23 12:08:02 +02:00
Samuele Locatelli e60dc2e172 Merge tag 'AddRobotCacheVeto05' into develop
Fix typo commento reset pagine offline
2024-07-23 11:55:07 +02:00
Samuele Locatelli 14bcf025e0 Merge branch 'release/AddRobotCacheVeto05' 2024-07-23 11:54:57 +02:00
Samuele Locatelli 0713f3d52d Typo commento 2024-07-23 11:54:39 +02:00
Samuele Locatelli 10ce6709dc Merge tag 'AddRobotCacheVeto04' into develop
Aggiunto link istruzioni x fix pagine offline
2024-07-23 11:41:59 +02:00
Samuele Locatelli b415cb6b53 Merge branch 'release/AddRobotCacheVeto04' 2024-07-23 11:41:43 +02:00
Samuele Locatelli 1ccfd55a1c Aggiunta nota x fix gestione pagine offline 2024-07-23 11:41:27 +02:00
Samuele Locatelli bcea43806b Merge tag 'AddRobotCacheVeto03' into develop
Fix typo nocache e levato overlay che non funziona
2024-07-23 11:11:43 +02:00
Samuele Locatelli e1de4d2bde Merge branch 'release/AddRobotCacheVeto03' 2024-07-23 11:11:31 +02:00
Samuele Locatelli 5f7ce2ee5c Refresh meta nocache 2024-07-23 11:11:20 +02:00
Samuele Locatelli 1b1855c8f4 Commentato overlay 2024-07-23 11:10:47 +02:00
Samuele Locatelli 0aafcc6770 Merge tag 'FixSmartPwd01' into develop
Fix smart pwd x invio reset link
2024-07-23 11:06:14 +02:00
Samuele Locatelli f947f98e39 Merge branch 'release/FixSmartPwd01' 2024-07-23 11:06:04 +02:00
Samuele Locatelli 3ba140305e Fix recupero email x reset 2024-07-23 11:05:26 +02:00
Samuele Locatelli dcae718f75 Merge tag 'AddRobotCacheVeto02' into develop
Update x evitare reload con overlay (2 test)
2024-07-23 10:48:41 +02:00
Samuele Locatelli 921cbed53b Merge branch 'release/AddRobotCacheVeto02' 2024-07-23 10:48:31 +02:00
Samuele Locatelli dc43f4fe18 Test num2 gestione offline 2024-07-23 10:45:38 +02:00
Samuele Locatelli 76f7c0d05c Merge tag 'AddRobotCacheVeto01' into develop
Aggiunto veto cache (robot) da VALIDARE
2024-07-23 10:09:42 +02:00
Samuele Locatelli 4adda8deaf Merge branch 'release/AddRobotCacheVeto01' 2024-07-23 10:09:21 +02:00
Samuele Locatelli 236858e4dd COnf x evitare cache (forse) + fix gestione abse URI 2024-07-23 10:08:56 +02:00
Samuele Locatelli 2367b25c3c Merge tag 'FixEmailSendRev02' into develop
Aggiunto log x ogni invio email da API
2024-07-05 08:23:48 +02:00
Samuele Locatelli 840b27e452 Merge branch 'release/FixEmailSendRev02' 2024-07-05 08:23:13 +02:00
Samuele Locatelli 09cb7fd30c Update x log invio email GPW 2024-07-05 08:22:55 +02:00
Samuele Locatelli c53452bf98 Merge tag 'FixEmailSendRev0' into develop
Fix gestione conf email, tolto rev management e test, aggiunto chaimata
realmente async invio
2024-07-04 12:13:14 +02:00
Samuele Locatelli fd99bf78dd Merge branch 'release/FixEmailSendRev0' 2024-07-04 12:12:22 +02:00
Samuele Locatelli 9c0aa41620 FIX gestione conf password in reverse 2024-07-04 12:11:47 +02:00
Samuele Locatelli 01647b74b4 fix conf x email sender 2024-07-03 11:40:28 +02:00
Samuele Locatelli 573c967670 Merge tag 'AddCheckRegAtt02' into develop
Aggiunta Activity History
2024-07-02 17:51:09 +02:00
Samuele Locatelli 0c2b819fb3 Merge branch 'release/AddCheckRegAtt02' 2024-07-02 17:51:03 +02:00
Samuele Locatelli 1e0d2746c6 Update x visualizzazione ActivityHistory 2024-07-02 17:50:47 +02:00
Samuele Locatelli 60ed02f452 Merge tag 'AddCheckRegAtt01' into develop
Aggiunta check inizio/fine e periodi validità insert reg attività
2024-07-02 10:48:01 +02:00
Samuele Locatelli 0cbea6a055 Merge branch 'release/AddCheckRegAtt01' 2024-07-02 10:47:42 +02:00
Samuele Locatelli 0302aee0e8 Aggiunta criteri controllo validità periodo inizio/fine attività 2024-07-02 10:46:55 +02:00
Samuele Locatelli ba96677c80 Cambio colore sidebar x indicare modifiche 2024-07-02 08:34:24 +02:00
Samuele Locatelli fe42629e0e Merge tag 'FixAuthUrlKey02' into develop
Fix if/else url
2024-06-25 08:33:29 +02:00
Samuele Locatelli e2627ffb8d Merge branch 'release/FixAuthUrlKey02' 2024-06-25 08:32:12 +02:00
Samuele Locatelli 955ee08a45 Fix if/else jumper 2024-06-25 08:31:55 +02:00
Samuele Locatelli c0c3bd65e9 Merge tag 'FixAuthUrlKey' into develop
Fix chiave utente in URL x core smart
2024-06-25 08:07:10 +02:00
Samuele Locatelli c5a0d1595b Merge branch 'release/FixAuthUrlKey' 2024-06-25 08:07:00 +02:00
Samuele Locatelli d53a89b95e fix chaive old/new mancante 2024-06-25 08:06:36 +02:00
Samuele Locatelli 212b6abfef Fix ricerca chiave auth formato old/new x CORE SMART 2024-06-25 08:06:20 +02:00
Samuele Locatelli ed249951e2 Merge tag 'AddEmailToResp02' into develop
Fix typo codice idxResp da tab
2024-06-14 18:54:43 +02:00
Samuele Locatelli 9601eaffcd Merge branch 'release/AddEmailToResp02' 2024-06-14 18:54:22 +02:00
Samuele Locatelli d8db7a8075 Typo fix idx resp 2024-06-14 18:54:04 +02:00
Samuele Locatelli 7928ff14e2 Merge tag 'AddEmailToResp01' into develop
Aggiunta invio email al resp se non è approvatore principale
2024-06-14 18:48:59 +02:00
Samuele Locatelli a13bea1813 Merge branch 'release/AddEmailToResp01' 2024-06-14 18:48:48 +02:00
Samuele Locatelli ebd5af2d77 Aggiunta notifica al resp oltre che al l'approvatore 2024-06-14 18:48:25 +02:00
Samuele Locatelli 4fd374a4c3 Merge tag 'AddSearchRA01' into develop
Aggiunta ricerca attività su week + lista
2024-05-20 18:51:50 +02:00
Samuele Locatelli a59bb18c0e Merge branch 'release/AddSearchRA01' 2024-05-20 18:51:39 +02:00
Samuele Locatelli 3e2729f594 Fix search su lista attivita! 2024-05-20 18:51:05 +02:00
Samuele Locatelli 4f33831180 Aggiunto ricerca + highlight attività in RA 2024-05-20 17:00:53 +02:00
Samuele Locatelli 23f334d233 Merge tag 'AddFontDynResize02' into develop
Fine tuning dimensione fonts in caso di multi attività giornaliere
2024-04-16 16:21:25 +02:00
Samuele Locatelli c21532256d Merge branch 'release/AddFontDynResize02' 2024-04-16 16:21:09 +02:00
Samuele Locatelli 0d4fb29b5b Fix display dimensioni x multi-attività WRKLOG 2024-04-16 16:20:43 +02:00
Samuele Locatelli 10a1356a6e Merge tag 'AddFontDynResize01' into develop
Add font dyn resize x tante RA
2024-03-26 17:23:43 +01:00
Samuele Locatelli bf27ae8e19 Merge branch 'release/AddFontDynResize01' 2024-03-26 17:23:32 +01:00
Samuele Locatelli 041eae2260 Dyn resize chars x tanti RA 2024-03-26 17:22:42 +01:00
Samuele Locatelli c3f011ec75 Merge tag 'UseRedisSentinel01' into develop
Aggiunta gestione sentinel + install su IIS01/02/03 + test
2024-03-16 11:56:57 +01:00
Samuele Locatelli 9d05a9f068 Merge branch 'release/UseRedisSentinel01' 2024-03-16 11:56:41 +01:00
Samuele Locatelli 5b459bbd7b Fix passaggio sentinel da localhost 2024-03-16 11:56:29 +01:00
Samuele Locatelli 05ef3a3a4f cleanup cicd 2024-03-16 09:51:34 +01:00
Samuele Locatelli f1b5c99463 Update conf con server redis main/replica e sentinel 2024-03-16 09:48:19 +01:00
Samuele Locatelli 2f7337348e Update grafico detail Periodo (smaller) 2024-03-07 15:13:32 +01:00
Samuele Locatelli 7f88624935 Merge tag 'AddPresentStat02' into develop
Update comletato prima vers pag presenze
2024-03-07 10:38:18 +01:00
Samuele Locatelli dacd3b9bcd Merge branch 'release/AddPresentStat02' 2024-03-07 10:38:01 +01:00
Samuele Locatelli 596449f259 Completata review pag presenze 2024-03-07 10:37:46 +01:00
Samuele Locatelli e149445529 Update x display multi-user 2024-03-07 10:28:30 +01:00
Samuele Locatelli 178d7a3ef0 Update pag presenze 2024-03-05 18:47:24 +01:00
Samuele Locatelli 53d505006a Merge tag 'AddPresentStat01' into develop
Aggiunta info statistiche x admin
2024-03-05 17:16:27 +01:00
Samuele Locatelli 53e1abd2c0 Merge branch 'release/AddPresentStat01' 2024-03-05 17:16:18 +01:00
Samuele Locatelli 321b7a3a6f refresh orario 2024-03-05 17:16:05 +01:00
Samuele Locatelli 2e54c8b164 Update conf x admin gestito 2024-03-05 17:15:28 +01:00
Samuele Locatelli 8c978f68c2 Update display presenze 2024-03-05 16:27:34 +01:00
Samuele Locatelli 781c570a3d Bozza risposta a timbrature su PipeChannel 2024-03-05 10:31:16 +01:00
Samuele Locatelli de2a8cb6a5 Aggiunto invio su PipeChannel x timbrature e richieste 2024-03-05 10:30:54 +01:00
Samuele Locatelli 63e92f0c83 Merge tag 'TestReload03' into develop
Test reload senza boot.js
2024-03-05 08:30:48 +01:00
Samuele Locatelli 73a28e33b4 Merge branch 'release/TestReload03' 2024-03-05 08:30:40 +01:00
Samuele Locatelli f4d2265de2 Fix layout x GPW SMART 2024-03-05 08:30:25 +01:00
Samuele Locatelli b40764c2bc Merge tag 'TestReload02' into develop
Ancora update gestione reload pagina
2024-03-05 08:21:52 +01:00
Samuele Locatelli 0333154935 Merge branch 'release/TestReload02' 2024-03-05 08:21:41 +01:00
Samuele Locatelli fc19fb563e Update comportamento wrklog 2024-03-05 08:20:49 +01:00
Samuele Locatelli fd6a0512ba Merge tag 'TestReload_01' into develop
Update SMART
2024-03-01 19:08:26 +01:00
Samuele Locatelli 7c4ae1f7dc Merge branch 'release/TestReload_01' 2024-03-01 19:08:07 +01:00
Samuele Locatelli b9c2418532 Update SMART 2024-03-01 19:07:33 +01:00
Samuele Locatelli 50a6848f25 Merge tag 'TestReloadFooterWrklog_01' into develop
Update gestione footer WRKLOG
2024-02-28 16:15:12 +01:00
Samuele Locatelli 6e1b60cc71 Merge branch 'release/TestReloadFooterWrklog_01' 2024-02-28 16:14:36 +01:00
Samuele Locatelli 23a3985251 Update refresh WRKLOG 2024-02-28 16:14:04 +01:00
Samuele Locatelli 274d58ab68 typo 2024-02-27 15:42:59 +01:00
Samuele Locatelli 14637860e0 Merge tag 'UpdateLayoutReload01' into develop
Update layout + gestione placeholders vari
2024-02-27 15:34:34 +01:00
Samuele Locatelli fe0545084a Merge branch 'release/UpdateLayoutReload01' 2024-02-27 15:34:16 +01:00
Samuele Locatelli e37b5050e2 Update conf x reload + layout reloading 2024-02-27 15:32:04 +01:00
Samuele Locatelli fc3a6a70da Merge branch 'develop' 2024-02-24 12:09:35 +01:00
Samuele Locatelli 9837f276d7 update layout x smart 2024-02-24 12:09:27 +01:00
Samuele Locatelli 865aa0afab Merge tag 'FixReloadLayout03' into develop
Fix reload pagina (tenta x + tempo)
2024-02-24 11:58:53 +01:00
Samuele Locatelli ef2bd7c5d5 Merge branch 'release/FixReloadLayout03' 2024-02-24 11:58:41 +01:00
Samuele Locatelli 3c92333f0e Test altra modifica reload pagina 2024-02-24 11:58:19 +01:00
Samuele Locatelli 190b7a10b7 Merge tag 'FixReloadLayout02' into develop
Fix condizione reload + update pacchetti EgwCoreLib
2024-02-23 19:01:04 +01:00
Samuele Locatelli 7a89709a29 Merge branch 'release/FixReloadLayout02' 2024-02-23 19:00:46 +01:00
Samuele Locatelli 3777090416 Update librerie pacchetti EgwCoreLib e reload pagina 2024-02-23 19:00:23 +01:00
Samuele Locatelli 16d13748c9 Merge tag 'FixReloadLayout01' into develop
Fix condizioni reload layout
2024-02-19 19:33:24 +01:00
Samuele Locatelli 5a46df0f19 Merge branch 'release/FixReloadLayout01' 2024-02-19 19:33:14 +01:00
Samuele Locatelli d3ff540382 Update condizioni reload javascript 2024-02-19 19:32:56 +01:00
Samuele Locatelli 15fcbd57b9 Merge tag 'AddPageReconnectAuto' into develop
Aggiunto reconnect pagina
2024-02-19 09:15:55 +01:00
Samuele Locatelli 07ac5aa9a5 Merge branch 'release/AddPageReconnectAuto' 2024-02-19 09:15:45 +01:00
Samuele Locatelli 488ca47e50 Aggiunta clausola reconnect x evitare reload pagina 2024-02-19 09:15:05 +01:00
Samuele Locatelli b8af310248 Merge tag 'AddFerieSmartAndFixEmailNextYear' into develop
Aggiunto display ferie + fix invio email anno successivo
2023-12-07 08:26:50 +01:00
Samuele Locatelli dbfc7fddc4 Merge branch 'release/AddFerieSmartAndFixEmailNextYear' 2023-12-07 08:25:54 +01:00
Samuele Locatelli e6196db490 Aggiunto display ferie su smart 2023-12-07 08:25:16 +01:00
Samuele Locatelli 00e4a0158e Fix display richieste next year 2023-12-06 18:56:00 +01:00
Samuele Locatelli 838e0f6957 Merge tag 'FixTrimDomainUser01' into develop
Fix tab in campo DB x dominio
2023-11-08 11:36:06 +01:00
Samuele Locatelli b955c6e38e Merge branch 'release/FixTrimDomainUser01' 2023-11-08 11:35:55 +01:00
Samuele Locatelli 51eb178934 Fix check utente x errore \t (nascosto) 2023-11-08 11:35:31 +01:00
Samuele Locatelli bd6ef3d0ae Merge tag 'FixEmailGpwWrklog01' into develop
Fix email anche in GPW desktop/wrklog
2023-11-07 10:03:15 +01:00
Samuele Locatelli 6e13ebe8a9 Merge branch 'release/FixEmailGpwWrklog01' 2023-11-07 10:03:06 +01:00
Samuele Locatelli 25656f5eec Fix email in GPW desktop 2023-11-07 10:02:45 +01:00
Samuele Locatelli bc260f5de5 Merge tag 'FixEmailGpwSmart' into develop
Fix invio email da smart device
2023-11-07 09:57:08 +01:00
Samuele Locatelli 26507ae5bf Merge branch 'release/FixEmailGpwSmart' 2023-11-07 09:57:00 +01:00
Samuele Locatelli f3fb081103 Fix invio email x GPW SMART 2023-11-07 09:56:25 +01:00
Samuele Locatelli 3930a9e8dc Merge tag 'FixEmailrev01' into develop
Fix email reversed
2023-11-06 11:09:44 +01:00
Samuele Locatelli 09d1f42934 Merge branch 'release/FixEmailrev01' 2023-11-06 11:09:33 +01:00
Samuele Locatelli 394d924d1e Fix email pwd 2023-11-06 11:08:55 +01:00
Samuele Locatelli d2ad286f0f Merge tag 'AddResetAll01' into develop
Aggiunta pagina reset-all x forzare reset attivazioni licenze
2023-10-03 15:22:16 +02:00
Samuele Locatelli 4e1e958db0 Merge branch 'release/AddResetAll01' 2023-10-03 15:22:05 +02:00
Samuele Locatelli de09175f28 GPW-WRKLOG:
- Aggiunta pag reset nascosta ("reset-all")
2023-10-03 15:21:45 +02:00
Samuele Locatelli 2d009a76d8 Merge tag 'AddCheckTimbrFuture02' into develop
Fix testi log attività su DB
2023-09-01 07:39:50 +02:00
Samuele Locatelli 533452776d Merge branch 'release/AddCheckTimbrFuture02' 2023-09-01 07:39:12 +02:00
Samuele Locatelli 209fe7aa6c Correzione messaggi log check GPW 2023-09-01 07:38:18 +02:00
Samuele Locatelli da214155c0 Merge tag 'AddCheckTimbrFuture01' into develop
Gestione anomalia timbrature future: invio email!
2023-08-30 09:14:46 +02:00
Samuele Locatelli d36b60dc17 Merge branch 'release/AddCheckTimbrFuture01' 2023-08-30 09:14:32 +02:00
Samuele Locatelli 8527b91e6c Aggiunto step check anomalie timbrature future 2023-08-30 09:14:19 +02:00
Samuele Locatelli d345e84279 Merge tag 'UpdateEgwComp04' into develop
Update calcolo durate permessi/ferie
2023-07-31 18:46:10 +02:00
Samuele Locatelli 8bf47bb03b Merge branch 'release/UpdateEgwComp04' 2023-07-31 18:45:27 +02:00
Samuele Locatelli f1068e3f42 Fix calcolo durata fermi x WRKLOG e SMART 2023-07-31 18:44:49 +02:00
Samuele Locatelli c9c69f535a Merge tag 'UpdateEgwComp03' into develop
update componente progress loagding x pagine WRKLOG
2023-07-31 16:57:10 +02:00
Samuele Locatelli baecdd9c32 Merge branch 'release/UpdateEgwComp03' 2023-07-31 16:56:57 +02:00
Samuele Locatelli 56f0d36570 Update anche in WRKLOG dei componenti progress 2023-07-31 16:56:41 +02:00
Samuele Locatelli aa7ef25da9 Merge tag 'UpdateEgwComp02' into develop
Fix worklog x componenti nuget
2023-07-31 15:55:08 +02:00
Samuele Locatelli 75340443a2 Merge branch 'release/UpdateEgwComp02' 2023-07-31 15:54:54 +02:00
Samuele Locatelli 1eafdee5af Fix GPW.WRKLOG 2023-07-31 15:54:38 +02:00
Samuele Locatelli f9ea6f5721 Merge tag 'UpdateEgwComp01' into develop
update componenti EgwCore x loading + send email
2023-07-31 15:42:33 +02:00
Samuele Locatelli 3e363588e7 Merge branch 'release/UpdateEgwComp01' 2023-07-31 15:42:15 +02:00
Samuele Locatelli 94d2d46919 Update componenti EgwCore.Razor
- inseriti loader nuovi
- gestione progress bar(a) x invio email
2023-07-31 15:41:36 +02:00
Samuele Locatelli e6065535b4 Merge tag 'FixClonaPeriodo' into develop
Fix clona periodo x update
2023-07-03 08:41:51 +02:00
Samuele Locatelli 26110c9885 Merge branch 'release/FixClonaPeriodo' 2023-07-03 08:41:43 +02:00
Samuele Locatelli 38a9d7be73 Fix selezione periodo con clona 2023-07-03 08:41:22 +02:00
Samuele Locatelli b69ca54dcc Fix sel periodo free 2023-07-03 08:21:55 +02:00
Samuele Locatelli bd1c955f72 Merge tag 'UpdateHelp' into develop
Update help file
2023-06-30 12:18:43 +02:00
Samuele Locatelli a4947a95cd Merge branch 'release/UpdateHelp' 2023-06-30 12:18:33 +02:00
Samuele Locatelli 4b7f560e5a Update help file 2023-06-30 12:18:08 +02:00
Samuele Emilio Locatelli 69174bdb71 Merge branch 'develop' into 'main'
Develop

See merge request egalware-web/gest/gpw_next!1
2023-06-30 04:58:39 +00:00
Samuele Emilio Locatelli f10fbffaf5 Update MyRepStats.razor 2023-06-30 04:54:47 +00:00
Samuele Locatelli 8c5fa25801 Merge tag 'FixMyRepSize01' into develop
Sistemazione dimensione pagina MyReport x size e dimensioni caratteri
2023-06-29 19:13:04 +02:00
Samuele Locatelli e53daaf6a7 Merge branch 'release/FixMyRepSize01' 2023-06-29 19:12:50 +02:00
Samuele Locatelli 6e44e7cb56 Fix size dettaglio proj 2023-06-29 19:12:23 +02:00
Samuele Locatelli e2dccac335 MyReport:
- height max 42rem
2023-06-29 18:56:39 +02:00
Samuele Locatelli 27876c6530 Update altezza grafici 2023-06-29 18:23:59 +02:00
Samuele Locatelli 4c10c121e3 MyReport
Update layout FHD
2023-06-29 18:15:05 +02:00
Samuele Locatelli 0300ce6eac Fix display immagine 2023-06-29 18:05:10 +02:00
Samuele Locatelli 28ce9a3a1c Merge tag 'AddMyReportOnProd01' into develop
Aggiunta MyReport in prod
2023-06-29 17:05:55 +02:00
Samuele Locatelli fc9cb8d67a Merge branch 'release/AddMyReportOnProd01' 2023-06-29 17:05:37 +02:00
Samuele Locatelli 7d9d3ccbef Fix display vert + editing progetti 2023-06-29 16:35:18 +02:00
Samuele Locatelli 1dd4b4ae30 Ok inizio displ vert 2023-06-29 12:35:08 +02:00
Samuele Locatelli a5646aeabb Fix nuget x smart 2023-06-28 17:39:46 +02:00
Samuele Locatelli 00ed8fbf17 MyReport:
- Update compo
- default curr week analisi
2023-06-28 17:38:10 +02:00
Samuele Locatelli 1948fee63a Fix grafico 2023-06-28 17:19:23 +02:00
Samuele Locatelli ba0c0af831 Pagina Myreport Completa 2023-06-28 17:08:40 +02:00
Samuele Locatelli d2504e4fb6 ancora update calcoli report 2023-06-28 16:13:43 +02:00
Samuele Locatelli 5c674bf62d Prima bozza con recupero dati report... 2023-06-28 15:54:06 +02:00
Samuele Locatelli 7425be3e2a Aggiunta preliminare pagina MyReport + update EgwCoreLib 2023-06-28 14:56:16 +02:00
Samuele Locatelli 8cd48454a1 Merge tag 'ReviewLoginLicence01' into develop
Update x test gestione licenze dal 1° giorno nuovi dip
2023-06-12 14:30:18 +02:00
Samuele Locatelli f35edfb9db Merge branch 'release/ReviewLoginLicence01' 2023-06-12 14:30:05 +02:00
Samuele Locatelli 402442b8d2 Aggiunta delay e rilettura x licenza 2023-06-12 14:25:40 +02:00
Samuele Locatelli 10465fc7f3 Merge tag 'AddMaybeReconnectJScript06' into develop
rimesso riconnessione script
2023-06-09 11:06:47 +02:00
Samuele Locatelli 9a87d67b3d Merge branch 'release/AddMaybeReconnectJScript06' 2023-06-09 11:06:35 +02:00
Samuele Locatelli 473ce70f9a Redo gestione reload pagina 2023-06-09 11:06:12 +02:00
Samuele Locatelli 417fbe31c1 Merge tag 'AddMaybeReconnectJScript05' into develop
Fix compression resp
2023-06-08 19:03:34 +02:00
Samuele Locatelli 07e4ee2de1 Merge branch 'release/AddMaybeReconnectJScript05' 2023-06-08 19:03:27 +02:00
Samuele Locatelli 34db49f776 fix reload 2023-06-08 19:03:06 +02:00
Samuele Locatelli d7239dbf85 fix compressione response 2023-06-08 19:02:42 +02:00
Samuele Locatelli 0ad217bc54 Merge tag 'AddMaybeReconnectJScript04' into develop
Update ulteriore x riconnect
2023-06-08 19:00:18 +02:00
Samuele Locatelli 9f23e69505 Merge branch 'release/AddMaybeReconnectJScript04' 2023-06-08 18:59:57 +02:00
Samuele Locatelli 58df987e47 Modifica ulteriore riconnect 2023-06-08 18:59:40 +02:00
Samuele Locatelli ae615bf8d6 Merge tag 'AddMaybeReconnectJScript03' into develop
Update procedura riconnect
2023-06-08 18:54:23 +02:00
Samuele Locatelli 6e956330ea Merge branch 'release/AddMaybeReconnectJScript03' 2023-06-08 18:54:06 +02:00
Samuele Locatelli b75f501290 Fix riavvio (da testare) WRKLOG 2023-06-08 18:53:49 +02:00
Samuele Locatelli 69c8b7c97a Merge tag 'AddMaybeReconnectJScript02' into develop
Spostamento JScript in altra area (_Layout)
2023-06-08 18:07:39 +02:00
Samuele Locatelli 09a988ede9 Merge branch 'release/AddMaybeReconnectJScript02' 2023-06-08 18:07:26 +02:00
Samuele Locatelli 63943fa46d Spostamento JScript 2023-06-08 17:50:29 +02:00
Samuele Locatelli 762129bdd4 Merge tag 'AddMaybeReconnectJScript' into develop
Aggiunta JScript x tentare reconnect in caso di problemi
2023-06-08 17:38:05 +02:00
Samuele Locatelli 3cf826c048 Merge branch 'release/AddMaybeReconnectJScript' 2023-06-08 17:37:46 +02:00
Samuele Locatelli aa0b0f92e4 Aggiunto meccanismo (maybe) x reconnect di WRKLOG 2023-06-08 17:37:09 +02:00
Samuele Locatelli 10fc218d8b Merge tag 'UpdateWrkLogTimbMissingDate01' into develop
Aggiunta gestione missing date timbrature (gg passati...)
2023-05-23 16:27:28 +02:00
Samuele Locatelli a700a8752c Merge branch 'release/UpdateWrkLogTimbMissingDate01' 2023-05-23 16:27:06 +02:00
Samuele Locatelli 105cf4b756 vers refresh 2023-05-23 16:26:29 +02:00
Samuele Locatelli d46a0b731e Update x fix timbrature giorni prec + refresh 2023-05-23 16:26:24 +02:00
Samuele Locatelli b0df9f97b4 Merge tag 'AddCheckDoneOnTimb' into develop
Aggiunto check esecuzione timbratura prima di aggiornare
2023-05-11 08:30:03 +02:00
Samuele Locatelli 46c8023ab4 Merge branch 'release/AddCheckDoneOnTimb' 2023-05-11 08:29:30 +02:00
Samuele Locatelli 93c1b3b189 GPW CORE SMART:
-  controllo registrazione (effettiva) timbratura prima di update
2023-05-11 08:29:03 +02:00
Samuele Locatelli 9e66214f66 Merge tag 'AddMalattiaDaWrkLog' into develop
Aggiunta Malattia da WrkLog
2023-04-27 16:43:19 +02:00
Samuele Locatelli a4df2bba0d Merge branch 'release/AddMalattiaDaWrkLog' 2023-04-27 16:43:03 +02:00
Samuele Locatelli 705f2efd10 Update pubxml 2023-04-27 16:42:47 +02:00
Samuele Locatelli 22f49241e4 Aggiunta btn add malattia x WRKLOG 2023-04-27 16:41:42 +02:00
Samuele Locatelli c043486f82 Merge tag 'FixDisplayChiusuraAndWork' into develop
Sistemazione giornate con eventi ferie/fest + lavoro extra
2023-04-26 17:22:02 +02:00
Samuele Locatelli 5c30b30a27 Merge branch 'release/FixDisplayChiusuraAndWork' 2023-04-26 17:21:34 +02:00
Samuele Locatelli 3dc74caa98 Fix display giornate chiusura quando lavorate 2023-04-26 17:21:05 +02:00
Samuele Locatelli 384db1cdd0 Update display fest/ferie x day data 2023-04-26 17:03:35 +02:00
Samuele Locatelli 62b6c3a04d Merge tag 'UpdateSmartDisplCFF' into develop
Fix display CFF x home timb
2023-04-20 19:31:29 +02:00
Samuele Locatelli fa716e9f2f Merge branch 'release/UpdateSmartDisplCFF' 2023-04-20 19:30:06 +02:00
Samuele Locatelli 476487b3c0 Refresh colorazione fest/ferie (quadrato) + fix API 2023-04-20 19:29:41 +02:00
Samuele Locatelli 8899289d29 Aggiunta colorazione ferie/feste in SMART 2023-04-20 19:27:55 +02:00
Samuele Locatelli d8a0f5c453 Merge tag 'displayWeekCalRichMPF05' into develop
Fix colori x differenziare ferie/fest
2023-04-11 16:02:30 +02:00
Samuele Locatelli 4434cff466 Merge branch 'release/displayWeekCalRichMPF05' 2023-04-11 16:02:22 +02:00
Samuele Locatelli 87c42e0910 Fix colori diversi fest/ferie ufficio 2023-04-11 16:02:06 +02:00
Samuele Locatelli 34df9c59fb Merge branch 'main' into develop 2023-04-11 15:44:43 +02:00
Samuele Locatelli 1daeb227ea Merge tag 'displayWeekCalRichMPF04' into develop
Fix display permessi passati
2023-04-11 15:44:28 +02:00
Samuele Locatelli cac3f95895 Fix display permessi : se ho timb NON mostra 2023-04-11 15:44:16 +02:00
Samuele Locatelli 6a169705e6 Merge branch 'release/displayWeekCalRichMPF04' 2023-04-11 15:36:31 +02:00
Samuele Locatelli 584177e5c6 GPW.WRKLOG:
- review grafica indicazione feste/ferie
2023-04-11 14:41:23 +02:00
Samuele Locatelli 44ca4a4fd6 Merge tag 'displayWeekCalRichMPF03' into develop
Fix display richieste
2023-04-11 10:27:10 +02:00
Samuele Locatelli ead97b6863 Merge branch 'release/displayWeekCalRichMPF03' 2023-04-11 10:27:00 +02:00
Samuele Locatelli 5806f0619e Fix display attesa in cancellazione richieste 2023-04-11 10:26:47 +02:00
Samuele Locatelli 204ecb47b7 Merge tag 'displayWeekCalRichMPF02' into develop
Fix display ferie su + giorni / settimane
2023-04-11 10:09:03 +02:00
Samuele Locatelli 388aa0cd65 Merge branch 'release/displayWeekCalRichMPF02' 2023-04-11 10:08:39 +02:00
Samuele Locatelli f10c0d19c7 ancora fix ferie su cal week 2023-04-11 10:08:17 +02:00
Samuele Locatelli 9f105dd244 Fix calcolo ferie su + giorni x weekplan 2023-04-11 10:08:08 +02:00
Samuele Locatelli 59e2622e58 Merge tag 'displayWeekCalRichMPF' into develop
Fix display perm / fest / ferie su week cal personale
2023-04-11 09:11:11 +02:00
Samuele Locatelli 614ebcf818 Merge branch 'release/displayWeekCalRichMPF' 2023-04-11 09:10:56 +02:00
Samuele Locatelli b428ef59da Completata aggiunta indicaizone ferie/permessi futuri 2023-04-11 09:10:04 +02:00
Samuele Locatelli b4d2218f79 Inizio aggiunta festività, permessi, ferie in cal week 2023-04-11 08:42:04 +02:00
Samuele Locatelli ad6d4e9875 Merge tag 'FixWrkLogActionDisplay' into develop
Sistemazione posizione menù hover azioni in WRKLOG
2023-04-08 09:32:10 +02:00
Samuele Locatelli 6530664616 Merge branch 'release/FixWrkLogActionDisplay' 2023-04-08 09:31:51 +02:00
Samuele Locatelli ba0dc30c42 Fix display menù azioni WRKLOG 2023-04-08 09:31:19 +02:00
Samuele Locatelli 8d9f106a9a Merge tag 'FixDisplayFerieMultiDay' into develop
Fix display ferie multi-giorno
2023-04-03 10:42:25 +02:00
Samuele Locatelli f408c0e9d6 Merge branch 'release/FixDisplayFerieMultiDay' 2023-04-03 10:03:55 +02:00
Samuele Locatelli 81ad753268 Fix display ferie multi-giorno 2023-04-03 10:03:22 +02:00
Samuele Locatelli ed6bfd3b05 Merge tag 'FixQrcodeDisplayLink' into develop
Fix caratteri non ammessi x URL
2023-03-28 08:12:35 +02:00
Samuele Locatelli 2b7346063a Merge branch 'release/FixQrcodeDisplayLink' 2023-03-28 08:12:24 +02:00
Samuele Locatelli fa33bc9753 Fix QRCode
- auth da fare escaped x visualizzatore
2023-03-28 08:12:01 +02:00
Samuele Locatelli fff73423c2 Correzione commenti (minor) 2023-03-27 19:32:51 +02:00
Samuele Locatelli 0d159e76cc Merge tag 'FixnonAuthCheckPowershell' into develop
Fix gestione script powershell su pagine WRKLOG non auth che
rimablzavano controllo certificato
2023-03-24 19:34:58 +01:00
Samuele Locatelli 7e7393f42c Merge branch 'release/FixnonAuthCheckPowershell' 2023-03-24 19:34:39 +01:00
Samuele Locatelli 1d8a64fb2a Fix possibilità lancio non auth x check programma powershell 2023-03-24 19:34:08 +01:00
Samuele Locatelli c766ffeda3 Merge tag 'FixExtDeploy' into develop
Fix istruzioni deploy (MsDeploy era sbagliato)
2023-03-04 17:07:18 +01:00
Samuele Locatelli 86ded42bae Merge branch 'release/FixExtDeploy' 2023-03-04 17:07:07 +01:00
Samuele Locatelli 9c6733546f Fix deploy EXT:
- errato path x msdeploy sito esterno
2023-03-04 17:05:27 +01:00
Samuele Locatelli 201e092b21 Merge tag 'FixIntExtSiteSmart' into develop
Fix visualizzazione INT/EXT (testo + colore) x sito CORE SMART
2023-03-04 16:59:20 +01:00
Samuele Locatelli be122e6845 Merge branch 'release/FixIntExtSiteSmart' 2023-03-04 16:59:00 +01:00
Samuele Locatelli 512494aa38 CoreSmart:
- Fix calcolo INT/EXT
- display colore + testo home INT/EXT
2023-03-04 16:58:36 +01:00
Samuele Locatelli 1eb2d54235 fix deploy only main x develop 2023-03-04 15:01:01 +01:00
Samuele Locatelli de556ab2a8 Merge tag 'FixCiCdCore' into develop
Fix gestione deploy prod (da testare)
2023-03-04 15:00:17 +01:00
Samuele Locatelli 564a87e177 Merge branch 'release/FixCiCdCore' 2023-03-04 14:59:06 +01:00
Samuele Locatelli 140711eb39 Update dipendenze per problema pubblicazione update CORE 2023-03-04 12:23:43 +01:00
Samuele Locatelli eb280b9556 Merge tag 'fixProjBackup' into develop
Fix file inclusi
2023-03-03 19:32:19 +01:00
Samuele Locatelli 5341eae5ca Merge branch 'release/fixProjBackup' 2023-03-03 19:31:31 +01:00
Samuele Locatelli 2cd3882808 Merge tag 'UdateDeployIntExtOffice' into develop
Update pubblicazione GPW NEXT
2023-03-03 19:31:08 +01:00
Samuele Locatelli 10819e97f0 pulizia fiels 2023-03-03 19:29:02 +01:00
Samuele Locatelli 3ed1921d3d inizio fix conflitto versione 2023-03-03 19:26:55 +01:00
Samuele Locatelli 9ae0daa69e Merge branch 'release/UdateDeployIntExtOffice' 2023-03-03 19:25:17 +01:00
Samuele Locatelli f776112e5b ancora udpate pubblicazione GPW NEXT 2023-03-03 19:24:08 +01:00
Samuele Locatelli de9fc59637 Update principi pubblicazione siti 2023-03-03 19:23:57 +01:00
Samuele Locatelli 5e75d12a79 Merge tag 'AddGaugeAsButton' into develop
Aggiunta gauge come button
2023-02-17 09:47:28 +01:00
Samuele Locatelli 2fab9ede6e Merge branch 'release/AddGaugeAsButton' 2023-02-17 09:47:17 +01:00
Samuele Locatelli 7e1d1e464c Update componente gauge a button centrale 2023-02-17 09:46:48 +01:00
zaccaria.majid d548f0537c aggiunto pacchetto nuget 2023-02-03 10:00:46 +01:00
zaccaria.majid b91b473dbe fix libreria + aggiunto giorno corrente
calendario mfp
2023-02-03 09:15:07 +01:00
Samuele Locatelli 98a3f50771 Merge tag 'FixNewProdDb2019' into develop
Update stringhe conn DB PROD 2019
2023-02-02 16:19:22 +01:00
Samuele Locatelli 551991bc95 Merge branch 'release/FixNewProdDb2019' 2023-02-02 16:19:07 +01:00
Samuele Locatelli e561ccb2a7 Update GPW core x nuovo DB Prod 2023-02-02 16:18:32 +01:00
Samuele Locatelli 9f3eb7dde0 Merge tag 'AddNuPkgComp' into develop
iRImosso link proj comp + aggiunta nupkg
2023-02-02 16:03:33 +01:00
Samuele Locatelli 2a31fb9dcf Merge branch 'release/AddNuPkgComp' 2023-02-02 16:03:12 +01:00
Samuele Locatelli bdaaefb076 GPW CORE SMART:
- Rimozione proj comp
- inserito nupkg
2023-02-02 16:02:43 +01:00
Samuele Locatelli 74cde6035f Merge tag 'UpdateApiCheckTimbrature' into develop
Update API x timbrature
2023-01-27 11:44:04 +01:00
Samuele Locatelli 2507a9e35e Merge branch 'release/UpdateApiCheckTimbrature' 2023-01-27 11:43:55 +01:00
Samuele Locatelli d37766b3a3 GPW.Core.APi:
- update conf e test timb
2023-01-27 11:42:02 +01:00
Samuele Locatelli 3de47b92f2 Merge tag 'FixCheckTimb' into develop
fix modalità test timbrature (fallite stamattina)
2023-01-26 10:39:33 +01:00
Samuele Locatelli 81f9f4971e Merge branch 'release/FixCheckTimb' 2023-01-26 10:39:15 +01:00
Samuele Locatelli 7e3fc3e8f5 Merge branch 'develop' of https://gitlab.steamware.net/steamware/gpw_next into develop 2023-01-26 10:38:50 +01:00
Samuele Locatelli 1e0486e7b5 Completati test x anomalie GPW 2023-01-26 10:38:42 +01:00
zaccaria.majid be357ff225 Merge branch 'develop' of https://gitlab.steamware.net/steamware/gpw_next into develop 2023-01-26 08:30:52 +01:00
zaccaria.majid 8fff35405a aggiunto svg design grafico 2023-01-26 08:30:46 +01:00
Samuele Locatelli f7b482d36c Merge tag 'AddApiCheckTimbInProd' into develop
Update in prod x gestione check TImbrature
2023-01-25 19:01:45 +01:00
Samuele Locatelli a719be6195 Merge branch 'release/AddApiCheckTimbInProd' 2023-01-25 19:01:24 +01:00
Samuele Locatelli efeca5935d Merge branch 'release/AddApiCheckTimbInProd' into develop 2023-01-25 18:58:47 +01:00
Samuele Locatelli 6510fce274 Update cultureinfo x WRKLOG e API 2023-01-25 18:58:36 +01:00
Samuele Locatelli a0f30be0e3 Refresh 2023-01-25 18:56:31 +01:00
Samuele Locatelli 91a956ae60 Fix email admin 2023-01-25 18:54:04 +01:00
Samuele Locatelli 9d62995a70 Fix check controllo timbrature (da provare...) 2023-01-25 18:49:18 +01:00
Samuele Locatelli 8b85b4a2f8 OK primo check timbrature da approvare 2023-01-25 17:39:38 +01:00
Samuele Locatelli 619932b4c1 Aggiunta metodi recupero dati anomalie quotidiane 2023-01-25 15:35:50 +01:00
Samuele Locatelli b8429b1867 Update check timbrature (da completare) 2023-01-25 11:53:35 +01:00
Samuele Locatelli 88a260e88f Fix errore compilazione WrkLog 2023-01-25 11:36:47 +01:00
Samuele Locatelli 3dd5843ee5 Inizio aggiunta check timbrature ad API di GPW 2023-01-25 11:36:36 +01:00
Samuele Locatelli fd210e82d7 DB: gestione RegistroEventi 2023-01-25 11:36:05 +01:00
Samuele Locatelli 195ed3c157 Merge tag 'AddMonthNavigation' into develop
Update navigaizone mensile
2023-01-24 09:42:35 +01:00
Samuele Locatelli fb72e45e44 Merge branch 'release/AddMonthNavigation' 2023-01-24 09:42:08 +01:00
zaccaria.majid 4c1d7d7056 aggiunta visualizza multi-giorno ferie 2023-01-24 09:40:32 +01:00
zaccaria.majid d6b8d47dc7 Merge branch 'develop' of https://gitlab.steamware.net/steamware/gpw_next into develop 2023-01-24 09:26:24 +01:00
zaccaria.majid 157fc77650 aggiunta cambio mese 2023-01-24 09:26:18 +01:00
Samuele Locatelli acd88fd0a4 Merge tag 'UpdateCUltureInfo' into develop
Tenbtativo update x gestione cultureinfo
2023-01-24 08:59:13 +01:00
Samuele Locatelli c2523ff0bc Merge branch 'release/UpdateCUltureInfo' 2023-01-24 08:58:53 +01:00
Samuele Locatelli c5d897919d update x cultureinfo 2023-01-24 08:58:23 +01:00
Samuele Locatelli 03ede3a967 Merge tag 'FixWrkLogReload' into develop
Fix rilettura WorkLog settimane precedenti
2023-01-23 19:29:39 +01:00
Samuele Locatelli 19f34abbec Merge branch 'release/FixWrkLogReload' 2023-01-23 19:29:28 +01:00
Samuele Locatelli 8b20f36c1b Errore WrkLog:
- Fix reload settimana corrente se edito precedenti
2023-01-23 19:29:06 +01:00
Samuele Locatelli 262d237f12 Merge tag 'TryFixNullNotePerm' into develop
Fix nullo su note permesso
2023-01-23 19:14:18 +01:00
Samuele Locatelli 3781031973 Merge branch 'release/TryFixNullNotePerm' 2023-01-23 19:14:11 +01:00
Samuele Locatelli ce2e409704 Aggiunti un paio di check sui valori null x malattie e permessi (2 test) 2023-01-23 19:13:44 +01:00
Samuele Locatelli 8fa92198f9 Merge tag 'fixCalClickDay' into develop
Fix click giorno da <span> a <td>
2023-01-23 11:10:04 +01:00
Samuele Locatelli 6a446c03e3 Merge branch 'release/fixCalClickDay' 2023-01-23 11:09:49 +01:00
Samuele Locatelli 81c7008771 Click calendario esteso:
- da <span> a intero <td>
2023-01-23 11:09:23 +01:00
Samuele Locatelli b1a8db2882 Merge tag 'FixDisposeGpwSmart' into develop
Update x disposable vari
2023-01-23 10:49:15 +01:00
Samuele Locatelli f64a7d3f3d Merge branch 'release/FixDisposeGpwSmart' 2023-01-23 10:40:31 +01:00
Samuele Locatelli 1580c939dd Update dispose vari in giro 2023-01-23 10:40:07 +01:00
Samuele Locatelli 899903aa5b Merge branch 'main' into develop 2023-01-23 07:58:28 +01:00
Samuele Emilio Locatelli 8516049343 Update .gitlab-ci.yml file x environment 2023-01-22 21:05:18 +00:00
Samuele E. Locatelli 7a13e99d69 Refresh 2023-01-22 21:45:18 +01:00
Samuele E. Locatelli f0d5c2a94a Update metodi lettura 2023-01-22 20:41:23 +01:00
Samuele E. Locatelli ec37691dff Merge tag 'FixAnimazione' into develop
Sistemata animazione
2023-01-22 20:16:00 +01:00
Samuele E. Locatelli 7c2033d1de Merge branch 'release/FixAnimazione' into main 2023-01-22 20:15:47 +01:00
Samuele E. Locatelli 8f403c0dee Correzioni Animazione 2023-01-22 20:14:50 +01:00
Samuele E. Locatelli 88b7f4b9b9 Merge branch 'develop' into main 2023-01-22 20:02:06 +01:00
Samuele E. Locatelli a45d6bcf6b Merge branch 'main' into develop 2023-01-22 20:01:59 +01:00
Samuele E. Locatelli a115517dde Cambio animazione NavBottom 2023-01-22 20:01:36 +01:00
Samuele E. Locatelli 26c21e48b3 Merge branch 'release/UpdateDeployCiCd' into main 2023-01-22 19:34:26 +01:00
Samuele E. Locatelli fc83cbf7ec Update CI/CD x deploy IIS02/IIS03 + nexus 2023-01-22 19:33:21 +01:00
Samuele E. Locatelli 94837e953e Fix effetto menù bottom 2023-01-22 19:31:24 +01:00
Samuele E. Locatelli 47a655c820 Update layout navbuttons 2023-01-22 19:17:41 +01:00
Samuele Locatelli 7fa1dbce3b Merge tag 'FixMenuBottom' into develop
Fix menù bottom
2023-01-22 15:35:07 +01:00
Samuele Locatelli f16541a066 Merge branch 'release/FixMenuBottom' 2023-01-22 15:34:58 +01:00
Samuele Locatelli f69c70b3b7 Semplificazione menu slide 2023-01-22 15:34:00 +01:00
Samuele Locatelli 4a1fbe591e Aggiunta versione + fix errore vers build 2023-01-22 14:55:34 +01:00
Samuele Locatelli 15a0bd295c typo WRKLOG 2023-01-22 14:53:14 +01:00
Samuele Locatelli af3d49cf4e Add about page 2023-01-22 14:52:56 +01:00
Samuele Locatelli 9b90a1b3ca fix top/botto 2023-01-22 14:52:43 +01:00
Samuele Locatelli 3feea9e514 Aggiunti profili pubb IIS02/03 2023-01-22 13:56:22 +01:00
Samuele Locatelli ce5d50209e Merge tag 'DeployProdSmart' into develop
Fix URL navigazione
2023-01-22 13:48:00 +01:00
Samuele Locatelli 9e7c7dea40 Merge branch 'release/DeployProdSmart' 2023-01-22 13:47:43 +01:00
Samuele Locatelli 3476cd79a4 Fix manc timb + link prod 2023-01-22 13:46:02 +01:00
Samuele Locatelli 6f7f676b01 Fix CHartJs display 2023-01-22 12:38:53 +01:00
Samuele Locatelli c3ea2126aa FIx grafici + test popup con toast x cal detail 2023-01-22 11:13:05 +01:00
Samuele Locatelli 591aada1e0 spostata posizione font 2023-01-22 11:10:06 +01:00
Samuele Locatelli 98df74fa0d Aggiunto componente toast 2023-01-22 11:09:57 +01:00
Samuele E. Locatelli (MBA) 8dfdb68a6a Merge branch 'main' into develop 2023-01-20 21:45:00 +01:00
Samuele E. Locatelli (MBA) 8f08d6457c Fix css calendario 2023-01-20 21:44:45 +01:00
Samuele Locatelli 9b96f7134b Merge tag 'ReleaseGpwSmartCore' into develop
Update in prod CoreSmart
2023-01-20 18:43:34 +01:00
Samuele Locatelli 520eb04d30 Merge branch 'release/ReleaseGpwSmartCore' 2023-01-20 18:43:16 +01:00
Samuele Locatelli cc308c05df Fix calendario 2023-01-20 18:33:01 +01:00
Samuele Locatelli 6ee87f4bce Fix reload permessi/ferie 2023-01-20 18:21:06 +01:00
Samuele Locatelli 131fb6ae15 Fix cambio sel settimana 2023-01-20 17:55:53 +01:00
Samuele Locatelli a78609b96d Fix chiusura dettaglio week 2023-01-20 17:44:51 +01:00
Samuele Locatelli fbd70decf5 Update display modale (parziale) 2023-01-20 17:19:10 +01:00
zaccaria.majid 84e4c086f4 Merge branch 'develop' of https://gitlab.steamware.net/steamware/gpw_next into develop 2023-01-20 16:26:49 +01:00
zaccaria.majid 5b695ea7c5 fix grafici e inizio gestione click evento 2023-01-20 16:26:42 +01:00
Samuele Locatelli f2befdd90d Merge branch 'develop' of https://gitlab.steamware.net/steamware/gpw_next into develop 2023-01-20 16:19:59 +01:00
Samuele Locatelli eaf63a3c72 Fix ricalcolo statistiche week x WRKLOG 2023-01-20 16:19:56 +01:00
zaccaria.majid 348cb21b0a fix slider 2023-01-20 14:46:18 +01:00
zaccaria.majid 137f8d601f fix colori calendario 2023-01-20 13:09:52 +01:00
Samuele Locatelli 9cc350da0c Minor fix selezione eventi replicati 2023-01-20 12:30:22 +01:00
Samuele Locatelli 40e666fa1b Merge branch 'develop' of https://gitlab.steamware.net/steamware/gpw_next into develop 2023-01-20 12:07:15 +01:00
Samuele Locatelli c129b9640c Inizio fix dayOff first load 2023-01-20 12:07:12 +01:00
zaccaria.majid af65a73e27 aggiunto linking eventi 2023-01-20 12:06:19 +01:00
Samuele Locatelli c1d1c9746c Fix menù bottom 2023-01-20 12:05:00 +01:00
Samuele Locatelli dd8e5272a3 Update display cal week 2023-01-20 10:29:48 +01:00
Samuele Locatelli 65b22cbc65 Fix errore calEvent 2023-01-20 09:40:36 +01:00
zaccaria.majid 5f859bb317 fix larghezze viwebox 2023-01-20 09:27:27 +01:00
Samuele Locatelli 60fd732a8c Commit parziale componenti svg 2023-01-20 09:05:17 +01:00
Samuele Locatelli f345d804ab Merge branch 'develop' of https://gitlab.steamware.net/steamware/gpw_next into develop 2023-01-19 19:13:20 +01:00
Samuele Locatelli f2e1d867e9 week calendar mostra qualcosina 2023-01-19 19:13:17 +01:00
zaccaria.majid 1789e9f40a aggiunta animazione dots 2023-01-19 18:06:51 +01:00
zaccaria.majid 537793cb8f gestione attività aggiornata 2023-01-19 17:43:18 +01:00
Samuele Locatelli a750376dba Fix calcolo label orarie 2023-01-19 17:32:03 +01:00
Samuele Locatelli a9798bd366 costruzione SIM eventi x cal 2023-01-19 16:28:35 +01:00
zaccaria.majid fc430a40af gestione x filtro settimanale attività 2023-01-19 15:27:56 +01:00
Samuele Locatelli 16e3a2d992 Ancora update x test calendario settimanale 2023-01-19 15:16:26 +01:00
zaccaria.majid 64701ff758 fix css x festività 2023-01-19 14:29:10 +01:00
Samuele Locatelli ba89ff0726 ok cambio settimana calendario 2023-01-19 12:59:48 +01:00
zaccaria.majid 708a907c05 Merge branch 'develop' of https://gitlab.steamware.net/steamware/gpw_next into develop 2023-01-19 12:16:46 +01:00
zaccaria.majid c18ebd0f89 aggiunta gestione calendario con dot 2023-01-19 12:16:39 +01:00
Samuele Locatelli 8ff9385b67 Inizio bozza calendario settimanale 2023-01-19 11:06:19 +01:00
Samuele Locatelli eb6652699a Fix errore paste RA 2023-01-19 10:31:41 +01:00
Samuele Locatelli 220aaf21c0 Fixc errore compilazione x type blazorCal rimossi 2023-01-19 10:20:30 +01:00
Samuele Locatelli 19beb952bb Eliminazione calendario blazored 2023-01-19 10:18:42 +01:00
Samuele Locatelli 9a4bc648ee Merge branch 'develop' of https://gitlab.steamware.net/steamware/gpw_next into develop 2023-01-19 10:03:05 +01:00
Samuele Locatelli 085540092a Fix gestione interno/esterno + arrotondamenti 2023-01-19 10:03:01 +01:00
zaccaria.majid 5e45bd2a69 pulizia files 2023-01-19 09:46:59 +01:00
zaccaria.majid e48481bdc0 fix fix grafici 2023-01-19 09:45:10 +01:00
Samuele Locatelli 4428eed168 Fix componente evento calendario 2023-01-19 09:21:25 +01:00
Samuele Locatelli 892603b956 Fix arrotondamenti :
- SMART
- WRKLOG
2023-01-19 08:42:50 +01:00
Samuele Locatelli 4c9b662e4c COmpilazione preliminare calendario richieste dip! 2023-01-18 19:33:18 +01:00
Samuele Locatelli 7a6f08343c fix calendario MPF: mostra feste + chiusure 2023-01-18 19:11:00 +01:00
Samuele Locatelli 11ddd5ae79 Merge branch 'develop' of https://gitlab.steamware.net/steamware/gpw_next into develop 2023-01-18 18:54:16 +01:00
Samuele Locatelli 1fb4795549 Forzatura hideMenu 2023-01-18 18:53:56 +01:00
zaccaria.majid 818396c6d8 inizio gestione calendario dayoff 2023-01-18 17:19:46 +01:00
zaccaria.majid a3146a61cf fix controllo lista null 2023-01-18 15:59:54 +01:00
zaccaria.majid bda16699ab Merge branch 'develop' of https://gitlab.steamware.net/steamware/gpw_next into develop 2023-01-18 15:55:10 +01:00
zaccaria.majid 21b32386d7 inizio calcolo colori ferie 2023-01-18 15:55:03 +01:00
Samuele Locatelli de448e95fc Merge branch 'develop' of https://gitlab.steamware.net/steamware/gpw_next into develop 2023-01-18 15:54:17 +01:00
Samuele Locatelli 18d20707c0 Completato editing Richieste PERM/FERIE 2023-01-18 15:54:15 +01:00
zaccaria.majid cc60712fd2 Merge branch 'develop' of https://gitlab.steamware.net/steamware/gpw_next into develop 2023-01-18 14:42:24 +01:00
zaccaria.majid aa236cfb5c fix animazione bottom + colore shadow 2023-01-18 14:41:35 +01:00
Samuele Locatelli 44125ad79d Ok display +
edit malattie
2023-01-18 14:27:42 +01:00
Samuele Locatelli 5a751ff4af Bozza pagina DayOff (MPF) 2023-01-18 14:11:08 +01:00
Samuele Locatelli fe2d31cfc5 Fix apertura index da btn navFooter 2023-01-18 13:57:35 +01:00
zaccaria.majid fa55eba725 Merge branch 'develop' of https://gitlab.steamware.net/steamware/gpw_next into develop 2023-01-18 13:10:20 +01:00
zaccaria.majid 18d48ecaae fix grafici vari 2023-01-18 13:10:03 +01:00
Samuele Locatelli 5c9098e072 Merge branch 'develop' of https://gitlab.steamware.net/steamware/gpw_next into develop 2023-01-18 12:09:08 +01:00
Samuele Locatelli a01153771b Aggiunta funzionalità delete 2023-01-18 12:09:05 +01:00
zaccaria.majid eae9f8f287 Merge branch 'develop' of https://gitlab.steamware.net/steamware/gpw_next into develop 2023-01-18 11:57:52 +01:00
zaccaria.majid 1a8753abea pulizia menu 2023-01-18 11:57:46 +01:00
Samuele Locatelli fb413892a3 Merge branch 'develop' of https://gitlab.steamware.net/steamware/gpw_next into develop 2023-01-18 11:51:45 +01:00
Samuele Locatelli 59560f927a Update gestione editing RA 2023-01-18 11:51:43 +01:00
zaccaria.majid b1c02d1483 Merge branch 'develop' of https://gitlab.steamware.net/steamware/gpw_next into develop 2023-01-18 11:00:24 +01:00
zaccaria.majid d77d1603bc Nuova gestione menu 2023-01-18 11:00:16 +01:00
Samuele Locatelli 6b70c4be1d Fic errori spostamento TIMB 2023-01-18 10:38:19 +01:00
Samuele Locatelli f3fa19f96c cleanup modo calendario 2023-01-18 09:55:02 +01:00
Samuele Locatelli 13c09b4341 Merge branch 'develop' of https://gitlab.steamware.net/steamware/gpw_next into develop 2023-01-18 09:54:44 +01:00
Samuele Locatelli 26cf47f6c7 Ok azione clona + update 2023-01-18 09:50:28 +01:00
zaccaria.majid 8e79305eac fix navigazione 2023-01-18 09:39:28 +01:00
Samuele Locatelli d88b0fac6f Pulizia metodi da step inutili 2023-01-18 08:45:56 +01:00
Samuele Locatelli 8d3a69afc1 Singolo componente x RA :
- clona
- display
2023-01-18 08:39:51 +01:00
Samuele Locatelli b00f5f26a6 OK CloneRA in memoria, da sistemare display + insert... 2023-01-17 21:07:02 +01:00
Samuele Locatelli 492d6fa9f4 Review grafica RA (effetto msussato 2023-01-17 19:58:11 +01:00
Samuele Locatelli df3f5e5625 Merge branch 'develop' of https://gitlab.steamware.net/steamware/gpw_next into develop 2023-01-17 19:20:12 +01:00
Samuele Locatelli 2b48f19f92 Update x gestione delete e approva 2023-01-17 19:20:10 +01:00
Samuele Locatelli 223607f649 Fix gestione IP (solo su jumper) x tempi timbrature 2023-01-17 17:49:14 +01:00
zaccaria.majid 226459c819 Merge branch 'develop' of https://gitlab.steamware.net/steamware/gpw_next into develop 2023-01-17 17:41:43 +01:00
zaccaria.majid c50452f441 fix grafico ore totali progetto 2023-01-17 17:41:37 +01:00
Samuele Locatelli 7cb2ad724c Merge branch 'develop' of https://gitlab.steamware.net/steamware/gpw_next into develop 2023-01-17 17:23:35 +01:00
Samuele Locatelli 742bda00c1 Inizio modifica x gestione IPV4 e devName 2023-01-17 17:22:45 +01:00
zaccaria.majid b8073b5a73 aggiunto caricamento jumper 2023-01-17 17:02:48 +01:00
zaccaria.majid 5be8e2735e fix grafico prog 2023-01-17 17:00:29 +01:00
zaccaria.majid 6458f63c4a Merge branch 'develop' of https://gitlab.steamware.net/steamware/gpw_next into develop 2023-01-17 16:22:07 +01:00
zaccaria.majid 1c9d19daf9 aggiunto comportamento giuto x prog 2023-01-17 16:21:59 +01:00
zaccaria.majid f332efba77 fix dtcard parametrica 2023-01-17 15:28:48 +01:00
Samuele Locatelli 74b4c06f75 Merge branch 'develop' of https://gitlab.steamware.net/steamware/gpw_next into develop 2023-01-17 14:20:16 +01:00
Samuele Locatelli 605c68d3d5 Update conf x reload contenuto lista timbrature 2023-01-17 14:20:13 +01:00
zaccaria.majid 5166c4bc5e Merge branch 'develop' of https://gitlab.steamware.net/steamware/gpw_next into develop 2023-01-17 13:25:07 +01:00
zaccaria.majid 54d9dade4b creata card x visualizzazione prog 2023-01-17 13:25:00 +01:00
Samuele Locatelli 83ab057286 Merge tag 'UpdateWrkLogSpacing' into develop
Aggiornamento spaziatura WrkLog: fix riordino record infa se lettura da
DB
2023-01-17 13:11:18 +01:00
Samuele Locatelli a197d61ddb Merge branch 'release/UpdateWrkLogSpacing' 2023-01-17 13:10:52 +01:00
Samuele Locatelli 074eaf343d GPW.Core.WRKLOG
- fix spaziatura x errato ordinamento record
2023-01-17 13:10:16 +01:00
Samuele Locatelli d85ede57c1 Eliminato cortocircuito sync/async 2023-01-17 12:34:15 +01:00
Samuele Locatelli 1162160350 Merge branch 'develop' of https://gitlab.steamware.net/steamware/gpw_next into develop 2023-01-17 12:27:31 +01:00
Samuele Locatelli e72e975754 Update comportamento toast 2023-01-17 12:27:28 +01:00
zaccaria.majid 5cfc4bb865 fix errore compilazione 2023-01-17 12:25:25 +01:00
Samuele Locatelli 5dcbe3ed46 Test timbrature 2023-01-17 12:25:02 +01:00
zaccaria.majid 3e2160d64d Merge branch 'develop' of https://gitlab.steamware.net/steamware/gpw_next into develop 2023-01-17 12:09:38 +01:00
zaccaria.majid e417edf727 aggiunti componenti per progetti 2023-01-17 12:09:08 +01:00
Samuele Locatelli 3b862aa03f Update con toast post timbrature 2023-01-17 11:51:01 +01:00
Samuele Locatelli 09581bd653 Update comportamento timbrature 2023-01-17 11:05:18 +01:00
Samuele Locatelli 44acbb9360 Fix errore update in cambio pagina 2023-01-17 09:03:50 +01:00
Samuele Locatelli 3bffd2b78c Fix salto a progetti + reload pagina 2023-01-17 08:23:30 +01:00
Samuele Locatelli 52c73973e6 Fix condizione reload x admin 2023-01-16 19:44:56 +01:00
Samuele Locatelli 80e4590abe Refresh grafico 2023-01-16 18:56:55 +01:00
Samuele Locatelli b1d0bbf780 Merge branch 'develop' of https://gitlab.steamware.net/steamware/gpw_next into develop 2023-01-16 18:44:25 +01:00
Samuele Locatelli 8051a1adb3 Aggiunta link in bottom 2023-01-16 18:44:22 +01:00
zaccaria.majid b4562b6c83 Merge branch 'develop' of https://gitlab.steamware.net/steamware/gpw_next into develop 2023-01-16 18:42:36 +01:00
zaccaria.majid 80febcc6cb cambio colore bg 2023-01-16 18:42:30 +01:00
Samuele Locatelli 18b4c113d1 Testo in timbr list parametrico 2023-01-16 18:39:05 +01:00
Samuele Locatelli 1a324a1cd9 aggiunta brutale admin 2023-01-16 18:32:14 +01:00
Samuele Locatelli f4e02e6f6f Update link QR x multiplot 2023-01-16 18:29:38 +01:00
Samuele Locatelli 11702db3e5 Merge branch 'develop' of https://gitlab.steamware.net/steamware/gpw_next into develop 2023-01-16 18:18:03 +01:00
Samuele Locatelli b8d4bd1a65 Aggiunta QR x dipendente 2023-01-16 18:18:00 +01:00
zaccaria.majid 26a97ed6ec aggiunta gestione mancate timbrature 2023-01-16 17:54:06 +01:00
Samuele Locatelli c33927fd93 Merge branch 'develop' of https://gitlab.steamware.net/steamware/gpw_next into develop 2023-01-16 17:31:19 +01:00
Samuele Locatelli f73891da9e Check Aggiunta componente timbr user 2023-01-16 17:31:17 +01:00
zaccaria.majid 9a2f0a2fb8 Merge branch 'develop' of https://gitlab.steamware.net/steamware/gpw_next into develop 2023-01-16 17:08:51 +01:00
zaccaria.majid 59092a472b gestione click gauge ore lavorate 2023-01-16 17:08:45 +01:00
Samuele Locatelli 3d24578a3b Merge branch 'develop' of https://gitlab.steamware.net/steamware/gpw_next into develop 2023-01-16 16:43:09 +01:00
Samuele Locatelli ff0b84042c Timbrature:
- OK approvazione
- OK scambio IN/OUT
- OK eliminazione
2023-01-16 16:43:03 +01:00
zaccaria.majid b43d849f3e Merge branch 'develop' of https://gitlab.steamware.net/steamware/gpw_next into develop 2023-01-16 16:10:09 +01:00
zaccaria.majid 9b382867f6 aggiunta funzione mancata timbratura
+ aggiornamento grafico
2023-01-16 16:10:01 +01:00
Samuele Locatelli e694553f89 Aggiunto gestione reset authKey x admin 2023-01-16 14:30:38 +01:00
Samuele Locatelli ce30ca1eba Sposstato toggler in componenti 2023-01-16 14:30:31 +01:00
Samuele Locatelli b604046a2c Merge branch 'develop' of https://gitlab.steamware.net/steamware/gpw_next into develop 2023-01-16 12:19:54 +01:00
Samuele Locatelli 7713465e00 Correzione authKey x encoding URL 2023-01-16 12:19:46 +01:00
zaccaria.majid b549ef07a4 Merge branch 'develop' of https://gitlab.steamware.net/steamware/gpw_next into develop 2023-01-16 11:39:49 +01:00
zaccaria.majid 206f5e9bc4 fix scrittura diversi colori per mancate timbrature 2023-01-16 11:39:42 +01:00
Samuele Locatelli a6b8eeff5d Merge branch 'develop' of https://gitlab.steamware.net/steamware/gpw_next into develop 2023-01-16 11:37:49 +01:00
Samuele Locatelli ee36394b3d Test invio email 2023-01-16 11:37:46 +01:00
Samuele Locatelli 3dd6ac1018 Update metodo x mancate timbrature 2023-01-16 11:37:21 +01:00
zaccaria.majid 5a62abbdb0 Merge branch 'develop' of https://gitlab.steamware.net/steamware/gpw_next into develop 2023-01-16 09:39:36 +01:00
zaccaria.majid 6cb0544754 aggiornamento grafico 2023-01-16 09:39:27 +01:00
Samuele Locatelli a83ff37995 Fix calcolo orario live 2023-01-16 09:38:42 +01:00
Samuele Locatelli 259679c178 tentativo toast (NO way) 2023-01-16 09:10:54 +01:00
Samuele Locatelli ce176cd47e FIx vari display 2023-01-16 08:35:32 +01:00
Samuele Locatelli a781bbf6ff Update conf favicon 2023-01-14 12:48:10 +01:00
Samuele Locatelli 84d40f830c Inizio creazione apgine supporto/recupero 2023-01-14 11:13:30 +01:00
Samuele Locatelli 4902065f0a Ulteriore modifica x fix hostname calc 2023-01-14 10:21:10 +01:00
Samuele Locatelli ccc02a48b3 Rimosso problema GetDns x app 2023-01-14 10:16:46 +01:00
Samuele Locatelli f5c764eafb SMART:
- Update link reload (da testare)
- update colore in reload
2023-01-14 10:07:25 +01:00
Samuele Locatelli a9ac7f284f Calendario:
- Rimessi metodi necessari a modifiche Zac
- code refactor
2023-01-13 19:28:41 +01:00
Samuele Locatelli baa6a84ad5 cleanup 2023-01-13 19:24:45 +01:00
Samuele Locatelli e2778a51ec Merge branch 'develop' of https://gitlab.steamware.net/steamware/gpw_next into develop 2023-01-13 19:21:04 +01:00
Samuele Locatelli a0c831af95 Cache su server gestione dei dati di devSecrets 2023-01-13 19:18:18 +01:00
Samuele Locatelli 37ae849c93 Completato update e pulizia x gestione IP da solo Blazor 2023-01-13 19:06:32 +01:00
Samuele Locatelli 062b3fa556 Modifica x gestione checkIp tutto in blazor (NO JS) 2023-01-13 19:01:22 +01:00
Samuele Locatelli cea53a124c Fix comportamento display a cascata 2023-01-13 18:47:41 +01:00
zaccaria.majid 796679f91b Merge branch 'develop' of https://gitlab.steamware.net/steamware/gpw_next into develop 2023-01-13 17:23:23 +01:00
zaccaria.majid bf9241aacb Aggiunta modalità calcolo timbratura approvata 2023-01-13 17:22:44 +01:00
Samuele Locatelli a18011e45d Inizio spostsamento lettura dati tra componenti Smart 2023-01-13 17:20:34 +01:00
Samuele Locatelli a2154c0b84 Merge branch 'develop' of https://gitlab.steamware.net/steamware/gpw_next into develop 2023-01-13 14:34:20 +01:00
Samuele Locatelli 5f06c38bf5 UPdate comportamento timbratura 2023-01-13 14:34:16 +01:00
zaccaria.majid 4307e6fe42 Merge branch 'develop' of https://gitlab.steamware.net/steamware/gpw_next into develop 2023-01-13 12:53:51 +01:00
zaccaria.majid ad8fbf4852 continuo calendario 2023-01-13 12:53:44 +01:00
Samuele Locatelli 0e71534de7 Merge branch 'develop' of https://gitlab.steamware.net/steamware/gpw_next into develop 2023-01-13 12:29:39 +01:00
Samuele Locatelli 3705bf6e5f inizio gestione nextIsEntrata 2023-01-13 12:29:36 +01:00
zaccaria.majid 6a4dff3386 Merge branch 'develop' of https://gitlab.steamware.net/steamware/gpw_next into develop 2023-01-13 11:40:50 +01:00
zaccaria.majid 41f65df85d aggiornamento grafico 2023-01-13 11:40:36 +01:00
Samuele Locatelli c460b5fb77 Merge branch 'develop' of https://gitlab.steamware.net/steamware/gpw_next into develop 2023-01-13 11:39:13 +01:00
Samuele Locatelli 88ab08e4b8 Fix colore display post azione 2023-01-13 11:39:10 +01:00
Samuele Locatelli e39e62e4cc update secondi che pulsano 2023-01-13 11:36:05 +01:00
zaccaria.majid 495885a2be Merge branch 'develop' of https://gitlab.steamware.net/steamware/gpw_next into develop 2023-01-13 11:27:50 +01:00
zaccaria.majid ac26e1fc37 grafica componente calendario 2023-01-13 11:27:43 +01:00
Samuele Locatelli 9c089aad42 Update x lib bootstrap 2023-01-13 11:27:26 +01:00
Samuele Locatelli 9843c061e6 Fix display entrata/uscita con pulse 2023-01-13 11:05:15 +01:00
Samuele Locatelli df91add2f3 Merge branch 'develop' of https://gitlab.steamware.net/steamware/gpw_next into develop 2023-01-13 10:10:55 +01:00
Samuele Locatelli 96c430abd3 Fix update stato buttons x entrata/uscita 2023-01-13 10:10:24 +01:00
zaccaria.majid 23caf99c91 inizio gestione mancate timbrature 2023-01-13 09:47:13 +01:00
Samuele Locatelli 3f94ad59de Fiox btn 2023-01-13 08:28:10 +01:00
Samuele Locatelli 28296cb22a Merge branch 'develop' of https://gitlab.steamware.net/steamware/gpw_next into develop 2023-01-13 08:26:58 +01:00
Samuele Locatelli f482e53a84 Fix tempRil e reset 2023-01-13 08:26:54 +01:00
zaccaria.majid 821b82d242 Merge branch 'develop' of https://gitlab.steamware.net/steamware/gpw_next into develop 2023-01-12 18:32:08 +01:00
zaccaria.majid 235a074147 bozza modale 2023-01-12 18:32:02 +01:00
Samuele Locatelli 9781967c4a Fix WRKLOG: scambio sempre possibile 2023-01-12 17:43:33 +01:00
Samuele Locatelli 6789a29661 Fix timb <--> rilTemp 2023-01-12 17:39:49 +01:00
Samuele Locatelli 1afd110487 Update x gestione pagina grafici temp 2023-01-12 17:31:36 +01:00
Samuele Locatelli 22e2141cf3 Completato spostamento grafici temperatura 2023-01-12 17:08:33 +01:00
Samuele Locatelli 896d2fbb12 Spostato grafici in area componenti condivisi 2023-01-12 16:59:45 +01:00
Samuele Locatelli 2dc27d3917 codemaid GpwDataService 2023-01-12 16:35:36 +01:00
Samuele Locatelli 231fb1209b inizio udpate data adapter core smart 2023-01-12 16:34:48 +01:00
Samuele Locatelli 5d31b10f75 Update WRKLOG x inclusione componenti base 2023-01-12 16:34:40 +01:00
Samuele Locatelli eb37fa4d0d refresh componenti 2023-01-12 16:16:53 +01:00
Samuele Locatelli 35d7fea84b Merge branch 'develop' of https://gitlab.steamware.net/steamware/gpw_next into develop 2023-01-12 15:59:35 +01:00
Samuele Locatelli 319680a974 Tolto idx utente da session storage 2023-01-12 15:58:11 +01:00
zaccaria.majid dfa0806326 divisione code behind regnewdev 2023-01-12 15:33:47 +01:00
Samuele Locatelli 5d635662c8 Aggiunta procedura logout 2023-01-12 13:04:54 +01:00
Samuele Locatelli 1b88196574 Recupero IP OK 2023-01-12 12:54:28 +01:00
Samuele Locatelli 8fd0c430f9 update con segnaposto pagine necessarie 2023-01-12 12:28:43 +01:00
Samuele Locatelli b8ea6f5c7a Completata gestione login/jumper/checkUser 2023-01-12 12:15:14 +01:00
Samuele Locatelli f82e8a6506 Update login con jumper OK... 2023-01-12 11:38:25 +01:00
zaccaria.majid e4d3726203 fix force reload 2023-01-12 09:22:45 +01:00
zaccaria.majid ffffb7ce63 Merge branch 'develop' of https://gitlab.steamware.net/steamware/gpw_next into develop 2023-01-11 17:31:15 +01:00
zaccaria.majid 9eed839919 continuo login
con jumper
2023-01-11 17:30:17 +01:00
Samuele Locatelli f523b19968 Merge branch 'develop' 2023-01-11 14:19:46 +01:00
Samuele Locatelli 41de920ac3 Fix nuget blazored + componente top 2023-01-11 14:19:19 +01:00
Samuele Locatelli df00a96295 Merge tag 'FixDeviceUpsert' into develop
Fix metodo scrittura upsert
2023-01-11 14:15:54 +01:00
Samuele Locatelli d53ec5e37c Merge branch 'hotfix/FixDeviceUpsert' 2023-01-11 14:15:48 +01:00
Samuele Locatelli 90683eb2ca Merge branch 'develop' into hotfix/FixDeviceUpsert 2023-01-11 14:15:39 +01:00
Samuele Locatelli ca49ba4065 Fix scrittura upsert device 2023-01-11 14:15:18 +01:00
Samuele Locatelli 5a24e4f6b4 Merge tag 'FixWrkLogRedis' into develop
Fix Redis cache x WrkLog
2023-01-11 14:12:46 +01:00
Samuele Locatelli 100a0ee759 Merge branch 'release/FixWrkLogRedis' 2023-01-11 14:12:33 +01:00
zaccaria.majid f09f8ab566 Merge branch 'develop' of https://gitlab.steamware.net/steamware/gpw_next into develop 2023-01-11 12:21:16 +01:00
zaccaria.majid 825622144e aggiunto local service 2023-01-11 12:21:11 +01:00
Samuele Locatelli 8e6e3b55f4 Aggiunto controller dati x AnagDevices 2023-01-11 12:08:49 +01:00
Samuele Locatelli bda4ea12a2 Merge remote-tracking branch 'origin/develop' into develop 2023-01-11 11:45:07 +01:00
zaccaria.majid b408719b53 bozza colore today 2023-01-11 11:41:41 +01:00
zaccaria.majid a8147d257c Merge branch 'develop' of https://gitlab.steamware.net/steamware/gpw_next into develop 2023-01-11 11:28:54 +01:00
zaccaria.majid 347aa867c0 fix grafici 2023-01-11 11:28:42 +01:00
Samuele Locatelli 5c670365ec TypoFix 2023-01-11 11:28:37 +01:00
Samuele Locatelli 7c74090eb3 Merge branch 'develop' of https://gitlab.steamware.net/steamware/gpw_next into develop 2023-01-11 11:07:23 +01:00
Samuele Locatelli 1a90e4b729 Completato switch cache x WRKLOG 2023-01-11 11:07:20 +01:00
zaccaria.majid f88e5e3d07 prova drag 2023-01-11 10:26:24 +01:00
Samuele Locatelli 2a0c8d09d4 Fix Display Smart 2023-01-11 09:51:49 +01:00
Samuele Locatelli f13e712470 Ok colore date 2023-01-11 09:47:02 +01:00
Samuele Locatelli e7d100e7d3 Fix round tempi 2023-01-11 09:38:05 +01:00
Samuele Locatelli 0973c677a1 Update grafica OK x calendario 2023-01-11 09:25:16 +01:00
Samuele Locatelli 9b91c95369 Update smart x componenti e gest calendario(start) 2023-01-11 09:16:30 +01:00
Samuele Locatelli 15c2733e0e Eliminaizone comp da libreria --> Smart 2023-01-11 09:16:20 +01:00
Samuele Locatelli 19a015e072 Ancora cache fix x WrkLog 2023-01-11 09:16:06 +01:00
Samuele Locatelli e77c7b3c7f Continuo fix dati x cambio tipologia cache 2023-01-11 07:58:41 +01:00
Samuele Locatelli 882ca626de Ancora update cache worklog 2023-01-10 21:01:33 +01:00
Samuele Locatelli 4c87399a32 Update lettura dati x SMART 2023-01-10 20:48:34 +01:00
Samuele Locatelli b18820ce02 Prima gestione con redis cache NewtonSoft 2023-01-10 20:48:28 +01:00
Samuele Locatelli d91455492e eliminato riferimento circolare clienti da progetti 2023-01-10 20:48:01 +01:00
zaccaria.majid 9357519813 fix lettura da db 2023-01-10 18:40:55 +01:00
Samuele Locatelli 23886b4109 Aggiunta preliminare script x versNumb 2023-01-10 18:18:00 +01:00
Samuele Locatelli 44f9414f0d Fix compilazione SMART 2023-01-10 18:17:47 +01:00
Samuele Locatelli 18865fa274 Fix core data service 2023-01-10 17:58:11 +01:00
Samuele Locatelli a65b47623d Merge remote-tracking branch 'origin/develop' into develop 2023-01-10 17:56:55 +01:00
Samuele Locatelli 0df42a5dce Merge remote-tracking branch 'origin/develop' into develop 2023-01-10 17:52:24 +01:00
Samuele Locatelli 0ebd0133c9 Test modifica avvio cache redis 2023-01-10 17:50:35 +01:00
zaccaria.majid 34471c6073 Bozza lettura dati 2023-01-10 17:46:57 +01:00
Samuele Locatelli 405d73c3c7 Merge branch 'develop' of https://gitlab.steamware.net/steamware/gpw_next into develop 2023-01-10 17:26:44 +01:00
Samuele Locatelli 932e9a75dd Fix redis flush cache 2023-01-10 17:26:42 +01:00
zaccaria.majid a28c0fbac5 Merge branch 'develop' of https://gitlab.steamware.net/steamware/gpw_next into develop 2023-01-10 17:18:48 +01:00
zaccaria.majid 982aace898 aggiunta libreria font awesome +
inizio pagina timbratura
2023-01-10 17:18:40 +01:00
Samuele Locatelli 9faefb3746 Aggiunta recupero dati DailyDTO (da testare!) 2023-01-10 17:15:15 +01:00
Samuele Locatelli 31c17016bd Update CI-CD 2023-01-10 16:35:15 +01:00
Samuele Locatelli 6882f43733 Typo CI/CD 2023-01-10 15:19:47 +01:00
Samuele Locatelli 812023ae42 refresh params x deploy 2023-01-10 15:19:03 +01:00
Samuele Locatelli 515ee06c00 Aggiunta CI-CD x deploy 2023-01-10 15:18:56 +01:00
Samuele Locatelli 60c1de1e38 Bozza metodoa ccesso dati 2023-01-10 14:59:17 +01:00
Samuele Locatelli fcc13c4fba Fix SMART 2023-01-10 14:51:36 +01:00
zaccaria.majid 50b8753a1a Merge branch 'develop' of https://gitlab.steamware.net/steamware/gpw_next into develop 2023-01-10 14:42:52 +01:00
zaccaria.majid 9c8ec35bfd fix gpw smart 2023-01-10 14:42:44 +01:00
zaccaria.majid e2508984a2 modifiche calendario e aggiunta comportamento bottom 2023-01-10 14:33:14 +01:00
Samuele Locatelli 282c03abcc Merge tag 'UnificazioneOrePermessi' into develop
Unificazione ore permessi + fix vari componenti libreria nuova
2023-01-10 12:15:35 +01:00
Samuele Locatelli 81466594c8 Merge branch 'release/UnificazioneOrePermessi' 2023-01-10 12:15:14 +01:00
Samuele Locatelli cc8495f211 Fix gauge SVG 2023-01-10 10:12:01 +01:00
Samuele Locatelli 1ce55c272b Fix gauge totalmente svg parametrico 2023-01-10 09:49:50 +01:00
Samuele Locatelli 972c781548 Merge branch 'develop' of https://gitlab.steamware.net/steamware/gpw_next into develop 2023-01-09 19:30:47 +01:00
Samuele Locatelli a8a9b88d89 CORE.WrkLog:
- unificazione Malattie con altri pemessi
2023-01-09 19:30:43 +01:00
zaccaria.majid 54b7dbb1c6 fix centratura calendario 2023-01-09 18:36:54 +01:00
zaccaria.majid 6ea98758ac Merge branch 'develop' of https://gitlab.steamware.net/steamware/gpw_next into develop 2023-01-09 18:10:57 +01:00
zaccaria.majid 079da2b384 fix grafico calendario 2023-01-09 18:10:46 +01:00
Samuele Locatelli a5529352ad Merge branch 'develop' of https://gitlab.steamware.net/steamware/gpw_next into develop 2023-01-09 17:13:07 +01:00
Samuele Locatelli 21a51fed05 minor fix footer tabella 2023-01-09 17:13:04 +01:00
zaccaria.majid 2296ecf5b0 Merge branch 'develop' of https://gitlab.steamware.net/steamware/gpw_next into develop 2023-01-09 17:11:46 +01:00
zaccaria.majid aa2d400e8d fix grafico 2023-01-09 17:11:17 +01:00
Samuele Locatelli 8750d354b0 Fix spostamenti orizzontali in sel vista calendario 2023-01-09 17:08:48 +01:00
Samuele Locatelli ba9491220c FIx display singola riga calendario 2023-01-09 17:01:41 +01:00
Samuele Locatelli 6efa1c6dcb Fix display calendario con icone rounded 2023-01-09 16:38:05 +01:00
zaccaria.majid 28e1dac334 Merge branch 'develop' of https://gitlab.steamware.net/steamware/gpw_next into develop 2023-01-09 15:59:38 +01:00
zaccaria.majid e5e47a3e88 aggiunti componenti bottm e top 2023-01-09 15:59:31 +01:00
Samuele Locatelli 1e2a09a469 Prima demo componente table mese 2023-01-09 15:54:17 +01:00
zaccaria.majid 2ef42fefd5 aggiunta card data +
aggiunta bottoni entrata uscita +
style gauge
2023-01-09 14:53:59 +01:00
Samuele Locatelli c8cd8f090c Aggiunto mixin x less calss 2023-01-09 12:42:33 +01:00
Samuele Locatelli 33055e045d Update display gauge 2023-01-09 12:37:08 +01:00
Samuele Locatelli 60793c02a5 Merge branch 'develop' of https://gitlab.steamware.net/steamware/gpw_next into develop 2023-01-09 12:03:55 +01:00
Samuele Locatelli 17dfe8fc8a Inizio gestione mese 2023-01-09 12:03:52 +01:00
zaccaria.majid 8055de2e9c fix percentuali gauge 2023-01-09 12:03:21 +01:00
Samuele Locatelli b8609a3917 Aggiunta classe component library 2023-01-09 09:38:35 +01:00
Samuele Locatelli 6142f938bd Merge remote-tracking branch 'origin/NewSmartGPW' into develop 2023-01-09 08:21:42 +01:00
Samuele Locatelli f24cd46b6b Merge branch 'main' into develop 2023-01-05 20:33:46 +01:00
Samuele Locatelli ed5f69f576 Merge tag 'FixSelDatePErm' into develop
Fix seelzione date
2023-01-05 20:33:38 +01:00
Samuele Locatelli ce1d6f0cc8 Fix messaggio wait insert/delete permessi e insert malattie 2023-01-05 20:33:24 +01:00
Samuele Locatelli 2bd0f71785 Fix invio email permessi 2023-01-05 18:45:29 +01:00
Samuele Locatelli e6c03a18d2 Merge branch 'release/FixSelDatePErm' 2023-01-05 15:42:30 +01:00
Samuele Locatelli 78ea1c7ff9 Fix periodo sel date 2023-01-05 15:40:29 +01:00
Samuele Locatelli ff970b2519 Merge branch 'main' into develop 2023-01-05 14:56:00 +01:00
Samuele Locatelli fe9af25bfb Merge tag 'FixDatiAltrui' into develop
Fix grafici e reload malattie
2023-01-05 14:55:53 +01:00
Samuele Locatelli 6e4e76262b Merge branch 'develop' 2023-01-05 14:55:42 +01:00
Samuele Locatelli 86bfadb725 Merge branch 'release/FixDatiAltrui' 2023-01-05 14:55:33 +01:00
Samuele Locatelli 894882caf7 refresh librerie 2023-01-05 14:55:23 +01:00
Samuele Locatelli 060dbd9ac9 Minor fix grafici 2023-01-05 14:18:40 +01:00
Samuele Locatelli 5becae35af Redo fix toggler 2023-01-05 14:04:39 +01:00
Samuele Locatelli 544ff232a9 Fix reload malattie altrui! 2023-01-05 14:01:16 +01:00
Samuele Locatelli 980dbfd45c MaybeFix Malattie 2023-01-05 10:59:22 +01:00
Samuele Locatelli 4f6d38e1ce Fix display malattie non proprie 2023-01-05 10:51:57 +01:00
Samuele Locatelli 9d4282c899 Merge branch 'main' into develop 2023-01-05 10:32:57 +01:00
Samuele Locatelli 0eece9d283 Merge tag 'UpdateBootstrap5' into develop
Update bootstrap 5
2023-01-05 10:32:44 +01:00
Samuele Locatelli 95faf82065 Aggiunta permessi altrui 2023-01-05 10:32:41 +01:00
Samuele Locatelli 02aabeb07e Merge branch 'release/UpdateBootstrap5' 2023-01-05 10:26:09 +01:00
Samuele Locatelli f378470c0b Completata review generale x bootstrap 5 ! 2023-01-05 10:25:42 +01:00
Samuele Locatelli 7fcc248ddf Update lib bootstrap 4-->5 2023-01-05 10:12:36 +01:00
Samuele Locatelli c32571dc47 Bozza toggler 2023-01-05 06:51:23 +01:00
Samuele Locatelli e00e0ec939 Fix display selettore 2023-01-04 19:19:19 +01:00
Samuele Locatelli 3ae367bb10 Merge tag 'AddMonthSel' into develop
Fix selezione multimese/singolo mese
2023-01-04 19:12:03 +01:00
Samuele Locatelli 78db63442f Merge branch 'release/AddMonthSel' 2023-01-04 19:11:48 +01:00
Samuele Locatelli 2fe59376a1 Fix sel mese 2023-01-04 19:11:07 +01:00
Samuele Locatelli c27534ee93 Aggiunta toggle modo calendario 2023-01-04 19:04:44 +01:00
Samuele Locatelli 8bd62b9ab0 Merge remote-tracking branch 'origin/main' into develop 2023-01-04 15:10:32 +01:00
Samuele Locatelli df8255447c Tolti commenti 2023-01-04 15:09:57 +01:00
Samuele Locatelli 59f13afcd2 Display permessi solo x singolo utente 2023-01-03 16:30:42 +01:00
Samuele Locatelli 0bc73851e1 GPW_NEXT:
- completata prima release gestione permessi/ferie/malattie
2023-01-03 16:15:55 +01:00
Samuele Locatelli d643e9e0be Ancora update gestione richieste con causali corrette 2023-01-03 12:09:42 +01:00
Samuele Locatelli a583e8b9e8 Prima gestione richeiste perm/fer/104 2023-01-03 11:52:25 +01:00
Samuele Locatelli e20835878c Typo! 2023-01-03 08:00:50 +01:00
Samuele Locatelli 07085d3260 Nascosto appunti x "non Sam" 2023-01-03 07:57:17 +01:00
Samuele Locatelli bec80c135e Aggiunta preliminare calendario dettagli chiusure ufficio 2023-01-02 19:15:51 +01:00
Samuele Locatelli 31d18243e9 Gestione email inserimento/eliminazione malattia 2023-01-02 17:10:20 +01:00
Samuele Locatelli d7bfb7a5d1 Update pagina malattia (OK lato utente) 2023-01-02 16:43:23 +01:00
Samuele Locatelli b6c6194da3 NavMenu (preliminare) 2023-01-02 14:44:50 +01:00
Samuele Locatelli a9a4b371d2 Aggiunta preliminare appunti 2023-01-02 14:44:37 +01:00
Samuele Locatelli 030fba6462 Aggiunta modello x RegMalattie 2023-01-02 14:44:28 +01:00
Samuele Locatelli a92c9c4694 Merge tag 'AddTaskFromListPage' into develop
Aggiunta funzionalità clona/delete in lista attività
2022-10-14 16:48:28 +02:00
1953 changed files with 374922 additions and 33597 deletions
+215 -46
View File
@@ -1,6 +1,8 @@
variables:
VERS_MAIN: '2.9'
VERS_MAIN: '3.0'
NEW_REL: ''
APP_NAME: 'GPW.App'
SOL_NAME: 'GPW.APP'
# helper x fix pacchetti nuget da repo locale nexus.steamware.net
.nuget-fix: &nuget-fix
@@ -19,9 +21,45 @@ variables:
if (! [String]::IsNullOrWhiteSpace($hasSource)) {
dotnet nuget remove source nexus-proxy-v3
}
dotnet nuget add source https://nexus.steamware.net/repository/nuget-group-3/index.json -n "Steamware Nexus" -u nugetUser -p viaDante16 --store-password-in-clear-text
dotnet nuget add source https://nexus.steamware.net/repository/nuget-group-3/index.json -n "Steamware Nexus" -u nugetUser -p $NEXUS_PASSWD --store-password-in-clear-text
echo "Steamware Nexus Source added"
# helper creazione hash files x IIS
.hashBuild: &hashBuild
- |
$Target = $env:APP_NAME + "\bin\publish\" + $env:APP_NAME + ".zip"
$MD5 = Get-FileHash $Target -Algorithm MD5
$SHA1 = Get-FileHash $Target -Algorithm SHA1
New-Item $Target".md5"
New-Item $Target".sha1"
$MD5.Hash | Set-Content -Path $Target".md5"
$SHA1.Hash | Set-Content -Path $Target".sha1"
echo "Created HASH files for $Target"
# helper x send su NEXUS x pack
.nexusUpload: &nexusUpload
- |
Set-Alias mCurl C:\Windows\system32\curl.exe
$fileVers = $env:APP_NAME + "\Resources\VersNum.txt"
$VersNumb = Get-Content $fileVers
echo "Curr Version: $VersNumb"
if($CI_COMMIT_BRANCH -eq "master")
{
$version = "stable"
}
else
{
$version = "unstable"
}
$File2Send = Get-ChildItem($env:APP_NAME + "\bin\publish\*")
ForEach ($File in $File2Send) {
$FileName = Split-Path $File -leaf
mCurl -v -u GitLab:$NEXUS_PASSWD --upload-file $File https://nexus.steamware.net/repository/SWS/$env:NEXUS_PATH/$version/LAST/$FileName
mCurl -v -u GitLab:$NEXUS_PASSWD --upload-file $File https://nexus.steamware.net/repository/SWS/$env:NEXUS_PATH/$version/ARCHIVE/$VersNumb/$FileName
}
mCurl -v -u GitLab:$NEXUS_PASSWD --upload-file "$env:APP_NAME\Resources\manifest.xml" https://nexus.steamware.net/repository/SWS/$env:NEXUS_PATH/$version/LAST/manifest.xml
mCurl -v -u GitLab:$NEXUS_PASSWD --upload-file "$env:APP_NAME\Resources\ChangeLog.html" https://nexus.steamware.net/repository/SWS/$env:NEXUS_PATH/$version/LAST/ChangeLog.html
stages:
- build
@@ -31,95 +69,195 @@ stages:
CORE.Api:build:
stage: build
tags:
- win
before_script:
- *nuget-fix
- dotnet restore GPW.CORE.WRKLOG.sln
script:
- dotnet build GPW.CORE.Api/GPW.CORE.Api.csproj
stage: build
tags:
- win
variables:
APP_NAME: GPW.CORE.Api
SOL_NAME: GPW.CORE.WRKLOG
before_script:
- *nuget-fix
- dotnet restore "$env:SOL_NAME.sln"
script:
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
# ---------- BUILD ----------
CORE.WLOG:build:
stage: build
tags:
- win
variables:
APP_NAME: GPW.CORE.WRKLOG
SOL_NAME: GPW.CORE.WRKLOG
before_script:
- *nuget-fix
- dotnet restore GPW.CORE.WRKLOG.sln
- dotnet restore "$env:SOL_NAME.sln"
script:
- dotnet build GPW.CORE.WRKLOG/GPW.CORE.WRKLOG.csproj
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
CORE.Smart:build:
stage: build
tags:
- win
variables:
APP_NAME: GPW.CORE.Smart
SOL_NAME: GPW.CORE.Smart
before_script:
- *nuget-fix
- dotnet restore "$env:SOL_NAME.sln"
script:
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
# ---------- STAGING ----------
CORE.Api:staging:
stage: staging
tags:
- win
- win
variables:
APP_NAME: GPW.CORE.Api
SOL_NAME: GPW.CORE.WRKLOG
only:
- develop
needs: ["CORE.Api:build"]
before_script:
- *nuget-fix
- *nuget-fix
- dotnet restore "$env:SOL_NAME.sln"
script:
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true GPW.CORE.Api/GPW.CORE.Api.csproj
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
CORE.WLOG:staging:
stage: staging
tags:
- win
variables:
APP_NAME: GPW.CORE.WRKLOG
SOL_NAME: GPW.CORE.WRKLOG
only:
- develop
needs: ["CORE.WLOG:build"]
before_script:
- *nuget-fix
- *nuget-fix
- dotnet restore "$env:SOL_NAME.sln"
script:
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true GPW.CORE.WRKLOG/GPW.CORE.WRKLOG.csproj
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
CORE.Smart:staging:
stage: staging
tags:
- win
environment:
name: staging
url: https://iis01.egalware.com/GPW/CORE.Smart
variables:
APP_NAME: GPW.CORE.Smart
SOL_NAME: GPW.CORE.Smart
only:
- develop
needs: ["CORE.Smart:build"]
before_script:
- *nuget-fix
- dotnet restore "$env:SOL_NAME.sln"
script:
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
# ---------- DEPLOY ----------
CORE.Api:deploy:
stage: deploy
tags:
- win
only:
- main
needs: ["CORE.Api:build"]
script:
# IIS 02
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true GPW.CORE.Api/GPW.CORE.Api.csproj
# IIS DEV
- dotnet publish -p:PublishProfile=IIS03.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true GPW.CORE.Api/GPW.CORE.Api.csproj
stage: deploy
tags:
- win
environment:
name: production
url: https://seriate.egalware.com/GPW/CORE.Smart
variables:
APP_NAME: GPW.CORE.Api
SOL_NAME: GPW.CORE.WRKLOG
only:
- main
needs: ["CORE.Api:build"]
before_script:
- *nuget-fix
- dotnet restore "$env:SOL_NAME.sln"
script:
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
# IIS PROD
- dotnet publish -p:PublishProfile=IIS-PROD.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
CORE.WLOG:deploy:
stage: deploy
tags:
- win
only:
- main
needs: ["CORE.WLOG:build"]
script:
# IIS 02
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true GPW.CORE.WRKLOG/GPW.CORE.WRKLOG.csproj
# IIS DEV
- dotnet publish -p:PublishProfile=IIS03.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true GPW.CORE.WRKLOG/GPW.CORE.WRKLOG.csproj
stage: deploy
tags:
- win
variables:
APP_NAME: GPW.CORE.WRKLOG
SOL_NAME: GPW.CORE.WRKLOG
only:
- main
needs: ["CORE.WLOG:build"]
before_script:
- *nuget-fix
- dotnet restore "$env:SOL_NAME.sln"
script:
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
# IIS PROD
- dotnet publish -p:PublishProfile=IIS-PROD.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
CORE.Smart:deploy:
stage: deploy
tags:
- win
variables:
APP_NAME: GPW.CORE.Smart
SOL_NAME: GPW.CORE.Smart
only:
- main
needs: ["CORE.Smart:build"]
before_script:
- *nuget-fix
- dotnet restore "$env:SOL_NAME.sln"
script:
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
# IIS EXT
- dotnet publish -p:PublishProfile=IIS-EXT.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
# IIS INT
- dotnet publish -p:PublishProfile=IIS-INT.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
CORE.Api:release:
stage: release
tags:
- win
variables:
APP_NAME: GPW.CORE.Api
SOL_NAME: GPW.CORE.WRKLOG
only:
- main
except:
- branches
needs: ["CORE.Api:build"]
before_script:
- *nuget-fix
- dotnet restore "$env:SOL_NAME.sln"
artifacts:
paths:
- publish/
script:
- dotnet publish -c Release -o ./publish GPW.CORE.Api/GPW.CORE.Api.csproj
script:
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IISProfile.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release $env:APP_NAME/$env:APP_NAME.csproj -o:publish -p:verbosity=quiet
# qui il deploy su nexus...
- *hashBuild
- *nexusUpload
# script:
# - dotnet publish -c Release -o ./publish GPW.CORE.Api/GPW.CORE.Api.csproj
# ---------- RELEASE ----------
CORE.WLOG:release:
stage: release
tags:
- win
variables:
APP_NAME: GPW.CORE.WRKLOG
SOL_NAME: GPW.CORE.WRKLOG
only:
- main
except:
@@ -128,5 +266,36 @@ CORE.WLOG:release:
artifacts:
paths:
- publish/
script:
- dotnet publish -c Release -o ./publish GPW.CORE.WRKLOG/GPW.CORE.WRKLOG.csproj
script:
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IISProfile.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release $env:APP_NAME/$env:APP_NAME.csproj -o:publish -p:verbosity=quiet
# qui il deploy su nexus...
- *hashBuild
- *nexusUpload
# script:
# - dotnet publish -c Release -o ./publish GPW.CORE.WRKLOG/GPW.CORE.WRKLOG.csproj
CORE.Smart:release:
stage: release
tags:
- win
variables:
APP_NAME: GPW.CORE.Smart
SOL_NAME: GPW.CORE.Smart
only:
- main
except:
- branches
needs: ["CORE.Smart:build"]
artifacts:
paths:
- publish/
script:
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IISProfile.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release $env:APP_NAME/$env:APP_NAME.csproj -o:publish -p:verbosity=quiet
# qui il deploy su nexus...
- *hashBuild
- *nexusUpload
# script:
# - dotnet publish -c Release -o ./publish GPW.CORE.WRKLOG/GPW.CORE.WRKLOG.csproj
+98 -97
View File
@@ -10,16 +10,6 @@ namespace GPW.CORE.Api.Controllers
[ApiController]
public class ProjCheckController : ControllerBase
{
#region Private Fields
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
private readonly IEmailSender _emailSender;
private IConfiguration _configuration;
#endregion Private Fields
#region Public Constructors
/// <summary>
@@ -34,95 +24,11 @@ namespace GPW.CORE.Api.Controllers
_configuration = configuration;
_emailSender = emailSender;
dataService = DataService;
Log.Info("Avviata classe CheckProj");
Log.Info("Avviata classe ProjCheck");
}
#endregion Public Constructors
#region Protected Enums
protected enum logType
{
none,
local,
trace,
info,
warn
}
#endregion Protected Enums
#region Protected Properties
/// <summary>
/// Dataservice x accesso DB
/// </summary>
protected ApiDataService dataService { get; set; }
#endregion Protected Properties
#region Protected Methods
/// <summary>
/// Effettua log del tipo richiesto aggiungendo riga anche allo stringbuilder indicato
/// </summary>
/// <param name="message"></param>
/// <param name="tipoLog"></param>
/// <param name="currSB"></param>
protected void doLog(string message, logType tipoLog, ref StringBuilder currSB)
{
bool doLine = true;
switch (tipoLog)
{
case logType.info:
Log.Info(message);
break;
case logType.trace:
Log.Trace(message);
break;
case logType.warn:
Log.Warn(message);
break;
case logType.local:
break;
default:
case logType.none:
doLine = false;
break;
}
if (doLine)
{
currSB.AppendLine(message);
}
else
{
currSB.Append(message);
}
}
protected async Task sendEmail(string subject, string message)
{
string emailRaw = _configuration["MailDest:ProjCheck"];
List<string> emailDestList = emailRaw.Split(",").ToList();
foreach (var dest in emailDestList)
{
try
{
await _emailSender.SendEmailAsync(dest, subject, message);
}
catch (Exception exc)
{
Log.Error($"Eccezione durante invio email:{Environment.NewLine}dest: {dest} | subject {subject}{Environment.NewLine}{exc}");
}
}
}
#endregion Protected Methods
#region Public Methods
[HttpGet("ResAlloc")]
@@ -136,7 +42,7 @@ namespace GPW.CORE.Api.Controllers
int numFix = 0;
int numProj = 0;
int numFasi = 0;
string enableChiudiRaw = _configuration["EnableChiudiFasi"];
string enableChiudiRaw = _configuration["EnableChiudiFasi"] ?? "false";
bool enableChiudi = false;
if (!string.IsNullOrEmpty(enableChiudiRaw))
{
@@ -228,11 +134,106 @@ namespace GPW.CORE.Api.Controllers
// invio email
await sendEmail(msgTopic, msgBody.Replace($"{Environment.NewLine}", "<br/>"));
// ritorno solo LOG azioni
// ritorno solo LOG azioni
answ = numFix == 0 ? $"ALL {numProj} Proj OK" : $"Proj: {numProj} | Fasi: {numFasi} | Fixed/Closed: {numFix}";
return answ;
}
#endregion Public Methods
#region Protected Enums
protected enum logType
{
none,
local,
trace,
info,
warn
}
#endregion Protected Enums
#region Protected Properties
/// <summary>
/// Dataservice x accesso DB
/// </summary>
protected ApiDataService dataService { get; set; }
#endregion Protected Properties
#region Protected Methods
/// <summary>
/// Effettua log del tipo richiesto aggiungendo riga anche allo stringbuilder indicato
/// </summary>
/// <param name="message"></param>
/// <param name="tipoLog"></param>
/// <param name="currSB"></param>
protected void doLog(string message, logType tipoLog, ref StringBuilder currSB)
{
bool doLine = true;
switch (tipoLog)
{
case logType.info:
Log.Info(message);
break;
case logType.trace:
Log.Trace(message);
break;
case logType.warn:
Log.Warn(message);
break;
case logType.local:
break;
default:
case logType.none:
doLine = false;
break;
}
if (doLine)
{
currSB.AppendLine(message);
}
else
{
currSB.Append(message);
}
}
protected async Task sendEmail(string subject, string message)
{
string emailRaw = _configuration["MailDest:ProjCheck"] ?? "";
List<string> emailDestList = emailRaw.Split(",").ToList();
foreach (var dest in emailDestList)
{
try
{
await _emailSender.SendEmailAsync(dest, subject, message);
Log.Info($"Email inviata | dest: {dest} | subject: {subject}");
}
catch (Exception exc)
{
Log.Error($"Eccezione durante invio email:{Environment.NewLine}dest: {dest} | subject: {subject}{Environment.NewLine}{exc}");
}
}
}
#endregion Protected Methods
#region Private Fields
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
private readonly IEmailSender _emailSender;
private IConfiguration _configuration;
#endregion Private Fields
}
}
@@ -0,0 +1,542 @@
using GPW.CORE.Api.Data;
using GPW.CORE.Data.DbModels;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Identity.UI.Services;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using NLog;
using System.Text;
namespace GPW.CORE.Api.Controllers
{
[Route("api/[controller]")]
[ApiController]
public class TimbraCheckController : ControllerBase
{
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
private readonly IEmailSender _emailSender;
private IConfiguration _configuration;
/// <summary>
/// Avvio controller x CheckProgetti
/// </summary>
/// <param name="logger"></param>
/// <param name="configuration"></param>
/// <param name="emailSender"></param>
/// <param name="DataService"></param>
public TimbraCheckController(ILogger<ProjCheckController> logger, IConfiguration configuration, IEmailSender emailSender, ApiDataService DataService)
{
_configuration = configuration;
_emailSender = emailSender;
dataService = DataService;
Log.Info("Avviata classe TimbraCheck");
}
protected enum logType
{
none,
local,
trace,
info,
warn
}
/// <summary>
/// Dataservice x accesso DB
/// </summary>
protected ApiDataService dataService { get; set; }
/// <summary>
/// Effettua log del tipo richiesto aggiungendo riga anche allo stringbuilder indicato
/// </summary>
/// <param name="message"></param>
/// <param name="tipoLog"></param>
/// <param name="currSB"></param>
protected void doLog(string message, logType tipoLog, ref StringBuilder currSB)
{
bool doLine = true;
switch (tipoLog)
{
case logType.info:
Log.Info(message);
break;
case logType.trace:
Log.Trace(message);
break;
case logType.warn:
Log.Warn(message);
break;
case logType.local:
break;
default:
case logType.none:
doLine = false;
break;
}
if (doLine)
{
currSB.AppendLine(message);
}
else
{
currSB.Append(message);
}
}
protected async Task sendEmail(string destList, string subject, string message)
{
List<string> emailDestList = destList.Split(",").ToList();
foreach (var dest in emailDestList)
{
try
{
await _emailSender.SendEmailAsync(dest, subject, message);
}
catch (Exception exc)
{
Log.Error($"Eccezione durante invio email:{Environment.NewLine}dest: {dest} | subject {subject}{Environment.NewLine}{exc}");
}
}
}
/// <summary>
/// Pagina di prova x validità chiamate API
/// </summary>
/// <returns></returns>
[HttpGet("Test")]
public async Task<string> Test()
{
await Task.Delay(1);
return "OK";
}
/// <summary>
/// Effettua verifiche DailyDuties sulle timbrature
/// </summary>
/// <returns></returns>
[HttpGet("DailyCheck")]
public async Task<string> Get()
{
string answ = "ND";
// verifico se ci siano record check odierni...
DateTime inizio = DateTime.Today;
DateTime fine = inizio.AddDays(1);
var dailyChecks = await dataService.RegEventiGetFilt(inizio, fine, "checkAnomalie");
// cerco se sia già stato fatto altrimenti ripeto...
if (dailyChecks != null && dailyChecks.Count > 0)
{
// loggo solo che è stato richeisto di nuovo...
var currCheck = dailyChecks[0];
answ = $"Already Done | {currCheck.DataOra} | {currCheck.Evento} | {currCheck.Commento}";
Log.Info("DailyCheck non eseguito: già registrato per la giornata");
}
else
{
Log.Info("Richiesto controllo anomalie!");
// registro evento check effettuato...
RegistroEventiModel newRec = new RegistroEventiModel()
{
DataOra = DateTime.Now,
Evento = "dailyDuties",
Commento = "-"
};
bool fatto = await dataService.RegEventiUpdate(newRec);
/*******************************************************
* controllo le varie anomalie delle timbrature:
*
* (A) mancate approvazioni --> admin
* (B) entrate <> uscite --> admin, user
* (C) mancata copertura orario --> admin
*
* (D) mancata copertura commesse (2 be done)
*
* recupero elenco dip interessati x le varie anomalie con stp_DipendentiAndAnomalie
* e poi da timbrExpl recupero le singole istanze di record errori
*
*******************************************************/
// oggetti base
StringBuilder sbMain = new StringBuilder();
DateTime oggi = DateTime.Today;
DateTime oggiFine = oggi.AddDays(1).AddSeconds(-1);
string adminDestEmail = _configuration.GetValue<string>("MailDest:TimbCheck") ?? "samuele@steamware.net";
string baseUrl = _configuration.GetValue<string>("ServerConv:baseUrl") ?? "https://office.egalware.com/GPW/ADMIN/";
bool checkAnomAppr = _configuration.GetValue<bool>("TimbraCheck:checkAnomAppr");
bool checkAnomTimb = _configuration.GetValue<bool>("TimbraCheck:checkAnomTimb");
bool checkAnomOreLav = _configuration.GetValue<bool>("TimbraCheck:checkAnomOreLav");
bool checkAnomOreLavComm = _configuration.GetValue<bool>("TimbraCheck:checkAnomOreLavComm");
bool checkAnomContinuato = _configuration.GetValue<bool>("TimbraCheck:checkAnomContinuato");
bool sendEmailToUser = _configuration.GetValue<bool>("TimbraCheck:sendEmailToUser");
bool includeDirectUrl = _configuration.GetValue<bool>("TimbraCheck:includeDirectUrl");
int gg2Chk = _configuration.GetValue<int>("TimbraCheck:gg2Chk");
int gg2ChkCont = _configuration.GetValue<int>("TimbraCheck:gg2ChkCont");
int gg2ChkOreCaricate = _configuration.GetValue<int>("TimbraCheck:gg2ChkOreCaricate");
int maxErrMin = _configuration.GetValue<int>("TimbraCheck:maxErrMin");
int maxErrPlus = _configuration.GetValue<int>("TimbraCheck:maxErrPlus");
string msgTopic = "";
string msgBody = "";
int numChk = 0;
int numErr = 0;
string headRow = "style=\"background-color: #232323; color: #DEDEDE\"";
string stripeRow = "style=\"background-color: #DEDEDE;\"";
Dictionary<string, int> anomCount = new Dictionary<string, int>();
int lastCount = 0;
///elenco dipendenti (per tutti i casi ove necessario)
var tabElencoDip = await dataService.DipendentiGetAll();
// (A) recupero mancate approvazioni, mando solo ad admin
if (checkAnomAppr)
{
numChk++;
sbMain = new StringBuilder();
var tabTimbExpl = await dataService.TimbExplGetAnomalie(0, oggi.AddDays(-gg2Chk), oggiFine, true, false, false);
// se ho trovato record...
if (tabTimbExpl != null && tabTimbExpl.Count > 0)
{
doLog("Trovate anomalie mancate approvazioni, invio email ad admin", logType.info, ref sbMain);
msgTopic = "Anomalie GPW: Approvazione Timbrature";
if (includeDirectUrl)
{
doLog($"Risultano a sistema le seguenti anomalie:{Environment.NewLine}<a href=\"{baseUrl}approvTimbrature.aspx\">timbrature da approvare</a>{Environment.NewLine}", logType.info, ref sbMain);
}
else
{
doLog($"Risultano a sistema le seguenti anomalie: timbrature da approvare{Environment.NewLine}", logType.info, ref sbMain);
}
// tabella!
doLog("<table cellpadding=\"0\" cellspacing=\"0\" border=\"1\" style=\"font-size: 1.3em; width:100%;\">", logType.none, ref sbMain);
doLog($"<thead {headRow}><th>DATA</th><th>Dipendente</th></thead>", logType.none, ref sbMain);
doLog("<tbody>", logType.none, ref sbMain);
int nRow = 0;
foreach (var riga in tabTimbExpl)
{
string sfondo = nRow % 2 == 0 ? "" : stripeRow;
doLog($"<tr {sfondo}><td>{riga.DataLav:yyyy.MM.dd ddd}</td><td>{riga.CognomeNome}</td></tr>", logType.none, ref sbMain);
numErr++;
nRow++;
}
doLog("</tbody>", logType.none, ref sbMain);
doLog("</table>", logType.none, ref sbMain);
msgBody = sbMain.ToString();
await sendEmail(adminDestEmail, msgTopic, msgBody.Replace($"{Environment.NewLine}", "<br/>"));
// salvo
anomCount.Add("Check A: Mancate approvazioni", numErr - lastCount);
lastCount = numErr;
}
}
// (B1) recupero errori entrate/uscite, mando ad admin + utenti
if (checkAnomTimb)
{
numChk++;
sbMain = new StringBuilder();
var tabDipAndAnom = await dataService.DipAndAnomGetAll(oggi.AddDays(-gg2Chk), oggi.AddHours(1), false, true, false);
var tabTimbExpl = await dataService.TimbExplGetAnomalie(0, oggi.AddDays(-gg2Chk), oggiFine, false, true, false);
// se ho trovato record...
if (tabTimbExpl != null && tabTimbExpl.Count > 0)
{
doLog("Trovate anomalie timbrature IN/OUT non corrispondenti, invio email!", logType.info, ref sbMain);
// mando email ad admin!
msgTopic = "Anomalie GPW: Timbrature mancanti";
if (includeDirectUrl)
{
doLog($"Risultano a sistema le seguenti anomalie:{Environment.NewLine}<a href=\"{baseUrl}reviewTimbrature.aspx\">timbrature mancanti</a>{Environment.NewLine}", logType.info, ref sbMain);
}
else
{
doLog($"Risultano a sistema le seguenti anomalie: timbrature mancanti{Environment.NewLine}", logType.info, ref sbMain);
}
// tabella!
doLog("<table cellpadding=\"0\" cellspacing=\"0\" border=\"1\" style=\"font-size: 1.3em; width:100%;\">", logType.none, ref sbMain);
doLog($"<thead {headRow}><th>DATA</th><th>Dipendente</th></thead>", logType.none, ref sbMain);
doLog("<tbody>", logType.none, ref sbMain);
int nRow = 0;
foreach (var riga in tabTimbExpl)
{
string sfondo = nRow % 2 == 0 ? "" : stripeRow;
doLog($"<tr {sfondo}><td>{riga.DataLav:yyyy.MM.dd ddd}</td><td>{riga.CognomeNome}</td></tr>", logType.none, ref sbMain);
numErr++;
nRow++;
}
doLog("</tbody>", logType.none, ref sbMain);
doLog("</table>", logType.none, ref sbMain);
msgBody = sbMain.ToString();
await sendEmail(adminDestEmail, msgTopic, msgBody.Replace($"{Environment.NewLine}", "<br/>"));
// re richiesto invio email utenti x warning entrate/uscrite
if (sendEmailToUser)
{
// mando singole email ai dipendenti SE C'è EMAIL!!!!
foreach (var rigaDip in tabDipAndAnom)
{
sbMain = new StringBuilder();
if (!string.IsNullOrEmpty(rigaDip.email))
{
var tabTimbExplDip = tabTimbExpl.Where(x => x.IdxDipendente == rigaDip.IdxDipendente);
// reimposto testo
doLog($"Risultano a sistema le seguenti anomalie: timbrature mancanti{Environment.NewLine}", logType.info, ref sbMain);
// tabella!
doLog("<table cellpadding=\"0\" cellspacing=\"0\" border=\"1\" style=\"font-size: 1.3em; width:100%;\">", logType.none, ref sbMain);
doLog($"<thead {headRow}><th>DATA</th><th>Dipendente</th></thead>", logType.none, ref sbMain);
doLog("<tbody>", logType.none, ref sbMain);
nRow = 0;
foreach (var riga in tabTimbExplDip)
{
string sfondo = nRow % 2 == 0 ? "" : stripeRow;
doLog($"<tr {sfondo}><td>{riga.DataLav:yyyy.MM.dd ddd}</td><td>{riga.CognomeNome}</td></tr>", logType.none, ref sbMain);
nRow++;
}
doLog("</tbody>", logType.none, ref sbMain);
doLog("</table>", logType.none, ref sbMain);
msgBody = sbMain.ToString();
await sendEmail(rigaDip.email, msgTopic, msgBody.Replace($"{Environment.NewLine}", "<br/>"));
}
}
}
// salvo
anomCount.Add("Check B1: Entrate/Uscite", numErr - lastCount);
lastCount = numErr;
}
}
// (B2) recupero errori timbrature FUTURE, mando ad admin + utenti
if (checkAnomTimb)
{
List<DipendentiModel> ElencoDip2Send = new List<DipendentiModel>();
numChk++;
sbMain = new StringBuilder();
var tabTimbFuture = await dataService.TimbratureAnomalieFuture();
// se ho trovato record...
if (tabTimbFuture != null && tabTimbFuture.Count > 0)
{
doLog("Trovate anomalie timbrature FUTURE, invio email!", logType.info, ref sbMain);
// mando email ad admin!
msgTopic = "Anomalie GPW: Timbrature FUTURE";
if (includeDirectUrl)
{
doLog($"Risultano a sistema le seguenti anomalie:{Environment.NewLine}<a href=\"{baseUrl}reviewTimbrature.aspx\">timbrature FUTURE</a>{Environment.NewLine}", logType.info, ref sbMain);
}
else
{
doLog($"Risultano a sistema le seguenti anomalie: timbrature FUTURE{Environment.NewLine}", logType.info, ref sbMain);
}
// tabella!
doLog("<table cellpadding=\"0\" cellspacing=\"0\" border=\"1\" style=\"font-size: 1.3em; width:100%;\">", logType.none, ref sbMain);
doLog($"<thead {headRow}><th>DATA</th><th>Dipendente</th></thead>", logType.none, ref sbMain);
doLog("<tbody>", logType.none, ref sbMain);
int nRow = 0;
foreach (var riga in tabTimbFuture)
{
string sfondo = nRow % 2 == 0 ? "" : stripeRow;
var rigaDip = tabElencoDip.Find(x => x.IdxDipendente == riga.IdxDipendente);
if(rigaDip!=null)
{
ElencoDip2Send.Add(rigaDip);
}
string cognomeNome = rigaDip != null ? $"{rigaDip.Cognome} {rigaDip.Nome}" : $"idxDip: {riga.IdxDipendente}";
doLog($"<tr {sfondo}><td>{riga.DataOra:yyyy.MM.dd ddd}</td><td>{cognomeNome}</td></tr>", logType.none, ref sbMain);
numErr++;
nRow++;
}
doLog("</tbody>", logType.none, ref sbMain);
doLog("</table>", logType.none, ref sbMain);
msgBody = sbMain.ToString();
await sendEmail(adminDestEmail, msgTopic, msgBody.Replace($"{Environment.NewLine}", "<br/>"));
// re richiesto invio email utenti x warning entrate/uscrite
if (sendEmailToUser)
{
// mando singole email ai dipendenti SE C'è EMAIL!!!!
foreach (var rigaDip in ElencoDip2Send)
{
sbMain = new StringBuilder();
if (!string.IsNullOrEmpty(rigaDip.Email))
{
var tabTimbExplDip = tabTimbFuture.Where(x => x.IdxDipendente == rigaDip.IdxDipendente);
// reimposto testo
doLog($"Risultano a sistema le seguenti anomalie: timbrature FUTURE{Environment.NewLine}", logType.info, ref sbMain);
// tabella!
doLog("<table cellpadding=\"0\" cellspacing=\"0\" border=\"1\" style=\"font-size: 1.3em; width:100%;\">", logType.none, ref sbMain);
doLog($"<thead {headRow}><th>DATA</th><th>Dipendente</th></thead>", logType.none, ref sbMain);
doLog("<tbody>", logType.none, ref sbMain);
nRow = 0;
foreach (var riga in tabTimbExplDip)
{
string sfondo = nRow % 2 == 0 ? "" : stripeRow;
doLog($"<tr {sfondo}><td>{riga.DataOra:yyyy.MM.dd ddd}</td><td>{rigaDip.Cognome} {rigaDip.Nome}</td></tr>", logType.none, ref sbMain);
nRow++;
}
doLog("</tbody>", logType.none, ref sbMain);
doLog("</table>", logType.none, ref sbMain);
msgBody = sbMain.ToString();
await sendEmail(rigaDip.Email, msgTopic, msgBody.Replace($"{Environment.NewLine}", "<br/>"));
}
}
}
// salvo
anomCount.Add("Check B2: Timbrature Future", numErr - lastCount);
lastCount = numErr;
}
}
// (C) recupero errori mancata copertura orario, mando ad admin
if (checkAnomOreLav)
{
numChk++;
sbMain = new StringBuilder();
var tabTimbExpl = await dataService.TimbExplGetAnomalie(0, oggi.AddDays(-gg2Chk), oggi.AddMinutes(-1), false, false, true);
// se ho trovato record...
if (tabTimbExpl != null && tabTimbExpl.Count > 0)
{
doLog("Trovate anomalie copertura orario, invio email!", logType.info, ref sbMain);
// mando email ad admin!
msgTopic = "Anomalie GPW: Ore timbrate";
if (includeDirectUrl)
{
doLog($"Risultano a sistema le seguenti anomalie:{Environment.NewLine}<a href=\"{baseUrl}reviewTimbrature.aspx\">Orario timbrato non suff a copertura standard</a>{Environment.NewLine}", logType.info, ref sbMain);
}
else
{
doLog($"Risultano a sistema le seguenti anomalie: Orario timbrato non suff a copertura standard{Environment.NewLine}", logType.info, ref sbMain);
}
// tabella!
doLog("<table cellpadding=\"0\" cellspacing=\"0\" border=\"1\" style=\"font-size: 1.3em; width:100%;\">", logType.none, ref sbMain);
doLog($"<thead {headRow}><th>DATA</th><th>Dipendente</th></thead>", logType.none, ref sbMain);
doLog("<tbody>", logType.none, ref sbMain);
int nRow = 0;
foreach (var riga in tabTimbExpl)
{
string sfondo = nRow % 2 == 0 ? "" : stripeRow;
doLog($"<tr {sfondo}><td>{riga.DataLav:yyyy.MM.dd ddd}</td><td>{riga.CognomeNome}</td></tr>", logType.none, ref sbMain);
numErr++;
nRow++;
}
doLog("</tbody>", logType.none, ref sbMain);
doLog("</table>", logType.none, ref sbMain);
msgBody = sbMain.ToString();
await sendEmail(adminDestEmail, msgTopic, msgBody.Replace($"{Environment.NewLine}", "<br/>"));
// salvo
anomCount.Add("Check C: Copertura Orario", numErr - lastCount);
lastCount = numErr;
}
}
// (D) recupero errori copertura ore lavorate / ore caricate a commessa...
if (checkAnomOreLavComm)
{
numChk++;
sbMain = new StringBuilder();
var tabTimbRegAtt = await dataService.TeRaExplGetAll(0, oggi.AddDays(-gg2ChkOreCaricate), oggi.AddHours(1), false, true, maxErrMin, maxErrPlus);
// sulla tabella seleziono SE NON E' OK colonna okLavCom
var listErrCopertura = tabTimbRegAtt.Where(x => x.okLAvCom == 0).ToList();
if (listErrCopertura != null && listErrCopertura.Count() > 0)
{
doLog("Trovate anomalie ore lavorate / commesse caricate, invio email!", logType.info, ref sbMain);
// mando email ad admin!
msgTopic = "Anomalie GPW: Ore Caricate a commessa";
if (includeDirectUrl)
{
doLog($"Risultano a sistema le seguenti anomalie:{Environment.NewLine}<a href=\"{baseUrl}reviewTimbrature.aspx\">Ore caricate a commessa non corrispondenti ad ore lavorate secondo standard</a>{Environment.NewLine}", logType.info, ref sbMain);
}
else
{
doLog($"Risultano a sistema le seguenti anomalie: Ore caricate a commessa non corrispondenti ad ore lavorate secondo standard{Environment.NewLine}", logType.info, ref sbMain);
}
// tabella!
doLog("<table cellpadding=\"0\" cellspacing=\"0\" border=\"1\" style=\"font-size: 1.3em; width:100%;\">", logType.none, ref sbMain);
doLog($"<thead {headRow}><th>DATA</th><th>Dipendente</th></thead>", logType.none, ref sbMain);
doLog("<tbody>", logType.none, ref sbMain);
int nRow = 0;
foreach (var riga in listErrCopertura)
{
string sfondo = nRow % 2 == 0 ? "" : stripeRow;
doLog($"<tr {sfondo}><td>{riga.DataLav:yyyy.MM.dd ddd}</td><td>{riga.CognomeNome}</td></tr>", logType.none, ref sbMain);
numErr++;
nRow++;
}
doLog("</tbody>", logType.none, ref sbMain);
doLog("</table>", logType.none, ref sbMain);
msgBody = sbMain.ToString();
await sendEmail(adminDestEmail, msgTopic, msgBody.Replace($"{Environment.NewLine}", "<br/>"));
// salvo
anomCount.Add("Check D: Ore lavorate / Caricate", numErr - lastCount);
lastCount = numErr;
}
}
// (E) cerco anomalie x orario continuato (no Pausa Pranzo, solo 1 IN, 1 OUT)
if (checkAnomContinuato)
{
numChk++;
sbMain = new StringBuilder();
var tabTimbExpl = await dataService.TimbExplGetContinuato(0, oggi.AddDays(-gg2ChkCont), oggi.AddHours(1));
// se ho trovato record...
if (tabTimbExpl != null && tabTimbExpl.Count > 0)
{
doLog("Trovate anomalie orario continuato, invio email!", logType.info, ref sbMain);
// mando email ad admin!
msgTopic = "Anomalie GPW: Orario Continuato";
if (includeDirectUrl)
{
doLog($"Risultano a sistema le seguenti anomalie:{Environment.NewLine}<a href=\"{baseUrl}approvTimbrature.aspx\">Orari continuati da approvare</a>{Environment.NewLine}", logType.info, ref sbMain);
}
else
{
doLog($"Risultano a sistema le seguenti anomalie: Orari continuati da approvare{Environment.NewLine}", logType.info, ref sbMain);
}
// tabella!
doLog("<table cellpadding=\"0\" cellspacing=\"0\" border=\"1\" style=\"font-size: 1.3em; width:100%;\">", logType.none, ref sbMain);
doLog($"<thead {headRow}><th>DATA</th><th>Dipendente</th></thead>", logType.none, ref sbMain);
doLog("<tbody>", logType.none, ref sbMain);
int nRow = 0;
foreach (var riga in tabTimbExpl)
{
string sfondo = nRow % 2 == 0 ? "" : stripeRow;
doLog($"<tr {sfondo}><td>{riga.DataLav:yyyy.MM.dd ddd}</td><td>{riga.CognomeNome}</td></tr>", logType.none, ref sbMain);
numErr++;
nRow++;
}
doLog("</tbody>", logType.none, ref sbMain);
doLog("</table>", logType.none, ref sbMain);
msgBody = sbMain.ToString();
await sendEmail(adminDestEmail, msgTopic, msgBody.Replace($"{Environment.NewLine}", "<br/>"));
// salvo
anomCount.Add("Check E: Anomalia Continuato", numErr - lastCount);
lastCount = numErr;
}
}
string resErrori = "";
foreach (var item in anomCount)
{
resErrori += $"{item.Key}: {item.Value} | ";
}
// Summary di cosa fatto
answ = numErr == 0 ? $"Check Anomalie Timbr ALL OK | effettuati {numChk} check" : $"Check Anomalie Timbr KO | effettuati {numChk} check | trovate {numErr} anomalie | {resErrori}";
// registro evento check effettuato...
newRec = new RegistroEventiModel()
{
DataOra = DateTime.Now,
Evento = "checkAnomalie",
Commento = answ
};
fatto = await dataService.RegEventiUpdate(newRec);
}
// restituisco esito
return answ;
}
}
}
+2 -2
View File
@@ -108,13 +108,13 @@ namespace GPW.CORE.Api.Controllers
/// <param name="DecodedData"></param>
/// <returns></returns>
[HttpPut]
public async Task<VC19Check> Put(TestUser id)
public async Task<VC19Check> Put(int id)
{
VC19Check answ = new VC19Check()
{
Result = "KO"
};
var result = await _DataService.InsertManual((int)id, "10.74.82.255");
var result = await _DataService.InsertManual(id, "10.74.82.255");
answ = new VC19Check
{
DTRecord = DateTime.Now,
+327 -179
View File
@@ -1,61 +1,15 @@
using GPW.CORE.Data.DbModels;
using GPW.CORE.Data;
using GPW.CORE.Data.DbModels;
using Microsoft.AspNetCore.Identity.UI.Services;
using Newtonsoft.Json;
using NLog;
using Microsoft.AspNetCore.Identity.UI.Services;
using StackExchange.Redis.Extensions.Core;
using StackExchange.Redis.Extensions.Core.Abstractions;
using System.Diagnostics;
using GPW.CORE.Data;
using StackExchange.Redis;
using System.Diagnostics;
namespace GPW.CORE.Api.Data
{
public class ApiDataService
public class ApiDataService : IDisposable
{
#region Private Fields
private static IConfiguration _configuration = null!;
private static ILogger<ApiDataService> _logger = null!;
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
private readonly IEmailSender _emailSender;
//private readonly IDistributedCache distributedCache;
//private readonly IRedisCacheClient _redisCacheClient;
/// <summary>
/// Oggetto per connessione a REDIS
/// </summary>
private ConnectionMultiplexer redisConn = null!;
/// <summary>
/// Oggetto DB redis da impiegare x chiamate R/W
/// </summary>
private IDatabase redisDb = null!;
/// <summary>
/// Elenco obj in cache
/// </summary>
private List<string> cachedDataList = new List<string>();
#endregion Private Fields
#region Protected Fields
protected const string rKeyProjAct = "Check:ProjAct";
protected const string rKeyFasiAct = "Check:FasiAct";
protected const string rKeyCalcOreFase = "Check:OreFasi";
/// <summary>
/// TTL da 1 min x cache Redis
/// </summary>
protected const int shortTTL = 60 * 5;
#endregion Protected Fields
#region Public Fields
/// <summary>
@@ -75,19 +29,24 @@ namespace GPW.CORE.Api.Data
/// <param name="emailSender"></param>
/// <param name="redisCacheClient"></param>
public ApiDataService(IConfiguration configuration, ILogger<ApiDataService> logger, IEmailSender emailSender, IConnectionMultiplexer redisConn)
//public ApiDataService(IConfiguration configuration, ILogger<ApiDataService> logger, IEmailSender emailSender, IRedisCacheClient redisCacheClient)
{
_logger = logger;
_configuration = configuration;
_emailSender = emailSender;
//_redisCacheClient = redisCacheClient;
// setup compoenti REDIS
this.redisConn = ConnectionMultiplexer.Connect(_configuration.GetConnectionString("Redis"));
this.redisDb = this.redisConn.GetDatabase();
var redConnString = _configuration.GetConnectionString("Redis");
if (redConnString == null)
{
_logger.LogError("REDIS ConnString empty!");
}
else
{
this.redisConn = ConnectionMultiplexer.Connect(redConnString);
this.redisDb = this.redisConn.GetDatabase();
}
// conf DB
string connStrDB = _configuration.GetConnectionString("GPW.DB");
// Conf DB
var connStrDB = _configuration.GetConnectionString("GPW.DB");
if (string.IsNullOrEmpty(connStrDB))
{
_logger.LogError("ConnString empty!");
@@ -101,106 +60,8 @@ namespace GPW.CORE.Api.Data
#endregion Public Constructors
#region Protected Methods
/// <summary>
/// Recupero chiave da redis
/// </summary>
/// <param name="rKey"></param>
/// <returns></returns>
protected async Task<string> getRSV(string rKey)
{
#if false
//string answ = await _redisCacheClient.GetDbFromConfiguration().GetAsync<string>(rKey);
#endif
string answ = await redisDb.StringGetAsync(rKey);
return answ;
}
/// <summary>
/// Salvataggio chiave in redis
/// </summary>
/// <param name="rKey"></param>
/// <param name="rVal"></param>
/// <param name="ttlSec"></param>
/// <returns></returns>
protected async Task<bool> setRSV(string rKey, string rVal, int ttlSec)
{
bool fatto = false;
#if false
//await _redisCacheClient.GetDbFromConfiguration().AddAsync(rKey, rVal, DateTimeOffset.Now.AddSeconds(ttlSec));
#endif
await redisDb.StringSetAsync(rKey, rVal, TimeSpan.FromSeconds(ttlSec));
fatto = true;
return fatto;
}
/// <summary>
/// Salvataggio chiave in redis
/// </summary>
/// <param name="rKey"></param>
/// <param name="rValInt"></param>
/// <param name="ttlSec"></param>
/// <returns></returns>
protected async Task<bool> setRSV(string rKey, int rValInt, int ttlSec)
{
bool fatto = false;
#if false
await _redisCacheClient.GetDbFromConfiguration().AddAsync<int>(rKey, rValInt, DateTimeOffset.Now.AddSeconds(ttlSec));
#endif
await redisDb.StringSetAsync(rKey, rValInt, TimeSpan.FromSeconds(ttlSec));
fatto = true;
return fatto;
}
/// <summary>
/// Registra in cache chiave se non fosse già in elenco
/// </summary>
/// <param name="newKey"></param>
protected void trackCache(string newKey)
{
if (!cachedDataList.Contains(newKey))
{
cachedDataList.Add(newKey);
}
}
#endregion Protected Methods
#region Public Methods
/// <summary>
/// Recupera l'elenco progetti (ATTIVI)
/// </summary>
/// <returns></returns>
public async Task<List<AnagProgettiModel>> AnagProjActiv()
{
List<AnagProgettiModel>? dbResult = new List<AnagProgettiModel>();
string cacheKey = $"{rKeyProjAct}";
trackCache(cacheKey);
string rawData = await getRSV(cacheKey);
if (!string.IsNullOrEmpty(rawData))
{
dbResult = JsonConvert.DeserializeObject<List<AnagProgettiModel>>(rawData);
}
else
{
Stopwatch stopWatch = new Stopwatch();
stopWatch.Start();
dbResult = dbController.AnagProjAll(true);
rawData = JsonConvert.SerializeObject(dbResult, Formatting.None, new JsonSerializerSettings() { ReferenceLoopHandling = ReferenceLoopHandling.Ignore });
await setRSV(cacheKey, rawData, shortTTL);
stopWatch.Stop();
TimeSpan ts = stopWatch.Elapsed;
Log.Trace($"Effettuata lettura da DB per AnagProjActiv: {ts.TotalMilliseconds} ms");
}
if (dbResult == null)
{
dbResult = new List<AnagProgettiModel>();
}
return await Task.FromResult(dbResult);
}
/// <summary>
/// Recupera l'elenco fasi (ATTIVE)
/// </summary>
@@ -234,14 +95,35 @@ namespace GPW.CORE.Api.Data
}
/// <summary>
/// Imposta stato di una fase
/// Recupera l'elenco progetti (ATTIVI)
/// </summary>
/// <param name="idxFase">ID</param>
/// <param name="isActive">Stato attivo true/false (se è amster -_> aggiorna sottofasi x trigger su DB</param>
/// <returns></returns>
public async Task<bool> FasiSetActive(int idxFase, bool isActive)
public async Task<List<AnagProgettiModel>> AnagProjActiv()
{
return await dbController.FasiSetActive(idxFase, isActive);
List<AnagProgettiModel>? dbResult = new List<AnagProgettiModel>();
string cacheKey = $"{rKeyProjAct}";
trackCache(cacheKey);
string rawData = await getRSV(cacheKey);
if (!string.IsNullOrEmpty(rawData))
{
dbResult = JsonConvert.DeserializeObject<List<AnagProgettiModel>>(rawData);
}
else
{
Stopwatch stopWatch = new Stopwatch();
stopWatch.Start();
dbResult = dbController.AnagProjAll(true);
rawData = JsonConvert.SerializeObject(dbResult, Formatting.None, new JsonSerializerSettings() { ReferenceLoopHandling = ReferenceLoopHandling.Ignore });
await setRSV(cacheKey, rawData, shortTTL);
stopWatch.Stop();
TimeSpan ts = stopWatch.Elapsed;
Log.Trace($"Effettuata lettura da DB per AnagProjActiv: {ts.TotalMilliseconds} ms");
}
if (dbResult == null)
{
dbResult = new List<AnagProgettiModel>();
}
return await Task.FromResult(dbResult);
}
/// <summary>
@@ -280,24 +162,6 @@ namespace GPW.CORE.Api.Data
return await Task.FromResult(dbResult);
}
/// <summary>
/// invalida tutta la cache in caso di update
/// </summary>
/// <returns></returns>
public async Task InvalidateAllCache()
{
foreach (var item in cachedDataList)
{
#if false
await _redisCacheClient.GetDbFromConfiguration().RemoveAsync(item);
#endif
await redisDb.StringSetAsync(item, "", TimeSpan.FromMilliseconds(5));
}
cachedDataList = new List<string>();
}
public async Task<List<CheckVc19Model>> ChecksGetByDip(int idxDip)
{
DateTime dtFine = DateTime.Today.AddDays(1);
@@ -325,12 +189,57 @@ namespace GPW.CORE.Api.Data
return await Task.FromResult(dbResult);
}
/// <summary>
/// Recupera record anomalie dipendenti
/// </summary>
/// <param name="inizio"></param>
/// <param name="fine"></param>
/// <param name="notOkApp"></param>
/// <param name="notOkTim"></param>
/// <param name="notOkLav"></param>
public async Task<List<DipendendiAndAnomalie>> DipAndAnomGetAll(DateTime inizio, DateTime fine, bool notOkApp, bool notOkTim, bool notOkLav)
{
List<DipendendiAndAnomalie> dbResult = new List<DipendendiAndAnomalie>();
Stopwatch stopWatch = new Stopwatch();
stopWatch.Start();
dbResult = dbController.DipAndAnomGetAll(inizio, fine, notOkApp, notOkTim, notOkLav);
stopWatch.Stop();
TimeSpan ts = stopWatch.Elapsed;
Log.Trace($"Effettuata lettura da DB per DipAndAnomGetAll: {ts.TotalMilliseconds} ms");
return await Task.FromResult(dbResult);
}
public async Task<List<DipendentiModel>> DipendentiGetAll()
{
List<DipendentiModel> dbResult = new List<DipendentiModel>();
Stopwatch stopWatch = new Stopwatch();
stopWatch.Start();
dbResult = dbController.DipendentiGetAll();
stopWatch.Stop();
TimeSpan ts = stopWatch.Elapsed;
Log.Trace($"Effettuata lettura da DB per DipendentiGetAll: {ts.TotalMilliseconds} ms");
return await Task.FromResult(dbResult);
}
public void Dispose()
{
// Clear database controller
dbController.Dispose();
}
/// <summary>
/// Imposta stato di una fase
/// </summary>
/// <param name="idxFase">ID</param>
/// <param name="isActive">
/// Stato attivo true/false (se è amster -_&gt; aggiorna sottofasi x trigger su DB
/// </param>
/// <returns></returns>
public async Task<bool> FasiSetActive(int idxFase, bool isActive)
{
return await dbController.FasiSetActive(idxFase, isActive);
}
public async Task<bool> InsertCheck(DCCDecode updItem, string clientIp)
{
bool done = false;
@@ -357,6 +266,245 @@ namespace GPW.CORE.Api.Data
return await Task.FromResult(done);
}
/// <summary>
/// invalida tutta la cache in caso di update
/// </summary>
/// <returns></returns>
public async Task InvalidateAllCache()
{
foreach (var item in cachedDataList)
{
await redisDb.StringSetAsync(item, "", TimeSpan.FromMilliseconds(5));
}
cachedDataList = new List<string>();
}
/// <summary>
/// Recupera eventi dato criteri filtro
/// </summary>
/// <param name="inizio"></param>
/// <param name="fine"></param>
/// <param name="evento"></param>
/// <returns></returns>
public async Task<List<RegistroEventiModel>> RegEventiGetFilt(DateTime inizio, DateTime fine, string evento)
{
List<RegistroEventiModel> dbResult = new List<RegistroEventiModel>();
Stopwatch stopWatch = new Stopwatch();
stopWatch.Start();
dbResult = dbController.RegEventiGetFilt(inizio, fine, evento);
stopWatch.Stop();
TimeSpan ts = stopWatch.Elapsed;
Log.Trace($"Effettuata lettura da DB per RegEventiGetFilt: {ts.TotalMilliseconds} ms");
return await Task.FromResult(dbResult);
}
/// <summary>
/// Insert/Update di un record in Registro Eventi
/// </summary>
/// <param name="currItem"></param>
/// <returns></returns>
public async Task<bool> RegEventiUpdate(RegistroEventiModel currItem)
{
bool done = false;
Stopwatch stopWatch = new Stopwatch();
stopWatch.Start();
done = dbController.RegEventiUpdate(currItem);
stopWatch.Stop();
TimeSpan ts = stopWatch.Elapsed;
Log.Trace($"Effettuata operazione RegEventiUpdate: {ts.TotalMilliseconds} ms");
return await Task.FromResult(done);
}
/// <summary>
/// Recupera record anomalie dipendenti
/// </summary>
/// <param name="idxDipendente">singolo idx oppure 0 = tutti</param>
/// <param name="dataFrom"></param>
/// <param name="dataTo"></param>
/// <param name="inatt"></param>
/// <param name="showWE"></param>
/// <param name="maxErrMin"></param>
/// <param name="maxErrPlus"></param>
/// <returns></returns>
public async Task<List<TeRaExplModel>> TeRaExplGetAll(int idxDipendente, DateTime dataFrom, DateTime dataTo, bool inatt, bool showWE, int maxErrMin, int maxErrPlus)
{
List<TeRaExplModel> dbResult = new List<TeRaExplModel>();
Stopwatch stopWatch = new Stopwatch();
stopWatch.Start();
dbResult = dbController.TeRaExplGetAll(idxDipendente, dataFrom, dataTo, inatt, showWE, maxErrMin, maxErrPlus);
stopWatch.Stop();
TimeSpan ts = stopWatch.Elapsed;
Log.Trace($"Effettuata lettura da DB per TeRaExplGetAll: {ts.TotalMilliseconds} ms");
return await Task.FromResult(dbResult);
}
/// <summary>
/// Recupera record anomalie dipendenti
/// </summary>
/// <param name="idxDipendente">singolo idx oppure 0 = tutti</param>
/// <param name="inizio"></param>
/// <param name="fine"></param>
/// <param name="notOkApp"></param>
/// <param name="notOkTim"></param>
/// <param name="notOkLav"></param>
/// <returns></returns>
public async Task<List<TimbratureExplModel>> TimbExplGetAnomalie(int idxDipendente, DateTime inizio, DateTime fine, bool notOkApp, bool notOkTim, bool notOkLav)
{
List<TimbratureExplModel> dbResult = new List<TimbratureExplModel>();
Stopwatch stopWatch = new Stopwatch();
stopWatch.Start();
dbResult = dbController.TimbExplGetAnomalie(idxDipendente, inizio, fine, notOkApp, notOkTim, notOkLav);
stopWatch.Stop();
TimeSpan ts = stopWatch.Elapsed;
Log.Trace($"Effettuata lettura da DB per TimbExplGetAnomalie: {ts.TotalMilliseconds} ms");
return await Task.FromResult(dbResult);
}
/// <summary>
/// Recupera record anomalie dipendenti
/// </summary>
/// <param name="idxDipendente">singolo idx oppure 0 = tutti</param>
/// <param name="inizio"></param>
/// <param name="fine"></param>
/// <returns></returns>
public async Task<List<TimbratureExplModel>> TimbExplGetContinuato(int idxDipendente, DateTime inizio, DateTime fine)
{
List<TimbratureExplModel> dbResult = new List<TimbratureExplModel>();
Stopwatch stopWatch = new Stopwatch();
stopWatch.Start();
dbResult = dbController.TimbExplGetContinuato(idxDipendente, inizio, fine);
stopWatch.Stop();
TimeSpan ts = stopWatch.Elapsed;
Log.Trace($"Effettuata lettura da DB per TimbExplGetContinuato: {ts.TotalMilliseconds} ms");
return await Task.FromResult(dbResult);
}
/// <summary>
/// Recupera elenco anomalie x timbrature future
/// </summary>
/// <returns></returns>
public async Task<List<TimbratureModel>> TimbratureAnomalieFuture()
{
List<TimbratureModel> dbResult = new List<TimbratureModel>();
Stopwatch stopWatch = new Stopwatch();
stopWatch.Start();
dbResult = dbController.TimbratureAnomalieFuture();
stopWatch.Stop();
TimeSpan ts = stopWatch.Elapsed;
Log.Trace($"Effettuata lettura da DB per TimbratureAnomalieFuture: {ts.TotalMilliseconds} ms");
return await Task.FromResult(dbResult);
}
#endregion Public Methods
#region Protected Fields
protected const string rKeyCalcOreFase = "Check:OreFasi";
protected const string rKeyFasiAct = "Check:FasiAct";
protected const string rKeyProjAct = "Check:ProjAct";
/// <summary>
/// TTL da 1 min x cache Redis
/// </summary>
protected const int shortTTL = 60 * 5;
#endregion Protected Fields
#region Protected Methods
/// <summary>
/// Recupero chiave da redis
/// </summary>
/// <param name="rKey"></param>
/// <returns></returns>
protected async Task<string> getRSV(string rKey)
{
string answ = "";
var rawData = await redisDb.StringGetAsync(rKey);
if (rawData.HasValue)
{
answ = $"{rawData}";
}
return answ;
}
/// <summary>
/// Salvataggio chiave in redis
/// </summary>
/// <param name="rKey"></param>
/// <param name="rVal"></param>
/// <param name="ttlSec"></param>
/// <returns></returns>
protected async Task<bool> setRSV(string rKey, string rVal, int ttlSec)
{
bool fatto = false;
await redisDb.StringSetAsync(rKey, rVal, TimeSpan.FromSeconds(ttlSec));
fatto = true;
return fatto;
}
/// <summary>
/// Salvataggio chiave in redis
/// </summary>
/// <param name="rKey"></param>
/// <param name="rValInt"></param>
/// <param name="ttlSec"></param>
/// <returns></returns>
protected async Task<bool> setRSV(string rKey, int rValInt, int ttlSec)
{
bool fatto = false;
await redisDb.StringSetAsync(rKey, rValInt, TimeSpan.FromSeconds(ttlSec));
fatto = true;
return fatto;
}
/// <summary>
/// Registra in cache chiave se non fosse già in elenco
/// </summary>
/// <param name="newKey"></param>
protected void trackCache(string newKey)
{
if (!cachedDataList.Contains(newKey))
{
cachedDataList.Add(newKey);
}
}
#endregion Protected Methods
#region Private Fields
private static IConfiguration _configuration = null!;
private static ILogger<ApiDataService> _logger = null!;
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
private readonly IEmailSender _emailSender;
//private readonly IDistributedCache distributedCache;
//private readonly IRedisCacheClient _redisCacheClient;
/// <summary>
/// Elenco obj in cache
/// </summary>
private List<string> cachedDataList = new List<string>();
/// <summary>
/// Oggetto per connessione a REDIS
/// </summary>
private ConnectionMultiplexer redisConn = null!;
/// <summary>
/// Oggetto DB redis da impiegare x chiamate R/W
/// </summary>
private IDatabase redisDb = null!;
#endregion Private Fields
}
}
+9 -8
View File
@@ -7,24 +7,25 @@
</PropertyGroup>
<ItemGroup>
<_WebToolingArtifacts Remove="Properties\PublishProfiles\IIS-PROD.pubxml" />
<_WebToolingArtifacts Remove="Properties\PublishProfiles\IIS03.pubxml" />
</ItemGroup>
<ItemGroup>
<None Include="Properties\PublishProfiles\IIS01.pubxml.user" />
<None Include="Properties\PublishProfiles\IIS-PROD.pubxml.user" />
<None Include="Properties\PublishProfiles\IIS03.pubxml.user" />
<None Include="Properties\PublishProfiles\IIS02.pubxml.user" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="6.0.7" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="NLog.Web.AspNetCore" Version="5.0.0" />
<PackageReference Include="StackExchange.Redis" Version="2.6.48" />
<PackageReference Include="StackExchange.Redis.Extensions.AspNetCore" Version="8.0.5" />
<PackageReference Include="StackExchange.Redis.Extensions.Core" Version="8.0.5" />
<PackageReference Include="StackExchange.Redis.Extensions.Newtonsoft" Version="8.0.5" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.3.2" />
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="6.0.14" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="StackExchange.Redis" Version="2.7.27" />
<PackageReference Include="StackExchange.Redis.Extensions.AspNetCore" Version="9.1.0" />
<PackageReference Include="StackExchange.Redis.Extensions.Core" Version="9.1.0" />
<PackageReference Include="StackExchange.Redis.Extensions.Newtonsoft" Version="9.1.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
</ItemGroup>
<ItemGroup>
+28 -9
View File
@@ -1,9 +1,11 @@
using GPW.CORE.Api.Data;
using GPW.CORE.Data;
using Microsoft.AspNetCore.Identity.UI.Services;
using Microsoft.AspNetCore.Localization;
using StackExchange.Redis;
using StackExchange.Redis.Extensions.Core.Configuration;
using StackExchange.Redis.Extensions.Newtonsoft;
using System.Globalization;
using System.Text.Json.Serialization;
var builder = WebApplication.CreateBuilder(args);
@@ -11,7 +13,7 @@ var builder = WebApplication.CreateBuilder(args);
// configuration setup
ConfigurationManager configuration = builder.Configuration;
// Redis
string connStringRedis = configuration.GetConnectionString("Redis");
var connStringRedis = configuration.GetConnectionString("Redis");
string redisSrvAddr = connStringRedis.Substring(0, connStringRedis.IndexOf(":"));
// avvio oggetto shared x redis...
@@ -25,15 +27,16 @@ builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
// abilitazione x email management con MailKit
builder.Services.AddTransient<IEmailSender, MailKitEmailSender>();
//builder.Services.AddTransient<IEmailSender, MailKitEmailSender>();
builder.Services.AddSingleton<IEmailSender, MailKitEmailSender>();
builder.Services.Configure<MailKitEmailSenderOptions>(options =>
{
options.Host_Address = configuration["ExternalProviders:MailKit:SMTP:Address"];
options.Host_Port = Convert.ToInt32(configuration["ExternalProviders:MailKit:SMTP:Port"]);
options.Host_Username = configuration["ExternalProviders:MailKit:SMTP:Account"];
options.Host_Password = configuration["ExternalProviders:MailKit:SMTP:Password"];
options.Sender_EMail = configuration["ExternalProviders:MailKit:SMTP:SenderEmail"];
options.Sender_Name = configuration["ExternalProviders:MailKit:SMTP:SenderName"];
options.Host_Address = configuration["ExternalProviders:MailKit:SMTP:Address"] ?? "";
options.Host_Port = Convert.ToInt32(configuration["ExternalProviders:MailKit:SMTP:Port"] ?? "");
options.Host_Username = configuration["ExternalProviders:MailKit:SMTP:Account"] ?? "";
options.Host_Password = configuration["ExternalProviders:MailKit:SMTP:Password"] ?? "";
options.Sender_EMail = configuration["ExternalProviders:MailKit:SMTP:SenderEmail"] ?? "";
options.Sender_Name = configuration["ExternalProviders:MailKit:SMTP:SenderName"] ?? "";
});
builder.Services.AddStackExchangeRedisCache(options =>
@@ -49,7 +52,10 @@ builder.Services.AddStackExchangeRedisExtensions<NewtonsoftSerializer>((options)
{
List<RedisConfiguration> newConf = new List<RedisConfiguration>();
var currConf = configuration.GetSection("Redis").Get<RedisConfiguration>();
newConf.Add(currConf);
if (currConf != null)
{
newConf.Add(currConf);
}
return newConf;
//return configuration.GetSection("Redis").Get<RedisConfiguration>();
});
@@ -68,6 +74,19 @@ if (app.Environment.IsDevelopment())
app.UseSwaggerUI();
}
// cultura IT...
var supportedCultures = new[]{
new CultureInfo("it-IT")
};
app.UseRequestLocalization(new RequestLocalizationOptions
{
DefaultRequestCulture = new RequestCulture("it-IT"),
SupportedCultures = supportedCultures,
FallBackToParentCultures = false
});
CultureInfo.DefaultThreadCurrentCulture = CultureInfo.CreateSpecificCulture("it-IT");
app.UseHttpsRedirection();
app.UseAuthorization();
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is used by the publish/package process of your Web project. You can customize the behavior of this process
by editing this MSBuild file. In order to learn more about this please visit https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<AllowUntrustedCertificate>true</AllowUntrustedCertificate>
<WebPublishMethod>MSDeploy</WebPublishMethod>
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish>https://office.egalware.com/GPW/Api</SiteUrlToLaunchAfterPublish>
<ExcludeApp_Data>False</ExcludeApp_Data>
<ProjectGuid>ef8d5a17-0d60-4ef0-9262-57afac574843</ProjectGuid>
<SelfContained>false</SelfContained>
<MSDeployServiceURL>https://office.egalware.com:8172/MsDeploy.axd</MSDeployServiceURL>
<DeployIisAppPath>office.egalware.com/GPW/Api</DeployIisAppPath>
<RemoteSitePhysicalPath />
<SkipExtraFilesOnServer>True</SkipExtraFilesOnServer>
<MSDeployPublishMethod>WMSVC</MSDeployPublishMethod>
<EnableMSDeployBackup>True</EnableMSDeployBackup>
<EnableMsDeployAppOffline>True</EnableMsDeployAppOffline>
<UserName>jenkins</UserName>
<_SavePWD>True</_SavePWD>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
</Project>
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is used by the publish/package process of your Web project. You can customize the behavior of this process
by editing this MSBuild file. In order to learn more about this please visit https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<TimeStampOfAssociatedLegacyPublishXmlFile />
<EncryptedPassword>AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAAk75miMJLMkCTEelQutKpbwAAAAACAAAAAAADZgAAwAAAABAAAAB43BVhUmznhAu3pUfV1IfOAAAAAASAAACgAAAAEAAAAEV8hgbujDFfsMjS77NS2oYYAAAAUHPGFaVWgRqQPDU4wk5KGABmVHKko4/9FAAAANtaROBOcPHljx4RnmQHj5aHdtYk</EncryptedPassword>
<History>True|2022-01-27T09:34:09.2346456Z;True|2022-01-27T10:13:36.3080675+01:00;True|2022-01-27T10:05:45.6649507+01:00;True|2022-01-26T14:34:16.5263189+01:00;True|2022-01-26T13:04:22.2336648+01:00;False|2022-01-26T13:04:06.0677616+01:00;True|2021-11-08T09:03:37.7855257+01:00;True|2021-11-08T09:03:34.8263479+01:00;True|2021-11-08T09:03:31.8889390+01:00;True|2021-10-29T16:19:33.6539408+02:00;True|2021-10-29T16:19:28.2082360+02:00;True|2021-10-26T16:12:11.7740950+02:00;True|2021-10-26T16:11:56.2014641+02:00;True|2021-10-26T16:11:22.2897842+02:00;False|2021-10-26T16:10:58.3733037+02:00;False|2021-10-26T16:10:29.4793991+02:00;True|2021-10-21T17:35:11.9761128+02:00;True|2021-10-18T20:22:00.9305399+02:00;True|2021-10-18T18:32:29.4558070+02:00;True|2021-10-18T18:32:22.8950294+02:00;True|2021-10-18T18:16:13.7563877+02:00;True|2021-10-18T18:15:48.5678387+02:00;True|2021-10-18T12:45:45.7228681+02:00;True|2021-10-18T12:14:22.3221605+02:00;True|2021-10-18T12:14:15.7373530+02:00;True|2021-10-18T12:10:43.8607301+02:00;</History>
</PropertyGroup>
</Project>
+8 -8
View File
@@ -1,13 +1,13 @@
{
"$schema": "https://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:39480",
"sslPort": 44359
}
},
"iisSettings": {
"windowsAuthentication": true,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:39480",
"sslPort": 44359
}
},
"profiles": {
"GPW.CORE.Api": {
"commandName": "Project",
+15 -1
View File
@@ -5,5 +5,19 @@
"Microsoft.AspNetCore": "Warning"
}
},
"EnableChiudiFasi": "true"
"EnableChiudiFasi": "true",
"TimbraCheck": {
"checkAnomAppr": true,
"checkAnomTimb": true,
"checkAnomOreLav": true,
"checkAnomOreLavComm": true,
"checkAnomContinuato": true,
"sendEmailToUser": true,
"includeDirectUrl": true,
"gg2Chk": 60,
"gg2ChkCont": 30,
"gg2ChkOreCaricate": 30,
"maxErrMin": -29,
"maxErrPlus": 91
}
}
+37 -6
View File
@@ -7,8 +7,8 @@
},
"AllowedHosts": "*",
"ConnectionStrings": {
"GPW.DB": "Server=SQLSTEAM;Database=GPW;User ID=sa;Password=keyhammer;integrated security=False;MultipleActiveResultSets=True;App=LiMan.API;",
"Redis": "localhost:6379,DefaultDatabase=15,connectTimeout=5000,syncTimeout=5000,asyncTimeout=5000"
"GPW.DB": "Server=W2019-SQL-STEAM;Database=GPW;User ID=UserGPW; Password=Us3rGpw!75x93$77;integrated security=False;MultipleActiveResultSets=True;App=LiMan.API;",
"Redis": "localhost:26379,serviceName=prod,DefaultDatabase=15,connectTimeout=5000,syncTimeout=5000,asyncTimeout=5000,password=BtN9Py1wtLfLRvmzWnOPJ7RytDM+CLiVsJ/16zduNTlV8IOPGNrtzJSXPUnImA5PqmUMhKaUqo9NdHIG"
},
"ExternalProviders": {
"MailKit": {
@@ -16,7 +16,7 @@
"Address": "smtp-mail.outlook.com",
"Port": "587",
"Account": "steamwarebot@outlook.it",
"Password": "siamoInViaNazionale93",
"Password": "siamoInViaNazionale93!",
"SenderEmail": "steamwarebot@outlook.it",
"SenderName": "Steamware Email BOT"
}
@@ -24,23 +24,54 @@
},
"MailDest": {
"Admin": "samuele@steamware.net",
"ProjCheck": "samuele.locatelli@egalware.com,mara.baroni@egalware.com"
"ProjCheck": "samuele.locatelli@egalware.com,mara.baroni@egalware.com",
"TimbCheck": "samuele.locatelli@egalware.com,mara.baroni@egalware.com"
},
"EnableChiudiFasi": "false",
"Redis": {
"Password": "",
"Password": "BtN9Py1wtLfLRvmzWnOPJ7RytDM+CLiVsJ/16zduNTlV8IOPGNrtzJSXPUnImA5PqmUMhKaUqo9NdHIG",
"AllowAdmin": false,
"Ssl": false,
"ConnectTimeout": 6000,
"SyncTimeout": 6000,
"AsyncTimeout": 6000,
"ConnectRetry": 2,
"ServiceName": "prod",
"Hosts": [
{
"Host": "localhost",
"Port": "6379"
"Port": "26379"
},
{
"Host": "redis01.ufficio",
"Port": "26379"
},
{
"Host": "redis03.ufficio",
"Port": "26379"
},
{
"Host": "redis03.ufficio",
"Port": "26379"
}
],
"Database": 15
},
"ServerConv": {
"baseUrl": "https://office.egalware.com/GPW/ADMIN/"
},
"TimbraCheck": {
"checkAnomAppr": true,
"checkAnomTimb": true,
"checkAnomOreLav": true,
"checkAnomOreLavComm": true,
"checkAnomContinuato": true,
"sendEmailToUser": false,
"includeDirectUrl": true,
"gg2Chk": 60,
"gg2ChkCont": 30,
"gg2ChkOreCaricate": 30,
"maxErrMin": -29,
"maxErrPlus": 91
}
}
+31
View File
@@ -0,0 +1,31 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.4.33205.214
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GPW.CORE.Comp", "GPW.CORE.Comp\GPW.CORE.Comp.csproj", "{056826D6-6B88-42AA-AD09-FC380955834D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GPW.CORE.Test", "GPW.CORE.Test\GPW.CORE.Test.csproj", "{9E5A3295-08BF-4603-9FA3-D38A2F1100E5}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{056826D6-6B88-42AA-AD09-FC380955834D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{056826D6-6B88-42AA-AD09-FC380955834D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{056826D6-6B88-42AA-AD09-FC380955834D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{056826D6-6B88-42AA-AD09-FC380955834D}.Release|Any CPU.Build.0 = Release|Any CPU
{9E5A3295-08BF-4603-9FA3-D38A2F1100E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9E5A3295-08BF-4603-9FA3-D38A2F1100E5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9E5A3295-08BF-4603-9FA3-D38A2F1100E5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9E5A3295-08BF-4603-9FA3-D38A2F1100E5}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {B0B304CA-6B40-44FF-A9C3-F90A3C56B21A}
EndGlobalSection
EndGlobal
+54
View File
@@ -0,0 +1,54 @@
@if (ItemMode == ColType.labelStart || ItemMode == ColType.labelEnd)
{
<svg viewBox="0 0 @vBox.Width @vBox.Height" xmlns="http://www.w3.org/2000/svg">
@*<rect x="0" y="0" width="@vBox.Width" height="@vBox.Height" class="canv"></rect>*@
@foreach (var item in LabelItems())
{
<g transform="translate(@(item.pX),@(item.pY))">
<foreignObject x="0" y="0" width="@vBox.Width" height="@hFO">
<div class="hour-label">@item.value</div>
</foreignObject>
</g>
}
</svg>
}
else
{
<svg viewBox="0 0 @vBox.Width @vBox.Height" xmlns="http://www.w3.org/2000/svg" style="border-top: 1px solid #000;border-left: 1px solid #000; border-bottom: 1px solid #000;">
@*<rect x="0" y="0" width="@vBox.Width" height="@vBox.Height" class="canv"></rect>*@
@foreach (var item in BoxItems())
{
@*<a data-bs-toggle="modal" data-bs-target="#detailModal" style="text-decoration: none;" @onclick="()=>selItem(item)">*@
<a style="text-decoration: none;" @onclick="()=>selItem(item)">
<g transform="translate(@(item.pX),@(item.pY))">
<rect x="0" y="0" width="@item.width" height="@item.height" class="@item.cssClass" rx="30"></rect>
<foreignObject x="@mFO" y="@mFO" width="@item.width" height="@item.height">
<div class="event-title">@item.title</div>
<div class="event-time">@($"{item.start:HH:mm}")-@($"{item.end:HH:mm}")</div>
<div class="event-body">@item.value</div>
</foreignObject>
</g>
</a>
}
</svg>
}
<ToastDisplay DoShow="@showDetail" currPosition="ToastDisplay.DispPosition.midCenter" TitleSx="@titleSx" TitleDx="@titleDx" ReportClose="DetClosed">
<ChildContent>
@if (currData != null)
{
<div class="bg-dark p-3">
<svg viewBox="0 0 @(vBox.Height/4) @(vBox.Height/4)" xmlns="http://www.w3.org/2000/svg" >
<g>
<rect x="0" y="0" width="@(vBox.Height/4)" height="@(vBox.Height/4)" class="@currData.cssClass" rx="30"></rect>
<foreignObject x="@mFO" y="@mFO" width="@(vBox.Height/3)" height="@(vBox.Height/3)">
<div class="event-title">@currData.title</div>
<div class="event-time">@($"{currData.start:HH:mm}")-@($"{currData.end:HH:mm}")</div>
<div class="event-body">@currData.value</div>
</foreignObject>
</g>
</svg>
</div>
}
</ChildContent>
</ToastDisplay>
+214
View File
@@ -0,0 +1,214 @@
using Microsoft.AspNetCore.Components;
using System.Drawing;
namespace GPW.CORE.Comp
{
public partial class CalWeekColumn
{
#region Public Enums
public enum ColType
{
/// <summary>
/// Tipo etichetta Start (SX)
/// </summary>
labelStart,
/// <summary>
/// Tipo etichetta End (DX)
/// </summary>
labelEnd,
/// <summary>
/// Colonna dati
/// </summary>
dataContainer
}
#endregion Public Enums
#region Public Properties
/// <summary>
/// Lista etichette da mostrare (richiede tipo label...)
/// </summary>
[Parameter]
public List<CalendarEvent> EventList { get; set; } = new List<CalendarEvent>();
/// <summary>
/// Modalit di disegno
/// </summary>
[Parameter]
public ColType ItemMode { get; set; } = ColType.dataContainer;
[Parameter]
public int ValMax { get; set; } = 19;
[Parameter]
public int ValMin { get; set; } = 9;
/// <summary>
/// Dimensioni viewbox
/// </summary>
[Parameter]
public Size vBox { get; set; } = new Size(1200, 3200);
#endregion Public Properties
#region Protected Properties
protected boxData? currData { get; set; } = null;
protected int hFO
{
get => 100;// EventList.Count > 0 ? vBox.Height / EventList.Count : vBox.Height;
}
protected int mFO
{
get => vBox.Width * 4 / 100;
}
protected int wFO
{
get => vBox.Width * 98 / 100;
}
#endregion Protected Properties
#region Protected Methods
protected List<boxData> BoxItems()
{
List<boxData> answ = new List<boxData>();
int step = vBox.Height / (ValMax - ValMin);
int numEv = EventList.Count;
int evWidth = numEv > 1 ? (int)(1.2 * vBox.Width / numEv) : (int)(0.9 * vBox.Width);
int offsetX = 1;
int offsetY = 0;// step / 2;
if (numEv > 0)
{
int xStep = evWidth / EventList.Count;
int deltaX = 0;
answ = EventList
.OrderBy(x => x.Inizio)
.Select(x => new boxData()
{
pX = offsetX + xStep * (deltaX++),
//pY = offsetY + (x.Inizio.Hour - ValMin) * step,
pY = offsetY + (int)(x.Inizio.AddHours(-ValMin).TimeOfDay.TotalHours * step),
width = evWidth,
height = offsetY + (int)(x.Fine.Subtract(x.Inizio).TotalHours * step),
title = x.Type,
value = x.Description,
start = x.Inizio,
end = x.Fine,
cssClass = x.CssClass
})
.ToList();
}
return answ;
}
/// <summary>
/// Converte la stringa in formato markup valido
/// </summary>
/// <param name="rawData"></param>
/// <returns></returns>
protected MarkupString getMarkup(string rawData)
{
return new MarkupString(rawData);
}
protected bool showDetail { get; set; } = false;
protected string titleDx = "";
protected string titleSx = "";
protected async Task DetClosed(bool closed)
{
if (closed)
{
currData = null;
showDetail = false;
}
await Task.Delay(1);
}
/// <summary>
/// Genera una lista di etichette con corrdinate
/// </summary>
/// <returns></returns>
protected List<labelData> LabelItems()
{
int step = vBox.Height / numEv;// (ValMax - ValMin);
int offset = 0;// step / 2;
List<labelData> answ = EventList
.OrderBy(x => x.Inizio)
.Select(x => new labelData()
{
pX = vBox.Width / 10,
pY = offset + (int)(x.Inizio.AddHours(-ValMin).TimeOfDay.TotalHours * step),
value = x.Title
})
.ToList();
return answ;
}
protected async void selItem(boxData item)
{
titleSx = $"{item.start:dddd dd}";
titleDx = $"{item.start:MMMM yyyy}";
currData = item;
showDetail = true;
await Task.Delay(1);
await InvokeAsync(StateHasChanged);
}
protected string Messaggio = "";
#endregion Protected Methods
#region Protected Classes
protected class boxData
{
#region Public Properties
public string cssClass { get; set; } = "";
public DateTime end { get; set; } = DateTime.Today;
public int height { get; set; } = 0;
public int pX { get; set; } = 0;
public int pY { get; set; } = 0;
public DateTime start { get; set; } = DateTime.Today;
public string title { get; set; } = "";
public string value { get; set; } = "";
public int width { get; set; } = 0;
#endregion Public Properties
}
protected class labelData
{
#region Public Properties
public int pX { get; set; } = 0;
public int pY { get; set; } = 0;
public string value { get; set; } = "";
#endregion Public Properties
}
#endregion Protected Classes
#region Private Properties
private int numEv
{
get => EventList.Count > 0 ? EventList.Count : 1;
}
#endregion Private Properties
}
}
+68
View File
@@ -0,0 +1,68 @@
.lblText {
font-size: 0.3rem;
fill: white;
}
.lblBoxTitle {
font-size: 0.25rem;
fill: white;
}
.lblBoxText {
font-size: 0.2rem;
fill: white;
word-wrap: break-word;
}
.heavy {
font: bold 30px sans-serif;
fill: white;
}
.canv {
fill: #34495E;
}
.blockMal {
fill: rgba(3, 155, 229, 0.75);
stroke: rgba(3, 155, 229, 0.9);
stroke-width: 0.5rem;
}
.blockPerm {
fill: rgba(153, 102, 222, 0.75);
stroke: rgba(153, 102, 222, 0.9);
stroke-width: 0.5rem;
}
.blockFerie {
fill: rgba(0, 185, 0, 0.75);
stroke: rgba(0, 255, 0, 0.9);
stroke-width: 0.5rem;
}
.block104 {
fill: rgba(222, 0, 171, 0.75);
stroke: rgba(222, 0, 171, 0.9);
stroke-width: 0.5rem;
}
.blockChius {
fill: rgba(165, 185, 0, 0.75);
stroke: rgba(235, 255, 71, 0.9);
stroke-width: 0.5rem;
}
.blockFest {
fill: rgba(242, 35, 35, 0.75);
stroke: rgba(242, 35, 35, 0.9);
stroke-width: 0.5rem;
}
.event-title {
color: #FFFFFF;
font-size: 2rem;
}
.event-time {
color: #69CDFF;
font-size: 2rem;
}
.hour-label {
color: #9ABCDE;
font-size: 2rem;
}
.event-body {
/*color: #C8DCFF;*/
color: #A8BCFF;
font-size: 1.9rem;
word-break: break-word;
}
+83
View File
@@ -0,0 +1,83 @@
.lblText {
font-size: 0.3rem;
fill: white;
}
.lblBoxTitle {
font-size: 0.25rem;
fill: white;
}
.lblBoxText {
font-size: 0.2rem;
fill: white;
word-wrap: break-word;
}
.heavy {
font: bold 30px sans-serif;
fill: white;
}
.canv {
fill: #34495E;
}
.blockMal {
fill: rgba(3, 155, 229, 0.75);
stroke: rgba(3, 155, 229, 0.9);
stroke-width: 0.5rem;
}
.blockPerm {
fill: rgba(153, 102, 222, 0.75);
stroke: rgba(153, 102, 222, 0.9);
stroke-width: 0.5rem;
}
.blockFerie {
fill: rgba(0, 185, 0, 0.75);
stroke: rgba(0, 255, 0, 0.9);
stroke-width: 0.5rem;
}
.block104 {
fill: rgba(222, 0, 171, 0.75);
stroke: rgba(222, 0, 171, 0.9);
stroke-width: 0.5rem;
}
.blockChius {
fill: rgba(165, 185, 0, 0.75);
stroke: rgba(235, 255, 71, 0.9);
stroke-width: 0.5rem;
}
.blockFest {
fill: rgba(242, 35, 35, 0.75);
stroke: rgba(242, 35, 35, 0.9);
stroke-width: 0.5rem;
}
.event-title {
color: #FFFFFF;
font-size: 2rem;
}
.event-time {
color: #69CDFF;
font-size: 2rem;
}
.hour-label {
color: #9ABCDE;
font-size: 2rem;
}
.event-body {
/*color: #C8DCFF;*/
color: #A8BCFF ;
font-size: 1.9rem;
word-break: break-word;
}
+1
View File
@@ -0,0 +1 @@
.lblText{font-size:.3rem;fill:white;}.lblBoxTitle{font-size:.25rem;fill:white;}.lblBoxText{font-size:.2rem;fill:white;word-wrap:break-word;}.heavy{font:bold 30px sans-serif;fill:white;}.canv{fill:#34495e;}.blockMal{fill:rgba(3,155,229,.75);stroke:rgba(3,155,229,.9);stroke-width:.5rem;}.blockPerm{fill:rgba(153,102,222,.75);stroke:rgba(153,102,222,.9);stroke-width:.5rem;}.blockFerie{fill:rgba(0,185,0,.75);stroke:rgba(0,255,0,.9);stroke-width:.5rem;}.block104{fill:rgba(222,0,171,.75);stroke:rgba(222,0,171,.9);stroke-width:.5rem;}.blockChius{fill:rgba(165,185,0,.75);stroke:rgba(235,255,71,.9);stroke-width:.5rem;}.blockFest{fill:rgba(242,35,35,.75);stroke:rgba(242,35,35,.9);stroke-width:.5rem;}.event-title{color:#fff;font-size:2rem;}.event-time{color:#69cdff;font-size:2rem;}.hour-label{color:#9abcde;font-size:2rem;}.event-body{color:#a8bcff;font-size:1.9rem;word-break:break-word;}
+21
View File
@@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace GPW.CORE.Comp
{
public class CalendarEvent
{
public int id { get; set; } = 0;
public DateTime Inizio { get; set; } = DateTime.Today.AddHours(8);
public DateTime Fine { get; set; } = DateTime.Today.AddHours(10);
public string CssClass { get; set; } = "";
public string Title { get; set; } = "";
public string Description { get; set; } = "";
public string Icon { get; set; } = "";
public string Type { get; set; } = "";
public string ToolTip { get; set; } = "";
}
}
+96
View File
@@ -0,0 +1,96 @@
@if (WeekRows == null || WeekRows.Count == 0)
{
<LoadingData></LoadingData>
}
else
{
<table class="text-center cssTable" style="@HeadStyle">
<thead>
<tr class="row">
@for (int i = 0; i < 7; i++)
{
<th class="col">@($"{DateList[i]:ddd}".Substring(0, 1).ToUpper())</th>
}
</tr>
</thead>
<tbody>
@if (SingleWeek)
{
<tr class="row">
@foreach (var giorno in SingleWeekRow)
{
<td class="col @singleDayCss(giorno)" @onclick="() => clickDay(giorno)">
<span class="@singleDaySpanCss(giorno)">
@($"{giorno:dd}")
</span>
</td>
}
</tr>
}
else
{
@foreach (var settim in WeekRows)
{
<tr class="row">
@foreach (var giorno in settim)
{
<td class="col @dayCss(giorno)" @onclick="() => clickDay(giorno)">
<span class="@spanCss(giorno)">
@($"{giorno:dd}")
</span>
@if (!(giorno.DayOfWeek == DayOfWeek.Saturday || giorno.DayOfWeek == DayOfWeek.Sunday))
{
<div class="pallini">
@if (hasDot(giorno, "MAL"))
{
<div class="malattie">
&nbsp;
</div>
}
@if (hasDot(giorno, "FER"))
{
<div class="ferie">
&nbsp;
</div>
}
@if (hasDot(giorno, "PERM"))
{
<div class="permessi">
&nbsp;
</div>
}
@if (hasDot(giorno, "104"))
{
<div class="permessi104">
&nbsp;
</div>
}
</div>
}
</td>
}
</tr>
}
}
</tbody>
<tfoot>
@if (!SingleWeek)
{
<tr class="row">
<td class="col ">
<div colspan="7" class="meseAnno d-flex justify-content-around">
<button class="containerBtnTemp" @onclick="()=> subtractMonth()"><i class="fa-solid fa-circle-chevron-left"></i></button>
<div class="">
@($"{DtRif: MMM yyyy}")
</div>
<button class="containerBtnTemp" @onclick="()=> addMonth()"><i class="fa-solid fa-circle-chevron-right"></i></button>
</div>
</td>
</tr>
}
</tfoot>
</table>
}
+333
View File
@@ -0,0 +1,333 @@
using Microsoft.AspNetCore.Components;
namespace GPW.CORE.Comp
{
public partial class CalendarMonth
{
#region Public Properties
[Parameter]
public EventCallback<bool> backToCal { get; set; }
/// <summary>
/// Css giorno mese corrente
/// default: text-danger
/// </summary>
[Parameter]
public string CurrMonthCss { get; set; } = "text-light";
/// <summary>
/// Dizionario configurazione date (per check colori su data)
/// </summary>
[Parameter]
public Dictionary<DateTime, string>? DateCheck { get; set; }
/// <summary>
/// Dizionario configurazione date tipo BLOCK (es feste, chiusure aziendali)
/// </summary>
[Parameter]
public Dictionary<DateTime, string>? DateCheckBlock { get; set; }
/// <summary>
/// Evento selezione data valida (= entro il mese corrente/selezionato)
/// </summary>
[Parameter]
public EventCallback<DateTime> DateSelected { get; set; }
/// <summary>
/// Day di riferimento (tipicamente = oggi) per disegnare calendario alla data corrente
/// </summary>
[Parameter]
public DateTime DtRif { get; set; } = DateTime.Today;
/// <summary>
/// Elenco eventi da mostrare sul calendario
/// </summary>
[Parameter]
public List<CalendarEvent>? EventList { get; set; }
/// <summary>
/// Css titolo
/// default: color: red
/// </summary>
[Parameter]
public string HeadStyle { get; set; } = "color: red";
/// <summary>
/// Css sfondo principale
/// default: table table-dark table-borderless opt alt: table-striped, table-responsive
/// </summary>
[Parameter]
public string MainCss { get; set; } = "table table-dark table-borderless";
/// <summary>
/// Evento cambio di mese
/// </summary>
[Parameter]
public EventCallback<DateTime> MonthChanged { get; set; }
/// <summary>
/// Css giorno tipico
/// default: text-danger
/// </summary>
[Parameter]
public string OtherMonthCss { get; set; } = "text-secondary";
/// <summary>
/// Css giorno selezionato
/// default: bg-danger text-warning
/// </summary>
[Parameter]
public string SelDayCss { get; set; } = "bg-danger text-warning rounded-top p-2";
/// <summary>
/// Css dei giorni della settimana selezionata
/// default: bg-danger text-warning
/// </summary>
[Parameter]
public string SelWeekCss { get; set; } = "text-light m-0 px-0";
/// <summary>
/// Imposta di mostrare SOLO una singola settimana (per selezione data)
/// default: false
/// </summary>
[Parameter]
public bool SingleWeek { get; set; } = false;
/// <summary>
/// Css per giorni weekend (sab-dom)
/// default: text-danger
/// </summary>
[Parameter]
public string WeekEndCss { get; set; } = "bg-secondary text-light bg-opacity-75";
#endregion Public Properties
#region Protected Methods
protected override async Task OnInitializedAsync()
{
dtCurr = DateTime.Today;
await Task.Delay(1);
}
protected override async Task OnParametersSetAsync()
{
await FixDate();
}
#endregion Protected Methods
#region Private Properties
/// <summary>
/// Elenco date da mostrare
/// </summary>
private List<DateTime> DateList { get; set; } = new List<DateTime>();
private DateTime dtCurr { get; set; } = DateTime.Today;
private DateTime MonthEnd { get; set; } = DateTime.Today.AddMonths(1);
private DateTime MonthStart { get; set; } = DateTime.Today;
/// <summary>
/// Singola riga in caso di selezione...
/// </summary>
private List<DateTime> SingleWeekRow
{
get
{
List<DateTime> answ = new List<DateTime>();
foreach (var item in WeekRows)
{
if (item.Contains(DtRif))
{
answ = item;
break;
}
}
return answ;
}
}
/// <summary>
/// Righe da disegnare nel calendario
/// </summary>
private List<List<DateTime>> WeekRows { get; set; } = new List<List<DateTime>>();
#endregion Private Properties
#region Private Methods
private async Task addMonth()
{
await FixDate();
await MonthChanged.InvokeAsync(DtRif.AddMonths(1));
}
private async Task clickDay(DateTime dtClick)
{
// se è mese prec/successivo --> sposto data rif
if (dtClick < MonthStart)
{
DtRif = DtRif.AddMonths(-1);
await FixDate();
await MonthChanged.InvokeAsync(dtClick);
}
else if (dtClick > MonthEnd)
{
DtRif = DtRif.AddMonths(1);
await FixDate();
await MonthChanged.InvokeAsync(dtClick);
}
else
{
// altrimenti riporto evento
await DateSelected.InvokeAsync(dtClick);
if (EventList != null)
{
var eventListWeekly = EventList.Where(x => SingleWeekRow.Contains(dtClick)).ToList();
}
}
await Task.Delay(1);
}
private string dayCss(DateTime currDay)
{
string answ = CurrMonthCss;
// se è fuori estremi mese --> grigio...
if (currDay < MonthStart || currDay > MonthEnd)
{
answ = OtherMonthCss;
}
else
{
// cerco prima i valori BLOCK...
if (DateCheckBlock != null && DateCheckBlock.ContainsKey(currDay))
{
answ = DateCheckBlock[currDay];
}
// se è weekend forzo quello
else if (currDay.DayOfWeek == DayOfWeek.Saturday || currDay.DayOfWeek == DayOfWeek.Sunday)
{
answ = WeekEndCss;
}
}
return answ;
}
/// <summary>
/// Sistemazione date x disegnare controlli
/// </summary>
/// <returns></returns>
private async Task FixDate()
{
await Task.Delay(1);
// disegno sempre 6 righe = 42 gg
int numDD = 42;
MonthStart = new DateTime(DtRif.Year, DtRif.Month, 1);
MonthEnd = MonthStart.AddMonths(1).AddDays(-1);
DateTime calStart = MonthStart;
// calcolo date calendario in base al giorno dell'inizio mese...
switch (MonthStart.DayOfWeek)
{
case DayOfWeek.Sunday:
calStart = MonthStart.AddDays(-6);
break;
case DayOfWeek.Monday:
calStart = MonthStart.AddDays(-7);
break;
case DayOfWeek.Tuesday:
calStart = MonthStart.AddDays(-1);
break;
case DayOfWeek.Wednesday:
calStart = MonthStart.AddDays(-2);
break;
case DayOfWeek.Thursday:
calStart = MonthStart.AddDays(-3);
break;
case DayOfWeek.Friday:
calStart = MonthStart.AddDays(-4);
break;
case DayOfWeek.Saturday:
calStart = MonthStart.AddDays(-5);
break;
default:
break;
}
// calcolo fine mese sapendo che sono cmq 7 x 6 week...
int numEnd = numDD - MonthEnd.Subtract(calStart).Days;
DateTime calEnd = MonthEnd.AddDays(numEnd);
// calcolo elenco date (da disegnare)
DateList = new List<DateTime>();
for (int i = 0; i < numDD; i++)
{
DateList.Add(calStart.AddDays(i));
}
// ora sistemo le righe da disegnare...
WeekRows = new List<List<DateTime>>();
for (int i = 0; i < 6; i++)
{
WeekRows.Add(DateList.GetRange(i * 7, 7));
}
}
private bool hasDot(DateTime dtCurr, string type)
{
bool answ = false;
if (EventList != null)
{
foreach (var item in EventList)
{
if (item.Inizio.Date == dtCurr.Date && item.Type == type)
{
answ = true;
}
}
}
return answ;
}
private async Task resetCal()
{
await Task.Delay(1);
}
private string singleDayCss(DateTime currDay)
{
string answ = SelWeekCss;
return answ;
}
private string singleDaySpanCss(DateTime currDay)
{
string answ = currDay == DtRif ? SelDayCss : CurrMonthCss;
return answ;
}
private string spanCss(DateTime currDay)
{
string answ = "";
if (DateCheck != null && DateCheck.ContainsKey(currDay))
{
answ = DateCheck[currDay];
}
return answ;
}
private async Task subtractMonth()
{
await FixDate();
await MonthChanged.InvokeAsync(DtRif.AddMonths(-1));
}
#endregion Private Methods
}
}
+127
View File
@@ -0,0 +1,127 @@
.cssTable {
border-radius: 12px;
width: 100%;
height: 100%;
background-color: #34495E;
transition: height 0.3s cubic-bezier(0.54, 0.57, 0.36, 0.98) 0.2s;
}
.cssTable tr {
margin: 0 1rem 0 1rem;
}
.cssTable td {
padding: 0.6rem 0rem 0.4rem 0rem;
border: none;
}
.cssTable thead tr {
margin-top: 0.625rem;
}
.meseAnno {
text-transform: capitalize;
color: #fff;
}
.containerBtnTemp {
position: relative;
align-items: center;
display: flex;
justify-content: center;
}
.selDate {
background-color: #E67E22;
color: #000;
}
.pallini {
display: flex;
justify-content: space-evenly;
}
.divAll {
padding: 0;
margin: 0;
height: 0.3rem;
border-radius: 50%;
color: transparent;
}
@keyframes dotEntranceMal {
0% {
left: -50px;
}
100% {
left: 0;
}
}
@keyframes dotEntranceFer {
0% {
left: -50px;
}
100% {
left: 0;
}
}
@keyframes dotEntrancePerm {
0% {
left: -50px;
}
100% {
left: 0;
}
}
@keyframes dotEntranceCent {
0% {
left: -50px;
}
100% {
left: 0;
}
}
.malattie {
padding: 0;
margin: 0;
height: 0.3rem;
border-radius: 50%;
color: transparent;
background-color: #039BE5;
position: relative;
animation-name: dotEntranceMal;
animation-duration: 1.1s;
}
.ferie {
padding: 0;
margin: 0;
height: 0.3rem;
border-radius: 50%;
color: transparent;
background-color: #00FF00;
position: relative;
animation-name: dotEntranceFer;
animation-duration: 0.8s;
}
.permessi {
padding: 0;
margin: 0;
height: 0.3rem;
border-radius: 50%;
color: transparent;
background-color: #9966DE;
position: relative;
animation-name: dotEntrancePerm;
animation-duration: 0.5s;
}
.permessi104 {
padding: 0;
margin: 0;
height: 0.3rem;
border-radius: 50%;
color: transparent;
background-color: #DE00AB;
position: relative;
animation-name: dotEntranceCent;
animation-duration: 0.3s;
}
.containerBtnTemp {
position: relative;
align-items: center;
display: flex;
justify-content: center;
background-color: transparent;
border: none;
color: #fff;
}
+126
View File
@@ -0,0 +1,126 @@
.cssTable {
border-radius: 12px;
width: 100%;
height: 100%;
background-color: #34495E;
transition: height 0.3s cubic-bezier(0.54, 0.57, 0.36, 0.98) 0.2s;
}
.cssTable tr {
margin: 0 1rem 0 1rem;
}
.cssTable td {
padding: 0.6rem 0rem 0.4rem 0rem;
border: none;
}
.cssTable thead tr {
margin-top: 0.625rem;
}
.meseAnno{
text-transform: capitalize;
color: #fff;
}
.containerBtnTemp {
position: relative;
align-items: center;
display: flex;
justify-content: center;
}
.selDate {
background-color: #E67E22;
color: #000;
}
.pallini {
display: flex;
justify-content: space-evenly;
}
.divAll {
padding: 0;
margin: 0;
height: 0.3rem;
border-radius: 50%;
color: transparent;
}
@keyframes dotEntranceMal {
0% {
left: -50px
}
100% {
left: 0
}
}
@keyframes dotEntranceFer {
0% {
left: -50px
}
100% {
left: 0
}
}
@keyframes dotEntrancePerm {
0% {
left: -50px
}
100% {
left: 0
}
}
@keyframes dotEntranceCent {
0% {
left: -50px
}
100% {
left: 0
}
}
.malattie {
.divAll;
background-color: #039BE5;
position: relative;
animation-name: dotEntranceMal;
animation-duration: 1.1s;
}
.ferie {
.divAll;
background-color: #00FF00;
position: relative;
animation-name: dotEntranceFer;
animation-duration: 0.8s;
}
.permessi {
.divAll;
background-color: #9966DE;
position: relative;
animation-name: dotEntrancePerm;
animation-duration: 0.5s;
}
.permessi104 {
.divAll;
background-color: #DE00AB;
position: relative;
animation-name: dotEntranceCent;
animation-duration: 0.3s;
}
.containerBtnTemp {
position: relative;
align-items: center;
display: flex;
justify-content: center;
background-color: transparent;
border: none;
color: #fff;
}
+1
View File
@@ -0,0 +1 @@
.cssTable{border-radius:12px;width:100%;height:100%;background-color:#34495e;transition:height .3s cubic-bezier(.54,.57,.36,.98) .2s;}.cssTable tr{margin:0 1rem 0 1rem;}.cssTable td{padding:.6rem 0 .4rem 0;border:0;}.cssTable thead tr{margin-top:.625rem;}.meseAnno{text-transform:capitalize;color:#fff;}.containerBtnTemp{position:relative;align-items:center;display:flex;justify-content:center;}.selDate{background-color:#e67e22;color:#000;}.pallini{display:flex;justify-content:space-evenly;}.divAll{padding:0;margin:0;height:.3rem;border-radius:50%;color:transparent;}@keyframes dotEntranceMal{0%{left:-50px;}100%{left:0;}}@keyframes dotEntranceFer{0%{left:-50px;}100%{left:0;}}@keyframes dotEntrancePerm{0%{left:-50px;}100%{left:0;}}@keyframes dotEntranceCent{0%{left:-50px;}100%{left:0;}}.malattie{padding:0;margin:0;height:.3rem;border-radius:50%;color:transparent;background-color:#039be5;position:relative;animation-name:dotEntranceMal;animation-duration:1.1s;}.ferie{padding:0;margin:0;height:.3rem;border-radius:50%;color:transparent;background-color:#0f0;position:relative;animation-name:dotEntranceFer;animation-duration:.8s;}.permessi{padding:0;margin:0;height:.3rem;border-radius:50%;color:transparent;background-color:#9966de;position:relative;animation-name:dotEntrancePerm;animation-duration:.5s;}.permessi104{padding:0;margin:0;height:.3rem;border-radius:50%;color:transparent;background-color:#de00ab;position:relative;animation-name:dotEntranceCent;animation-duration:.3s;}.containerBtnTemp{position:relative;align-items:center;display:flex;justify-content:center;background-color:transparent;border:0;color:#fff;}
+51
View File
@@ -0,0 +1,51 @@
@if (DateList == null || DateList.Count == 0)
{
<LoadingData></LoadingData>
}
else
{
<table class="cssTable" style="@HeadStyle">
<thead>
<tr class="">
<th class="text-center text-light" @onclick="()=>openCalendarMonth()" style="width: @lblWidth;"><i class="fa-regular fa-circle-xmark"></i></th>
@foreach (var item in DateList)
{
<th class="text-center" style="width: @dataWidth;">
<div>
@($"{item:ddd}".Substring(0, 1).ToUpper())
</div>
<div class="small">
<sup>@($"{item:dd}")</sup>
</div>
</th>
}
</tr>
</thead>
<tbody>
<tr>
<td>
<CalWeekColumn ItemMode="CalWeekColumn.ColType.labelStart" vBox="vBoxLabel" EventList="@LabelList()" ValMin="8" ValMax="20"></CalWeekColumn>
</td>
@foreach (var item in DateList)
{
<td>
<CalWeekColumn ItemMode="CalWeekColumn.ColType.dataContainer" vBox="vBoxCont" EventList="@DayEvent(item)" ValMin="8" ValMax="20"></CalWeekColumn>
</td>
}
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="@calcColSpan" class="meseAnno">
<div class="d-flex justify-content-around">
<button class="containerBtnTemp" @onclick="()=> changeWeek(-1)"><i class="fa-solid fa-circle-chevron-left"></i></button>
<div class="">
@($"{DtRif: MMM yyyy}") | <b>W@($"{weekNum(DtRif):00}")</b>
</div>
<button class="containerBtnTemp" @onclick="()=> changeWeek(1)"><i class="fa-solid fa-circle-chevron-right"></i></button>
</div>
</td>
</tr>
</tfoot>
</table>
}
+216
View File
@@ -0,0 +1,216 @@
using GPW.CORE.Data;
using Microsoft.AspNetCore.Components;
using System.Drawing;
namespace GPW.CORE.Comp
{
public partial class CalendarWeek
{
#region Public Properties
/// <summary>
/// Periodo da mostrare (tipicamente 1 settimana)
/// </summary>
[Parameter]
public List<DateTime> DateList { get; set; } = new List<DateTime>();
/// <summary>
/// Eventi da inserire
/// </summary>
[Parameter]
public List<CalendarEvent> EventList { get; set; } = new List<CalendarEvent>();
/// <summary>
/// Evento selezione data valida (= entro il periodo selezionato)
/// </summary>
[Parameter]
public EventCallback<DateTime> DateSelected { get; set; }
[Parameter]
public EventCallback<bool> backToCalendar{ get; set; }
[Parameter]
public int EndHour { get; set; } = 20;
/// <summary>
/// Css titolo
/// default: color: red
/// </summary>
[Parameter]
public string HeadStyle { get; set; } = "color: #E67E22";
/// <summary>
/// Altezza di ogni blocco ora da mostrare
/// </summary>
[Parameter]
public int HeightHour { get; set; } = 20;
/// <summary>
/// Larghezza calcolata delle etichette, minimo tra
/// </summary>
[Parameter]
public int labelWidth { get; set; } = 15;
[Parameter]
public int StartHour { get; set; } = 8;
/// <summary>
/// Dimensioni viewbox GLOBALE
/// </summary>
[Parameter]
public Size vBox { get; set; } = new Size(1200, 1600);
/// <summary>
/// Evento richiesta modifica settimana
/// </summary>
[Parameter]
public EventCallback<int> WeekChanged { get; set; }
#endregion Public Properties
#region Protected Fields
protected List<int> HourSlot = new List<int>();
#endregion Protected Fields
#region Protected Properties
protected int calcColSpan
{
get => numDays + 1;
}
protected DateTime DtRif
{
get
{
DateTime answ = DateTime.Today;
if (DateList != null && DateList.Count > 0)
{
answ = DateList[0];
}
return answ;
}
}
protected int numDays
{
get => DateList.Count;
}
protected int contWidth
{
get => (vBox.Width * 2) / (2 * numDays + 1);
}
private string lblWidth
{
get => $"{(double)(vBox.Width - (contWidth * numDays)) / vBox.Width:P2}".Replace(",", ".");
}
private string dataWidth
{
get => $"{(double)contWidth / vBox.Width:P2}".Replace(",", ".");
}
protected Size vBoxLabel
{
get
{
// label è MENO di 1/tot columns
Size answ = new Size(contWidth / 2, vBox.Height);
return answ;
}
}
protected Size vBoxCont
{
get
{
// label è MENO di 1/tot columns
Size answ = new Size(contWidth, vBox.Height);
return answ;
}
}
//protected Size vBoxLabel
//{
// get
// {
// // label è MENO di 1/tot columns
// Size answ = new Size(labelWidth, vBox.Height);
// return answ;
// }
//}
#endregion Protected Properties
#region Protected Methods
/// <summary>
/// Richiesta cambio sett di riferimento --&gt; riporta evento
/// </summary>
/// <param name="delta"></param>
/// <returns></returns>
protected async Task changeWeek(int delta)
{
await WeekChanged.InvokeAsync(delta);
}
protected override async Task OnParametersSetAsync()
{
HourSlot = new List<int>();
for (int i = StartHour; i <= EndHour; i++)
{
HourSlot.Add(i);
}
await InvokeAsync(StateHasChanged);
}
/// <summary>
/// GetIso8601WeekOfYear
/// </summary>
/// <param name="DtReq"></param>
/// <returns></returns>
protected int weekNum(DateTime DtReq)
{
int wNum = WeekData.GetIso8601WeekOfYear(DtReq);
return wNum;
}
protected List<CalendarEvent> DayEvent(DateTime DtReq)
{
List<CalendarEvent> answ = new List<CalendarEvent>();
if (EventList != null)
{
answ = EventList.Where(x => x.Inizio.Date == DtReq.Date).ToList();
}
return answ;
}
/// <summary>
/// Genera etichette orarie (1 x ora)
/// </summary>
/// <returns></returns>
protected List<CalendarEvent> LabelList()
{
int idx = 0;
List<CalendarEvent> answ = HourSlot.Select(x => new CalendarEvent()
{
id = idx++,
Inizio = DtRif.AddHours(x),
Fine = DtRif.AddHours(x),
CssClass = "text-light",
Title = $"{x:00}:00",
Description = $"{x:00}:00"
}).ToList();
return answ;
}
protected async Task openCalendarMonth()
{
await backToCalendar.InvokeAsync(true);
}
#endregion Protected Methods
}
}
+33
View File
@@ -0,0 +1,33 @@
.cssTable {
border-radius: 12px;
width: 100%;
height: 100%;
background-color: #34495E;
}
.cssTable tr {
margin: 0 1rem 0 1rem;
}
.cssTable td {
padding: 0.1rem 0rem 0.1rem 0rem;
border: none;
}
.cssTable thead tr {
margin-top: 0.625rem;
}
.meseAnno {
text-transform: capitalize;
color: #fff;
}
.containerBtnTemp {
position: relative;
align-items: center;
display: flex;
justify-content: center;
background-color: transparent;
border: none;
color: #fff;
}
.selDate {
background-color: #E67E22;
color: #000;
}
+40
View File
@@ -0,0 +1,40 @@
.cssTable {
border-radius: 12px;
width: 100%;
height: 100%;
background-color: #34495E;
}
.cssTable tr {
margin: 0 1rem 0 1rem;
}
.cssTable td {
padding: 0.1rem 0rem 0.1rem 0rem;
border: none;
}
.cssTable thead tr {
margin-top: 0.625rem;
}
.meseAnno {
text-transform: capitalize;
color: #fff;
}
.containerBtnTemp {
position: relative;
align-items: center;
display: flex;
justify-content: center;
background-color: transparent;
border: none;
color: #fff;
}
.selDate {
background-color: #E67E22;
color: #000;
}
+1
View File
@@ -0,0 +1 @@
.cssTable{border-radius:12px;width:100%;height:100%;background-color:#34495e;}.cssTable tr{margin:0 1rem 0 1rem;}.cssTable td{padding:.1rem 0 .1rem 0;border:0;}.cssTable thead tr{margin-top:.625rem;}.meseAnno{text-transform:capitalize;color:#fff;}.containerBtnTemp{position:relative;align-items:center;display:flex;justify-content:center;background-color:transparent;border:0;color:#fff;}.selDate{background-color:#e67e22;color:#000;}
@@ -1,4 +1,5 @@
@inject IJSRuntime JSRuntime
@using Microsoft.JSInterop
@inject IJSRuntime JSRuntime
<canvas id="@Id"></canvas>
+5
View File
@@ -0,0 +1,5 @@
@using Microsoft.JSInterop
@inject IJSRuntime JSRuntime
<canvas id="@Id"></canvas>
+132
View File
@@ -0,0 +1,132 @@
using Microsoft.AspNetCore.Components;
using Microsoft.JSInterop;
namespace GPW.CORE.Comp
{
public partial class ChartHist
{
#region Public Properties
[Parameter]
public string BackColor { get; set; } = "";
[Parameter]
public string TextColor { get; set; } = "";
[Parameter]
public string ChartLabel { get; set; } = "";
[Parameter]
public string[]? Data { get; set; }
[Parameter]
public string Id { get; set; } = "MyHist";
[Parameter]
public string[]? Labels { get; set; }
[Parameter]
public string LineColor { get; set; } = "";
[Parameter]
public string GridColor { get; set; } = "";
[Parameter]
public int AnimationTime { get; set; } = 0;
#endregion Public Properties
#region Protected Methods
protected override async Task OnAfterRenderAsync(bool firstRender)
{
await renderChart();
}
/// <summary>
/// Inizializzazione rendering componente
///
/// partendo da qui: https://www.williamleme.com/posts/2020/003-chartjs-blazor/
/// https://www.puresourcecode.com/dotnet/blazor/using-chart-js-with-blazor/ https://www.tutorialsteacher.com/csharp/csharp-anonymous-type
/// </summary>
/// <param name="firstRender"></param>
/// <returns></returns>
protected async Task renderChart()
{
// creazione di un oggetto anonymous type con tutte le opzioni da passare a chart.js
var config = new
{
type = "bar",
options = new
{
responsive = true,
scales = new
{
yAxes = new
{
suggestedMin = 0,
display = true,
grid = new
{
color = GridColor,
display = true,
},
ticks = new
{
beginAtZero = true,
color = TextColor,
maxTicksLimit = 10,
}
},
xAxes = new
{
grid = new
{
color = GridColor,
display = true,
},
ticks = new
{
color = TextColor,
}
},
},
plugins = new
{
legend = new
{
display = true,
labels = new
{
color = TextColor,
},
},
},
Animation = new
{
Duration = AnimationTime
},
},
data = new
{
datasets = new[]{
new
{
data = Data,
borderColor = LineColor,
backgroundColor = BackColor,
borderWidth = 1,
color = TextColor,
label = ChartLabel
}
},
labels = Labels
}
};
await JSRuntime.InvokeVoidAsync("setup", Id, config);
}
#endregion Protected Methods
}
}
+5
View File
@@ -0,0 +1,5 @@
@using Microsoft.JSInterop
@inject IJSRuntime JSRuntime
<canvas id="@Id"></canvas>
+144
View File
@@ -0,0 +1,144 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Web;
using Microsoft.JSInterop;
namespace GPW.CORE.Comp
{
public partial class ChartTS
{
#region Public Properties
[Parameter]
public int AnimationTime { get; set; } = 0;
[Parameter]
public string BackColor { get; set; } = "";
[Parameter]
public string TextColor { get; set; } = "";
[Parameter]
public string GridColor { get; set; } = "";
[Parameter]
public string ChartLabel { get; set; } = "";
[Parameter]
public List<chartJsData.chartJsTSerie> DataTS { get; set; } = null!;
[Parameter]
public string Id { get; set; } = "MyTs";
[Parameter]
public string LineColor { get; set; } = "";
#endregion Public Properties
#region Protected Methods
/// <summary>
/// Inizializzazione rendering componente
///
/// partendo da qui:
/// https://www.williamleme.com/posts/2020/003-chartjs-blazor/
/// https://www.puresourcecode.com/dotnet/blazor/using-chart-js-with-blazor/
/// https://www.tutorialsteacher.com/csharp/csharp-anonymous-type
/// </summary>
/// <param name = "firstRender"></param>
/// <returns></returns>
protected override async Task OnAfterRenderAsync(bool firstRender)
{
await renderChart();
}
/// <summary>
/// Inizializzazione rendering componente
///
/// partendo da qui:
/// https://www.williamleme.com/posts/2020/003-chartjs-blazor/
/// https://www.puresourcecode.com/dotnet/blazor/using-chart-js-with-blazor/
/// https://www.tutorialsteacher.com/csharp/csharp-anonymous-type
/// </summary>
/// <param name = "firstRender"></param>
/// <returns></returns>
protected async Task renderChart()
{
// creazione di un oggetto anonymous type con tutte le opzioni da passare a chart.js
var config = new
{
type = "line",
options = new
{
responsive = true,
scales = new
{
yAxes = new
{
display = true,
grid = new
{
color = GridColor,
display = true,
},
ticks = new
{
color = TextColor,
maxTicksLimit = 10,
}
},
xAxes = new
{
type = "timeseries",
distribution = "linear",
grid = new
{
color = GridColor,
display = true,
},
ticks = new
{
color = TextColor,
},
}
},
plugins = new
{
legend = new
{
display = true,
labels = new
{
color = TextColor,
},
},
},
Animation = new
{
Duration = AnimationTime
},
},
data = new
{
datasets = new[]
{
new
{
data = DataTS,
borderColor = LineColor,
backgroundColor = BackColor,
lineTension = 0,
stepped = true,
label = ChartLabel
}
}
}
};
await JSRuntime.InvokeVoidAsync("setup", Id, config);
}
#endregion Protected Methods
}
}
+14
View File
@@ -0,0 +1,14 @@

<svg viewBox="0 0 200 200" width="100%" height="100%" xmlns="http://www.w3.org/2000/svg">
<circle cx="100" cy="100" r="@innRad" fill="none" stroke="rgba(189, 195, 199, 0.5)" stroke-width="@sWidth" />
<circle cx="100" cy="100" r="@innRad" fill="none" stroke="@strokeColorVal" stroke-width="@sWidth" stroke-linecap="round" transform="rotate(-90,100,100)" stroke-dasharray="calc(@innRad * 6.28 * @valInner / @maxVal) calc(@innRad * 6.28 * (@maxVal - @valInner) / @maxVal)" />
<g transform="translate(100,100)">
<text id="TitleElem" style="@StyleTitolo" x="0" y="0">@Titolo</text>
<text x="0" y="30" style="@StyleTesto">@Testo</text>
</g>
@if (showOuter)
{
<circle cx="100" cy="100" r="@outRad" fill=none stroke="rgba(189, 195, 199, 0.5)" class="bg-opacity-25" stroke-width="@sWidth" />
<circle cx="100" cy="100" r="@outRad" fill=none stroke="@strokeColorVal" stroke-width="@sWidth" stroke-linecap="round" transform="rotate(-90,100,100)" stroke-dasharray="calc(@outRad * 6.28 * @valOuter / @maxVal) calc(@outRad * 6.28 * (@maxVal - @valOuter) / @maxVal)" />
}
</svg>
+69
View File
@@ -0,0 +1,69 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Web;
namespace GPW.CORE.Comp
{
public partial class CircleGauge
{
[Parameter]
public string Titolo { get; set; } = "Titolo";
[Parameter]
public string Testo { get; set; } = "Testo";
[Parameter]
public string StyleTitolo { get; set; } = "font-size: 3em; font-weight:bold; fill: white;";
[Parameter]
public string StyleTesto { get; set; } = "font-size: 1em; fill: gray;";
[Parameter]
public string strokeColorVal { get; set; } = "#00FF66";
/// <summary>
/// Valore da rappresentare
/// </summary>
[Parameter]
public int currVal { get; set; } = 0;
/// <summary>
/// Valore MASSIMO da rappresentare (=100%)
/// </summary>
[Parameter]
public int maxVal { get; set; } = 0;
/// <summary>
/// Spessore dei cerchida disegnare
/// </summary>
[Parameter]
public int sWidth { get; set; } = 10;
/// <summary>
/// Raggio cerchio interno (0..100)
/// </summary>
[Parameter]
public int innRad { get; set; } = 70;
/// <summary>
/// Raggio cerchio esterno (0..100)
/// </summary>
[Parameter]
public int outRad { get; set; } = 85;
private bool showOuter
{
get => currVal > maxVal;
}
private int valInner
{
get => currVal < maxVal ? currVal : maxVal;
}
private int valOuter
{
get => currVal < maxVal ? 0 : currVal - maxVal;
}
}
}
+7
View File
@@ -0,0 +1,7 @@
/* FIX per tyesto dentro SVG: https://www.fabiofranchino.com/blog/how-to-align-svg-text/ */
text {
text-anchor: middle;
/* align center */
dominant-baseline: middle;
/* vertical alignment fix */
}
+6
View File
@@ -0,0 +1,6 @@

/* FIX per tyesto dentro SVG: https://www.fabiofranchino.com/blog/how-to-align-svg-text/ */
text {
text-anchor: middle; /* align center */
dominant-baseline: middle; /* vertical alignment fix */
}
+1
View File
@@ -0,0 +1 @@
text{text-anchor:middle;dominant-baseline:middle;}
+37
View File
@@ -0,0 +1,37 @@
using Microsoft.JSInterop;
namespace GPW.CORE.Comp
{
// This class provides an example of how JavaScript functionality can be wrapped
// in a .NET class for easy consumption. The associated JavaScript module is
// loaded on demand when first needed.
//
// This class can be registered as scoped DI service and then injected into Blazor
// components for use.
public class ExampleJsInterop : IAsyncDisposable
{
private readonly Lazy<Task<IJSObjectReference>> moduleTask;
public ExampleJsInterop(IJSRuntime jsRuntime)
{
moduleTask = new(() => jsRuntime.InvokeAsync<IJSObjectReference>(
"import", "./_content/GPW.CORE.Comp/exampleJsInterop.js").AsTask());
}
public async ValueTask<string> Prompt(string message)
{
var module = await moduleTask.Value;
return await module.InvokeAsync<string>("showPrompt", message);
}
public async ValueTask DisposeAsync()
{
if (moduleTask.IsValueCreated)
{
var module = await moduleTask.Value;
await module.DisposeAsync();
}
}
}
}
+48
View File
@@ -0,0 +1,48 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<Compile Remove="bin\**" />
<Content Remove="bin\**" />
<EmbeddedResource Remove="bin\**" />
<None Remove="bin\**" />
</ItemGroup>
<ItemGroup>
<Compile Remove="CircleGauge_2.razor.cs" />
</ItemGroup>
<ItemGroup>
<Content Remove="CircleGauge_2.razor" />
<Content Remove="compilerconfig.json" />
</ItemGroup>
<ItemGroup>
<None Remove="CircleGauge_2.razor.css" />
<None Remove="CircleGauge_2.razor.less" />
<None Remove="CircleGauge_2.razor.min.css" />
</ItemGroup>
<ItemGroup>
<None Include="compilerconfig.json" />
</ItemGroup>
<ItemGroup>
<SupportedPlatform Include="browser" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="6.0.14" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\GPW.CORE.Data\GPW.CORE.Data.csproj" />
</ItemGroup>
</Project>
+11
View File
@@ -0,0 +1,11 @@
// This file is used by Code Analysis to maintain SuppressMessage
// attributes that are applied to this project.
// Project-level suppressions either have no target or are given
// a specific target and scoped to a namespace, type, member, etc.
using System.Diagnostics.CodeAnalysis;
[assembly: SuppressMessage("Interoperability", "CA1416:Validate platform compatibility", Justification = "<Pending>", Scope = "member", Target = "~M:GPW.CORE.Comp.SteamCrypto.getHashStringMD5(System.String)~System.String")]
[assembly: SuppressMessage("Interoperability", "CA1416:Validate platform compatibility", Justification = "<Pending>", Scope = "member", Target = "~M:GPW.CORE.Comp.SteamCrypto.EncryptString(System.String,System.String)~System.String")]
[assembly: SuppressMessage("Interoperability", "CA1416:Validate platform compatibility", Justification = "<Pending>", Scope = "member", Target = "~M:GPW.CORE.Comp.IpUtils.getLocalIpv4(System.String)~System.String")]
[assembly: SuppressMessage("Interoperability", "CA1416:Validate platform compatibility", Justification = "<Pending>", Scope = "member", Target = "~M:GPW.CORE.Comp.SteamCrypto.DecryptString(System.String,System.String)~System.String")]
+46
View File
@@ -0,0 +1,46 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Sockets;
using System.Net;
using System.Text;
using System.Threading.Tasks;
namespace GPW.CORE.Comp
{
public class IpUtils
{
/// <summary>
/// Restituisce l'IP v4 locale dato uno degli ip machcina (anche IPV6)
/// </summary>
/// <param name="firstIp"></param>
/// <returns></returns>
public static string getLocalIpv4(string firstIp)
{
string devIp = firstIp;
IPAddress clientIP = IPAddress.Parse(devIp);
try
{
IPHostEntry GetIPHost = Dns.GetHostEntry(clientIP);
if (GetIPHost != null)
{
// se trovo + di 1 ip cerco il primo NON IPV6...
if (GetIPHost.AddressList.Count() > 1)
{
foreach (IPAddress item in GetIPHost.AddressList)
{
if (item.AddressFamily == AddressFamily.InterNetwork)
{
devIp = item.ToString();
break;
}
}
}
}
}
catch
{ }
return devIp;
}
}
}
+14
View File
@@ -0,0 +1,14 @@
<div class="row p-3 m-2">
<div class="col-12 text-center mt-5 py-5 alert alert-primary">
<div class="row">
<div class="col-6 text-end">
<div class="spinner-grow" role="status" style="width: 3rem; height: 3rem;">
<span class="visually-hidden">Loading...</span>
</div>
</div>
<div class="col-6">
<h3>loading data</h3>
</div>
</div>
</div>
</div>
+21
View File
@@ -0,0 +1,21 @@
namespace GPW.CORE.Comp
{
public class QHelper
{
#region Public Methods
/// <summary>
/// Blazor: get query parm from the URL
/// </summary>
/// <param name="parmName"></param>
/// <returns></returns>
public static string GetQueryParm(string fullUri, string parmName)
{
var uriBuilder = new UriBuilder(fullUri);
var q = System.Web.HttpUtility.ParseQueryString(uriBuilder.Query);
return q[parmName] ?? "";
}
#endregion Public Methods
}
}
+214
View File
@@ -0,0 +1,214 @@
using System.Security.Cryptography;
using System.Text;
namespace GPW.CORE.Comp
{
/// <summary>
/// utils x cifrature e Crypto
/// </summary>
public class SteamCrypto
{
#region Public Methods
/// <summary>
/// decifra un messaggio con una password
/// </summary>
/// <param name="Message"></param>
/// <param name="Passphrase"></param>
/// <returns></returns>
public static string DecryptString(string Message, string Passphrase)
{
string answ = Message;
byte[] Results = new byte[8];
UTF8Encoding UTF8 = new UTF8Encoding();
// Step 1. We hash the passphrase using MD5 We use the MD5 hash generator as the result
// is a 128 bit byte array which is a valid length for the TripleDES encoder we use below
var HashProvider = MD5.Create();
//MD5CryptoServiceProvider HashProvider = new MD5CryptoServiceProvider();
byte[] TDESKey = HashProvider.ComputeHash(UTF8.GetBytes(Passphrase));
// Step 2. Create a new TripleDESCryptoServiceProvider object
var TDESAlgorithm = TripleDES.Create();
//TripleDESCryptoServiceProvider TDESAlgorithm = new TripleDESCryptoServiceProvider();
// Step 3. Setup the decoder
TDESAlgorithm.Key = TDESKey;
TDESAlgorithm.Mode = CipherMode.ECB;
TDESAlgorithm.Padding = PaddingMode.PKCS7;
// Step 4. Convert the input string to a byte[]
byte[] DataToDecrypt = new byte[8];
try
{
DataToDecrypt = Convert.FromBase64String(Message);
}
catch
{ }
if (DataToDecrypt != null)
{
// Step 5. Attempt to decrypt the string
try
{
ICryptoTransform Decryptor = TDESAlgorithm.CreateDecryptor();
Results = Decryptor.TransformFinalBlock(DataToDecrypt, 0, DataToDecrypt.Length);
}
finally
{
// Clear the TripleDes and Hashprovider services of any sensitive information
TDESAlgorithm.Clear();
HashProvider.Clear();
}
// Step 6. Return the decrypted string in UTF8 format
answ = UTF8.GetString(Results);
}
return answ;
}
/// <summary>
/// cifra un messaggio con una password
/// </summary>
/// <param name="Message"></param>
/// <param name="Passphrase"></param>
/// <returns></returns>
public static string EncryptString(string Message, string Passphrase)
{
byte[] Results;
UTF8Encoding UTF8 = new UTF8Encoding();
// Step 1. We hash the passphrase using MD5 We use the MD5 hash generator as the result
// is a 128 bit byte array which is a valid length for the TripleDES encoder we use below
var HashProvider = MD5.Create();
//MD5CryptoServiceProvider HashProvider = new MD5CryptoServiceProvider();
byte[] TDESKey = HashProvider.ComputeHash(UTF8.GetBytes(Passphrase));
// Step 2. Create a new TripleDESCryptoServiceProvider object
var TDESAlgorithm = TripleDES.Create();
//TripleDESCryptoServiceProvider TDESAlgorithm = new TripleDESCryptoServiceProvider();
// Step 3. Setup the encoder
TDESAlgorithm.Key = TDESKey;
TDESAlgorithm.Mode = CipherMode.ECB;
TDESAlgorithm.Padding = PaddingMode.PKCS7;
// Step 4. Convert the input string to a byte[]
byte[] DataToEncrypt = UTF8.GetBytes(Message);
// Step 5. Attempt to encrypt the string
try
{
ICryptoTransform Encryptor = TDESAlgorithm.CreateEncryptor();
Results = Encryptor.TransformFinalBlock(DataToEncrypt, 0, DataToEncrypt.Length);
}
finally
{
// Clear the TripleDes and Hashprovider services of any sensitive information
TDESAlgorithm.Clear();
HashProvider.Clear();
}
// Step 6. Return the encrypted string as a base64 encoded string
return Convert.ToBase64String(Results);
}
/// <summary>
/// genera hash di una stringa in MD5 (es x hash gravatar)
/// </summary>
/// <param name="Message"></param>
/// <returns></returns>
public static string getHashStringMD5(string Message)
{
string hash = "";
using (MD5 md5Hash = MD5.Create())
{
hash = GetMd5Hash(md5Hash, Message);
}
return hash;
}
/// <summary>
/// Crea un hash MD5
/// </summary>
/// <param name="md5Hash"></param>
/// <param name="input"></param>
/// <returns></returns>
public static string GetMd5Hash(MD5 md5Hash, string input)
{
// Convert the input string to a byte array and compute the hash.
byte[] data = md5Hash.ComputeHash(Encoding.UTF8.GetBytes(input));
// Create a new Stringbuilder to collect the bytes and create a string.
StringBuilder sBuilder = new StringBuilder();
// Loop through each byte of the hashed data and format each one as a hexadecimal string.
for (int i = 0; i < data.Length; i++)
{
sBuilder.Append(data[i].ToString("x2"));
}
// Return the hexadecimal string.
return sBuilder.ToString();
}
/// <summary>
/// Generates a random string with a given size
/// </summary>
/// <param name="size"></param>
/// <param name="lowerCase"></param>
/// <returns></returns>
public static string RandomString(int size, bool lowerCase = false)
{
var builder = new StringBuilder(size);
// Unicode/ASCII Letters are divided into two blocks (Letters 6590 / 97122): The first
// group containing the uppercase letters and the second group containing the lowercase.
// char is a single Unicode character
char offset = lowerCase ? 'a' : 'A';
const int lettersOffset = 26; // A...Z or a..z: length=26
for (var i = 0; i < size; i++)
{
var @char = (char)_random.Next(offset, offset + lettersOffset);
builder.Append(@char);
}
return lowerCase ? builder.ToString().ToLower() : builder.ToString();
}
/// <summary>
/// Verify a hash against a string.
/// </summary>
/// <param name="md5Hash"></param>
/// <param name="input"></param>
/// <param name="hash"></param>
/// <returns></returns>
public static bool VerifyMd5Hash(MD5 md5Hash, string input, string hash)
{
// Hash the input.
string hashOfInput = GetMd5Hash(md5Hash, input);
// Create a StringComparer an compare the hashes.
StringComparer comparer = StringComparer.OrdinalIgnoreCase;
if (0 == comparer.Compare(hashOfInput, hash))
{
return true;
}
else
{
return false;
}
}
#endregion Public Methods
#region Private Fields
private static readonly Random _random = new Random();
#endregion Private Fields
}
}
+18
View File
@@ -0,0 +1,18 @@
<div class="toast-container p-3 @cssPosition">
<div class="toast bg-light fade @toastCss" id="LiveToast" role="alert" aria-live="assertive" aria-atomic="true">
<div class="toast-header">
<span class="bg-primary px-2 text-light rounded me-2"><i class="fa-solid fa-clock"></i></span>
<strong class="me-auto">@TitleSx</strong>
<small>@TitleDx</small>
<button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close" @onclick="() => doClose()"></button>
</div>
<div class="toast-body">
@if (@ChildContent != null)
{
<div>
@ChildContent
</div>
}
</div>
</div>
</div>
+119
View File
@@ -0,0 +1,119 @@
using Microsoft.AspNetCore.Components;
namespace GPW.CORE.Comp
{
/// <summary>
/// Gestione display Toast con Bootstrap 5+
///
/// https://getbootstrap.com/docs/5.2/components/toasts/
/// </summary>
public partial class ToastDisplay
{
#region Public Enums
public enum DispPosition
{
none = 0,
topLeft,
topCenter,
topRight,
midLeft,
midCenter,
midRight,
bottomLeft,
bottomCenter,
bottomRight
}
#endregion Public Enums
#region Public Properties
[Parameter]
public RenderFragment? ChildContent { get; set; }
[Parameter]
public DispPosition currPosition { get; set; } = DispPosition.none;
[Parameter]
public bool DoShow { get; set; } = false;
[Parameter]
public EventCallback<bool> ReportClose { get; set; }
[Parameter]
public string TitleDx { get; set; } = "";
[Parameter]
public string TitleSx { get; set; } = "";
#endregion Public Properties
#region Protected Methods
protected async Task doClose()
{
await ReportClose.InvokeAsync(true);
}
#endregion Protected Methods
#region Private Properties
private string cssPosition
{
get
{
string answ = "";
switch (currPosition)
{
case DispPosition.topLeft:
answ = "top-0 start-0";
break;
case DispPosition.topCenter:
answ = "top-0 start-50 translate-middle-x";
break;
case DispPosition.topRight:
answ = "top-0 end-0";
break;
case DispPosition.midLeft:
answ = "top-50 start-0 translate-middle-y";
break;
case DispPosition.midCenter:
answ = "top-50 start-50 translate-middle";
break;
case DispPosition.midRight:
answ = "top-50 end-0 translate-middle-y";
break;
case DispPosition.bottomLeft:
answ = "bottom-0 start-0";
break;
case DispPosition.bottomCenter:
answ = "bottom-0 start-50 translate-middle-x";
break;
case DispPosition.bottomRight:
answ = "bottom-0 end-0";
break;
case DispPosition.none:
default:
break;
}
return answ;
}
}
private string toastCss { get => DoShow ? "show" : ""; }
#endregion Private Properties
}
}
+9
View File
@@ -0,0 +1,9 @@
<div class="input-group input-group-sm">
<div class="input-group-text py-0 @placardCss">
<span class="me-1 @leftStringCSS">@leftString</span>
<div class="form-check form-check-sm form-switch py-1" title="@toolTip">
<input class="form-check-input" type="checkbox" name="setupAlarms" checked @onclick="() => toggle()">
</div>
<span class="@rightStringCSS">@rightString</span>
</div>
</div>
+244
View File
@@ -0,0 +1,244 @@
using Microsoft.AspNetCore.Components;
namespace GPW.CORE.Comp
{
public partial class Toggler
{
#region Public Properties
[Parameter]
public EventCallback<SelectGlobalToggle> FilterChanged { get; set; }
[Parameter]
public SelectGlobalToggle SelFilter { get; set; } = new SelectGlobalToggle();
#endregion Public Properties
#region Public Classes
/// <summary>
/// Classe utility x toggle
/// </summary>
public class SelectGlobalToggle
{
#region Public Constructors
public SelectGlobalToggle()
{ }
#endregion Public Constructors
#region Public Properties
/// <summary>
/// Bool: indica se il toggleClosed attivo
/// </summary>
public bool isActive { get; set; } = true;
/// <summary>
/// string: stringa da mostrare a sinistra (disattivo onInitialize)
/// </summary>
public string leftString { get; set; } = "";
/// <summary>
/// string: stile stringa da mostrare a sinistra (disattivo onInitialize)
/// </summary>
public string leftStringCSS { get; set; } = "";
/// <summary>
/// CSS specifico x placard
/// </summary>
public string placardCss { get; set; } = "";
/// <summary>
/// string: stringa da mostrare a destra (attivo onInitialize)
/// </summary>
public string rightString { get; set; } = "";
/// <summary>
/// string: stile stringa da mostrare a destra (attivo onInitialize)
/// </summary>
public string rightStringCSS { get; set; } = "";
/// <summary>
/// Parametro da mostrare in tooltip
/// </summary>
public string toolTip { get; set; } = "";
#endregion Public Properties
#region Public Methods
public override bool Equals(object? obj)
{
if (!(obj is SelectGlobalToggle item))
return false;
if (isActive != item.isActive)
return false;
if (leftString != item.leftString)
return false;
if (rightString != item.rightString)
return false;
if (leftStringCSS != item.leftStringCSS)
return false;
if (rightStringCSS != item.rightStringCSS)
return false;
if (toolTip != item.toolTip)
return false;
if (placardCss != item.placardCss)
return false;
return true;
}
public override int GetHashCode()
{
return base.GetHashCode();
}
#endregion Public Methods
}
#endregion Public Classes
#region Protected Properties
protected bool isActive
{
get => SelFilter.isActive;
set
{
SelFilter.isActive = value;
reportChange();
}
}
protected string leftString
{
get => SelFilter.leftString;
set
{
if (SelFilter.leftString != value)
{
SelFilter.leftString = value;
}
}
}
protected string leftStringCSS
{
get => SelFilter.leftStringCSS;
set
{
if (SelFilter.leftStringCSS != value)
{
SelFilter.leftStringCSS = value;
reportChange();
}
}
}
protected string placardCss
{
get => SelFilter.placardCss;
set
{
if (SelFilter.placardCss != value)
{
SelFilter.placardCss = value;
}
}
}
protected string rightString
{
get => SelFilter.rightString;
set
{
if (SelFilter.rightString != value)
{
SelFilter.rightString = value;
reportChange();
}
}
}
protected string rightStringCSS
{
get => SelFilter.rightStringCSS;
set
{
if (SelFilter.rightStringCSS != value)
{
SelFilter.rightStringCSS = value;
}
}
}
protected string toolTip
{
get => SelFilter.toolTip;
set
{
if (SelFilter.toolTip != value)
{
SelFilter.toolTip = value;
}
}
}
#endregion Protected Properties
#region Protected Methods
protected override async Task OnInitializedAsync()
{
if (isActive)
{
rightStringCSS = "fw-bold";
leftStringCSS = "text-secondary";
}
else
{
leftStringCSS = "fw-bold";
rightStringCSS = "text-secondary";
}
await Task.Delay(1);
}
protected void toggle()
{
var currFilt = SelFilter;
currFilt.isActive = !currFilt.isActive;
SelFilter = currFilt;
if (isActive)
{
rightStringCSS = "fw-bold";
leftStringCSS = "text-secondary";
}
else
{
leftStringCSS = "fw-bold";
rightStringCSS = "text-secondary";
}
}
#endregion Protected Methods
#region Private Methods
private void reportChange()
{
FilterChanged.InvokeAsync(SelFilter);
}
#endregion Private Methods
}
}
+1
View File
@@ -0,0 +1 @@
@using Microsoft.AspNetCore.Components.Web
@@ -1,4 +1,4 @@
namespace GPW.CORE.WRKLOG
namespace GPW.CORE.Comp
{
public class chartJsData
{
+26
View File
@@ -0,0 +1,26 @@
[
{
"outputFile": "CircleGauge.razor.css",
"inputFile": "CircleGauge.razor.less"
},
{
"outputFile": "CmpTop.razor.css",
"inputFile": "CmpTop.razor.less"
},
{
"outputFile": "NavBottom.razor.css",
"inputFile": "NavBottom.razor.less"
},
{
"outputFile": "CalendarMonth.razor.css",
"inputFile": "CalendarMonth.razor.less"
},
{
"outputFile": "CalendarWeek.razor.css",
"inputFile": "CalendarWeek.razor.less"
},
{
"outputFile": "CalWeekColumn.razor.css",
"inputFile": "CalWeekColumn.razor.less"
}
]
@@ -0,0 +1,71 @@
{
"compilers": {
"less": {
"autoPrefix": "",
"cssComb": "none",
"ieCompat": true,
"math": null,
"strictMath": false,
"strictUnits": false,
"relativeUrls": true,
"rootPath": "",
"sourceMapRoot": "",
"sourceMapBasePath": "",
"sourceMap": false
},
"sass": {
"autoPrefix": "",
"loadPaths": "",
"style": "expanded",
"relativeUrls": true,
"sourceMap": false
},
"nodesass": {
"autoPrefix": "",
"includePath": "",
"indentType": "space",
"indentWidth": 2,
"outputStyle": "nested",
"precision": 5,
"relativeUrls": true,
"sourceMapRoot": "",
"lineFeed": "",
"sourceMap": false
},
"stylus": {
"sourceMap": false
},
"babel": {
"sourceMap": false
},
"coffeescript": {
"bare": false,
"runtimeMode": "node",
"sourceMap": false
},
"handlebars": {
"root": "",
"noBOM": false,
"name": "",
"namespace": "",
"knownHelpersOnly": false,
"forcePartial": false,
"knownHelpers": [],
"commonjs": "",
"amd": false,
"sourceMap": false
}
},
"minifiers": {
"css": {
"enabled": true,
"termSemicolons": true,
"gzip": false
},
"javascript": {
"enabled": true,
"termSemicolons": true,
"gzip": false
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 378 B

@@ -0,0 +1,6 @@
// This is a JavaScript module that is loaded on demand. It can export any number of
// functions, and may import other JavaScript modules if required.
export function showPrompt(message) {
return prompt(message, 'Type anything here');
}
+18
View File
@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace GPW.CORE.Data
{
public class Const
{
#region Public Fields
public const string rPipeChRich = $"Channel_Rich";
public const string rPipeChTimb = $"Channel_Timb";
#endregion Public Fields
}
}
File diff suppressed because it is too large Load Diff
+60 -10
View File
@@ -16,11 +16,15 @@ namespace GPW.CORE.Data.DTO
public int IdxDipendente { get; set; } = 0;
public DateTime DtRif { get; set; } = DateTime.Today;
public List<RegAttivitaModel>? ListRA { get; set; }
public List<TimbratureModel>? ListTimbr { get; set; }
public TimbratureExplModel? TimbrExpl { get; set; }
public List<RilievoTempModel>? ListRilTemp { get; set; }
public List<CheckVc19Model>? ListCheckC19 { get; set; }
public List<RegAttivitaModel>? ListRA { get; set; } = null;
public List<TimbratureModel>? ListTimbr { get; set; } = null;
public TimbratureExplModel? TimbrExpl { get; set; } = null;
public List<RilievoTempModel>? ListRilTemp { get; set; } = null;
public List<CheckVc19Model>? ListCheckC19 { get; set; } = null;
public List<CalFesteFerieModel>? ListFermateAzienda { get; set; } = null;
public List<RegMalattieModel>? ListMalattie { get; set; } = null;
public List<RegRichiesteModel>? ListFerieDip { get; set; } = null;
public List<RegRichiesteModel>? ListRichiesteDip { get; set; } = null;
public DateTime DtInizio
{
@@ -39,20 +43,22 @@ namespace GPW.CORE.Data.DTO
}
}
public double OreLav
public double OreComm
{
get
{
double answ = 0;
if (ListRA != null && ListRA.Count > 0)
{
answ = ListRA
.Sum(x => x.OreTot == null ? 0 : (double)x.OreTot);
answ = (double)ListRA.Sum(x => x.OreTot ?? 0);
}
// fix arrotondamento ai 5 minuti straight
TimeSpan tSpan = Utils.TSpanRounded(TimeSpan.FromHours(answ), 5);
answ = tSpan.TotalHours;
return answ;
}
}
public double OreComm
public double OreLav
{
get
{
@@ -60,12 +66,56 @@ namespace GPW.CORE.Data.DTO
if (TimbrExpl != null && TimbrExpl.HLav != null)
{
answ = (double)TimbrExpl.HLav;
if (DtRif == DateTime.Today)
{
if (ListTimbr != null)
{
// aggiungo ultima timb fino ad adesso...
var lastIn = ListTimbr.Where(x => x.Entrata == true).OrderByDescending(x => x.DataOra).FirstOrDefault();
var lastOut = ListTimbr.Where(x => x.Entrata == false).OrderByDescending(x => x.DataOra).FirstOrDefault();
// se MANCA timb uscita finale...
if (lastIn != null)
{
if (lastOut == null || lastOut.DataOra < lastIn.DataOra)
{
DateTime adesso = DateTime.Now;
answ += adesso.Subtract(lastIn.DataOra).TotalHours;
}
}
}
}
}
// fix arrotondamento ai 5 minuti x difetto
TimeSpan tSpan = Utils.TSpanRounded(TimeSpan.FromHours(answ), 5, true);
answ = tSpan.TotalHours;
return answ;
}
}
public int MinComm
{
get => (int)Math.Round(OreComm * 60);
}
public int MinLav
{
get => (int)Math.Round(OreLav * 60);
}
public string OreMinLav
{
get
{
TimeSpan durTs = TimeSpan.FromHours(OreLav);
return $"{durTs.Hours}:{durTs.Minutes:00}";
}
}
public string OreMinComm
{
get
{
TimeSpan durTs = TimeSpan.FromHours(OreComm);
return $"{durTs.Hours}:{durTs.Minutes:00}";
}
}
}
}
+180
View File
@@ -0,0 +1,180 @@
using EgwCoreLib.Utils;
using GPW.CORE.Data.DbModels;
using Microsoft.EntityFrameworkCore.ChangeTracking;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Net.WebSockets;
using System.Text;
using System.Threading.Tasks;
namespace GPW.CORE.Data.DTO
{
// <Auto-Generated>
// This is here so CodeMaid doesn't reorganize this document
// </Auto-Generated>
public class ReportDataDTO
{
public int IdxDipendente { get; set; } = 0;
public DtUtils.Periodo Periodo { get; set; } = new DtUtils.Periodo();
public List<RegAttivitaModel>? ListRA { get; set; } = null;
public List<TimbratureModel>? ListTimbr { get; set; } = null;
public List<TimbratureExplModel>? TimbrExpl { get; set; } = null;
public List<ProjData> ProjTotal { get; set; } = new List<ProjData>();
public void DoCalc()
{
// totalizzazione ore
OreComm = OreCommCalc;
OreLav = OreLavCalc;
// calcolo totali x progetto...
int idxProj = 0;
string gruppo = "";
string cliente = "";
string nomeProj = "";
string descProj = "";
decimal durItem = 0;
foreach (var recRA in ListRA)
{
idxProj = recRA.FasiNav.ProgettoNav.IdxProgetto;
gruppo = recRA.FasiNav.ProgettoNav.Gruppo;
cliente = recRA.FasiNav.ProgettoNav.ClienteNav?.RagSociale ?? $"{recRA.FasiNav.ProgettoNav.IdxCliente}";
nomeProj = recRA.FasiNav.ProgettoNav.NomeProj;
descProj = recRA.FasiNav.ProgettoNav.DescrProj;
durItem = recRA.OreTot ?? 0;
// cerco proj...
var currProj = ProjTotal.FirstOrDefault(x => x.idxProj == idxProj);
if (currProj != null)
{
currProj.TotOre += durItem;
}
else
{
ProjData newProj = new ProjData()
{
NomeProj = nomeProj,
TotOre = durItem,
idxProj = idxProj,
DescProj = descProj,
Gruppo = gruppo,
Cliente = cliente
};
ProjTotal.Add(newProj);
}
}
}
public double OreComm { get; set; } = 0;
public double OreLav { get; set; } = 0;
public double OreCommCalc
{
get
{
double answ = 0;
if (ListRA != null && ListRA.Count > 0)
{
answ = (double)ListRA.Sum(x => x.OreTot ?? 0);
}
// fix arrotondamento ai 5 minuti straight
TimeSpan tSpan = Utils.TSpanRounded(TimeSpan.FromHours(answ), 5);
answ = tSpan.TotalHours;
return answ;
}
}
public double OreLavCalc
{
get
{
double answ = 0;
if (TimbrExpl != null && TimbrExpl.Count > 0)
{
answ = (double)TimbrExpl.Sum(x => x.HLav ?? 0);
if (Periodo.Fine == DateTime.Today)
{
if (ListTimbr != null)
{
// aggiungo ultima timb fino ad adesso...
var lastIn = ListTimbr.Where(x => x.Entrata == true).OrderByDescending(x => x.DataOra).FirstOrDefault();
var lastOut = ListTimbr.Where(x => x.Entrata == false).OrderByDescending(x => x.DataOra).FirstOrDefault();
// se MANCA timb uscita finale...
if (lastIn != null)
{
if (lastOut == null || lastOut.DataOra < lastIn.DataOra)
{
DateTime adesso = DateTime.Now;
answ += adesso.Subtract(lastIn.DataOra).TotalHours;
}
}
}
}
}
// fix arrotondamento ai 5 minuti x difetto
TimeSpan tSpan = Utils.TSpanRounded(TimeSpan.FromHours(answ), 5, true);
answ = tSpan.TotalHours;
return answ;
}
}
public int MinComm
{
get => (int)Math.Round(OreComm * 60);
}
public int MinLav
{
get => (int)Math.Round(OreLav * 60);
}
public string OreMinLav
{
get
{
TimeSpan durTs = TimeSpan.FromHours(OreLav);
return $"{durTs.Hours}:{durTs.Minutes:00}";
}
}
public string GiorniOreMinLav
{
get
{
TimeSpan durTs = TimeSpan.FromHours(OreLav);
return $"{durTs.Days}gg {durTs.Hours}:{durTs.Minutes:00}";
}
}
public string GiorniOreMinComm
{
get
{
TimeSpan durTs = TimeSpan.FromHours(OreComm);
return $"{durTs.Hours}:{durTs.Minutes:00}";
}
}
public string OreMinComm
{
get
{
TimeSpan durTs = TimeSpan.FromHours(OreComm);
return $"{durTs.Days}gg {durTs.Hours}:{durTs.Minutes:00}";
}
}
public class ProjData
{
public int idxProj { get; set; } = 0;
public string Gruppo { get; set; } = "";
public string Cliente { get; set; } = "";
public string NomeProj { get; set; } = "";
public string DescProj { get; set; } = "";
public decimal TotOre { get; set; } = 0;
}
}
}
@@ -11,11 +11,6 @@ namespace GPW.CORE.Data.DbModels
[Table("AnagClienti")]
public partial class AnagClientiModel
{
public AnagClientiModel()
{
ProgettiNav = new HashSet<AnagProgettiModel>();
}
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int IdxCliente { get; set; }
public string? RagSociale { get; set; } = "";
@@ -36,7 +31,5 @@ namespace GPW.CORE.Data.DbModels
/// codice esterno
/// </summary>
public string? CodExt { get; set; } = "";
public virtual ICollection<AnagProgettiModel> ProgettiNav { get; set; }
}
}
+25
View File
@@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace GPW.CORE.Data.DbModels
{
// <Auto-Generated>
// This is here so CodeMaid doesn't reorganize this document
// </Auto-Generated>
[Table("AnagDevices")]
public partial class AnagDeviceModel
{
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int IdxDevice { get; set; }
public string DeviceSecret { get; set; } = null!;
public int IdxDipendente { get; set; }
public string DeviceName { get; set; } = null!;
public string Description { get; set; } = null!;
public DateTime DataOraEnabled { get; set; }
public DateTime DataOraLastSeen { get; set; }
public string LastIpv4 { get; set; } = null!;
public string ScreenSize { get; set; } = null!;
}
}
+20
View File
@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace GPW.CORE.Data.DbModels
{
// <Auto-Generated>
// This is here so CodeMaid doesn't reorganize this document
// </Auto-Generated>
[Table("AnagGiust")]
public partial class AnagGiustModel
{
[Key]
public string codGiust { get; set; } = null!;
public string descrizione { get; set; } = "";
public bool userSelectable { get; set; } = false;
public bool showReq { get; set; } = false;
}
}
@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace GPW.CORE.Data.DbModels
{
// <Auto-Generated>
// This is here so CodeMaid doesn't reorganize this document
// </Auto-Generated>
[Table("CalendFesteFerie")]
public partial class CalFesteFerieModel
{
[Key]
public DateTime data { get; set; }
public string codGiust { get; set; } = "";
public string descrizione { get; set; } = "";
}
}
+20
View File
@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace GPW.CORE.Data.DbModels
{
// <Auto-Generated>
// This is here so CodeMaid doesn't reorganize this document
// </Auto-Generated>
[Table("Config")]
public partial class ConfigModel
{
[Key]
public string chiave { get; set; } = null!;
public string valore { get; set; } = "";
public string valoreStd { get; set; } = "";
public string note { get; set; } = "";
}
}
@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace GPW.CORE.Data.DbModels
{
public partial class DipendendiAndAnomalie
{
[Key]
public int IdxDipendente { get; set; }
public string CognomeNome { get; set; } = "";
public string email { get; set; } = "";
}
}
@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
namespace GPW.CORE.Data.DbModels
{
// <Auto-Generated>
// This is here so CodeMaid doesn't reorganize this document
// </Auto-Generated>
[Table("Dipendenti2Ruoli")]
public partial class Dipendenti2RuoliModel
{
public int IdxDipendente { get; set; }
public string CodRuolo { get; set; } = "";
/// <summary>
/// Navigation property to Dipendente
/// </summary>
[ForeignKey("IdxDipendente")]
public virtual DipendentiModel DipNav { get; set; } = null!;
}
}
@@ -51,6 +51,8 @@ namespace GPW.CORE.Data.DbModels
public DateTime? DataAssunzione { get; set; }
public DateTime? DataCessazione { get; set; }
public bool? Attivo { get; set; }
public string Sigla { get; set; } = "";
public int idxResp { get; set; } = 0;
public virtual ICollection<RegAttivitaModel> RegAttivitaNav { get; set; }
public virtual ICollection<RilievoTempModel> RilievoTempNav { get; set; }
+1 -1
View File
@@ -33,7 +33,7 @@ namespace GPW.CORE.Data.DbModels
{
try
{
valore = Utils.TSpanRounded(TimeSpan.FromHours((double)OreTot), 5, true);
valore = Utils.TSpanRounded(TimeSpan.FromHours((double)OreTot), 5, false);
}
catch
{ }
@@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace GPW.CORE.Data.DbModels
{
// <Auto-Generated>
// This is here so CodeMaid doesn't reorganize this document
// </Auto-Generated>
[Table("RegistroMalattie")]
public partial class RegMalattieModel
{
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int IdxRegMal { get; set; }
public int IdxDipendente { get; set; }
public DateTime DtInizio { get; set; } = DateTime.Today;
public int NumGG { get; set; } = 1;
public string CodCert { get; set; } = "";
public bool Conf { get; set; } = false;
/// <summary>
/// Navigation property to Dipendente
/// </summary>
[ForeignKey("IdxDipendente")]
public virtual DipendentiModel DipNav { get; set; } = null!;
}
}
@@ -0,0 +1,54 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace GPW.CORE.Data.DbModels
{
// <Auto-Generated>
// This is here so CodeMaid doesn't reorganize this document
// </Auto-Generated>
[Table("RegistroRichieste")]
public partial class RegRichiesteModel
{
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int IdxRegRich { get; set; }
public int IdxDipendente { get; set; }
public string CodGiust { get; set; } = "";
public DateTime DtStart { get; set; } = DateTime.Today.AddHours(9);
public DateTime DtEnd { get; set; } = DateTime.Today.AddHours(17);
public string Note { get; set; } = "";
public bool Conf { get; set; } = false;
[NotMapped]
public string CodGiustTrim
{
get => CodGiust.Length <= 3 ? CodGiust : CodGiust.Substring(0, 3);
}
[NotMapped]
public string Durata
{
get
{
string answ = "-";
var durata = DtEnd.Subtract(DtStart);
if (CodGiust == "FER")
{
answ = $"{durata.TotalDays + 1:N0}gg";
}
else
{
answ = $"{durata.TotalHours:N1}h";
}
return answ;
}
}
/// <summary>
/// Navigation property to Dipendente
/// </summary>
[ForeignKey("IdxDipendente")]
public virtual DipendentiModel? DipNav { get; set; }
}
}
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
namespace GPW.CORE.Data.DbModels
{
// <Auto-Generated>
// This is here so CodeMaid doesn't reorganize this document
// </Auto-Generated>
[Table("RegistroEventi")]
public partial class RegistroEventiModel
{
public DateTime DataOra { get; set; }
public string Evento { get; set; } = null!;
public string? Commento { get; set; } = "";
}
}
@@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace GPW.CORE.Data.DbModels
{
// <Auto-Generated>
// This is here so CodeMaid doesn't reorganize this document
// </Auto-Generated>
public partial class StatsDayPresModel
{
[Key]
public int IdxDipendente { get; set; }
public DateTime LastOp { get; set; }
public int NEnt { get; set; } = 0;
public int NUsc { get; set; } = 0;
public int IsPresent { get; set; } = 0;
#if false
/// <summary>
/// Navigation property to Dipendente
/// </summary>
[ForeignKey("IdxDipendente")]
public virtual DipendentiModel DipNav { get; set; } = null!;
#endif
}
}
+49
View File
@@ -0,0 +1,49 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
namespace GPW.CORE.Data.DbModels
{
public partial class TeRaExplModel
{
public DateTime DataLav { get; set; }
public int IdxDipendente { get; set; }
public string CognomeNome { get; set; } = "";
public double h_lav { get; set; } = 0;
public double h_giust { get; set; } = 0;
public decimal h_com { get; set; } = 0;
public string progetti { get; set; } = "";
public int okLAvCom { get; set; } = 0;
public bool isOkTim { get; set; } = false;
public bool isOkApp { get; set; } = false;
public int isOkLav { get; set; } = 0;
public int isOk { get; set; } = 0;
public bool block { get; set; } = false;
public int minOrd { get; set; } = 0;
public int minNonLav { get; set; } = 0;
public int minStra { get; set; } = 0;
public int minPerm { get; set; } = 0;
public int minFer { get; set; } = 0;
public int minMal { get; set; } = 0;
public int minFest { get; set; } = 0;
public int minRegAtt { get; set; } = 0;
public DateTime? entrata_1 { get; set; }
public DateTime? uscita_1 { get; set; }
public DateTime? entrata_2 { get; set; }
public DateTime? uscita_2 { get; set; }
public DateTime? entrata_3 { get; set; }
public DateTime? uscita_3 { get; set; }
public DateTime? entrata_4 { get; set; }
public DateTime? uscita_4 { get; set; }
public int minArcoPres { get; set; } = 0;
public string chkFunCod { get; set; } = "";
public string chkFunRes { get; set; } = "";
public int minMpp { get; set; } = 0;
public int minCassa { get; set; } = 0;
public int min104 { get; set; } = 0;
public decimal TempRil { get; set; } = 0;
public bool TagIsActive { get; set; } = false;
public string CodTag { get; set; } = "";
}
}
+18 -18
View File
@@ -11,22 +11,22 @@ namespace GPW.CORE.Data
ND = 0,
Lavoro = 1
}
public enum TestUser
{
LocatelliSamuele = 1,
SalviMarco = 3,
RottoliGiancarlo = 4,
BaroniMara = 6,
LocatelliMarco = 8,
SassiDario = 10,
SassiEmmanuele = 11,
LanzaRenzo = 12,
MangiaLorenzo = 13,
PerdoncinSara = 14,
PievaniNicola = 15,
Tarri, Selene = 16,
BaronchelliCarlo = 18,
MonchiFilippo = 19,
VivianiCarlo = 20
}
//public enum TestUser
//{
// LocatelliSamuele = 1,
// SalviMarco = 3,
// RottoliGiancarlo = 4,
// BaroniMara = 6,
// LocatelliMarco = 8,
// SassiDario = 10,
// SassiEmmanuele = 11,
// LanzaRenzo = 12,
// MangiaLorenzo = 13,
// PerdoncinSara = 14,
// PievaniNicola = 15,
// Tarri, Selene = 16,
// BaronchelliCarlo = 18,
// MonchiFilippo = 19,
// VivianiCarlo = 20
//}
}
@@ -0,0 +1,25 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="EgwCoreLib.Utils" Version="1.5.2402.2411" />
<PackageReference Include="MailKit" Version="3.5.0" />
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="6.0.14" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.14" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="6.0.14" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.14" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.14">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="NLog" Version="5.2.2" />
<PackageReference Include="StackExchange.Redis" Version="2.7.27" />
</ItemGroup>
</Project>
+10 -8
View File
@@ -7,17 +7,19 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MailKit" Version="3.3.0" />
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="6.0.7" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.7" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="6.0.7" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.7" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.7">
<PackageReference Include="EgwCoreLib.Utils" Version="1.5.2402.2411" />
<PackageReference Include="MailKit" Version="3.5.0" />
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="6.0.14" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.14" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="6.0.14" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.14" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.14">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="NLog" Version="5.0.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="NLog" Version="5.2.2" />
<PackageReference Include="StackExchange.Redis" Version="2.7.27" />
</ItemGroup>
</Project>
+120 -2
View File
@@ -55,6 +55,17 @@ namespace GPW.CORE.Data
public virtual DbSet<AnagKeyValueModel> DbSetAnagKeyValue { get; set; } = null!;
public virtual DbSet<AnagTipoTimbModel> DbSetAnagTipoTimb { get; set; } = null!;
public virtual DbSet<Dipendenti2GruppiModel> DbSetDipendenti2Gruppi { get; set; } = null!;
public virtual DbSet<CalFesteFerieModel> DbSetCalFesteFerie { get; set; } = null!;
public virtual DbSet<RegMalattieModel> DbSetRegMalattie { get; set; } = null!;
public virtual DbSet<RegRichiesteModel> DbSetRegRichieste { get; set; } = null!;
public virtual DbSet<ConfigModel> DbSetConfig { get; set; } = null!;
public virtual DbSet<AnagGiustModel> DbSetAnagGiust { get; set; } = null!;
public virtual DbSet<AnagDeviceModel> DbSetAnagDevices { get; set; } = null!;
public virtual DbSet<Dipendenti2RuoliModel> DbSetDip2Ruoli { get; set; } = null!;
public virtual DbSet<RegistroEventiModel> DbSetRegEventi { get; set; } = null!;
public virtual DbSet<DipendendiAndAnomalie> DbSetDipAndAnom { get; set; } = null!;
public virtual DbSet<TeRaExplModel> DbSetTeRaExpl { get; set; } = null!;
public virtual DbSet<StatsDayPresModel> DbSetStatsDayPres { get; set; } = null!;
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
@@ -67,8 +78,7 @@ namespace GPW.CORE.Data
}
else
{
optionsBuilder.UseSqlServer("Server=SQL2016DEV;Database=Sauder_NKC;Trusted_Connection=True;");
optionsBuilder.UseSqlServer("Server=SQLSTEAM;Database=GPW;Trusted_Connection=True;");
optionsBuilder.UseSqlServer("Server=SQLSTEAM;Database=GPW;Trusted_Connection=True;");
}
}
}
@@ -233,6 +243,9 @@ namespace GPW.CORE.Data
entity.Property(e => e.WolMac)
.HasMaxLength(50)
.HasColumnName("WOL_MAC");
entity.Property(e => e.Sigla)
.HasMaxLength(50)
.HasColumnName("sigla");
});
modelBuilder.Entity<RegAttivitaModel>(entity =>
@@ -772,6 +785,111 @@ namespace GPW.CORE.Data
.HasColumnName("oraFine_3");
});
modelBuilder.Entity<CalFesteFerieModel>(entity =>
{
entity.Property(e => e.codGiust)
.HasMaxLength(5);
entity.Property(e => e.descrizione)
.HasMaxLength(50);
});
modelBuilder.Entity<RegMalattieModel>(entity =>
{
entity.Property(e => e.CodCert)
.HasMaxLength(250);
});
modelBuilder.Entity<RegRichiesteModel>(entity =>
{
entity.Property(e => e.CodGiust)
.HasMaxLength(5);
});
modelBuilder.Entity<ConfigModel>(entity =>
{
entity.Property(e => e.chiave)
.HasMaxLength(250);
entity.Property(e => e.valore)
.HasMaxLength(250);
entity.Property(e => e.valoreStd)
.HasMaxLength(250);
entity.Property(e => e.note)
.HasMaxLength(250);
});
modelBuilder.Entity<AnagGiustModel>(entity =>
{
entity.Property(e => e.codGiust)
.HasMaxLength(5);
entity.Property(e => e.descrizione)
.HasMaxLength(50);
});
modelBuilder.Entity<AnagDeviceModel>(entity =>
{
entity.HasKey(e => e.IdxDevice);
entity.Property(e => e.DataOraEnabled)
.HasColumnType("datetime")
.HasColumnName("dataOraEnabled");
entity.Property(e => e.DataOraLastSeen)
.HasColumnType("datetime")
.HasColumnName("dataOraLastSeen");
entity.Property(e => e.Description)
.HasMaxLength(500)
.HasDefaultValueSql("('')");
entity.Property(e => e.DeviceName).HasMaxLength(50);
entity.Property(e => e.DeviceSecret).HasMaxLength(500);
entity.Property(e => e.IdxDipendente).HasColumnName("idxDipendente");
entity.Property(e => e.LastIpv4)
.HasMaxLength(15)
.HasColumnName("lastIPv4")
.HasDefaultValueSql("('')");
entity.Property(e => e.ScreenSize)
.HasMaxLength(50)
.HasColumnName("screenSize")
.HasDefaultValueSql("('')");
});
modelBuilder.Entity<Dipendenti2RuoliModel>(entity =>
{
entity.HasKey(e => new { e.IdxDipendente, e.CodRuolo })
.HasName("PK_Dipendenti2Ruoli");
entity.Property(e => e.CodRuolo)
.HasMaxLength(50);
});
modelBuilder.Entity<RegistroEventiModel>(entity =>
{
entity.HasKey(e => new { e.DataOra, e.Evento });
entity.ToTable("RegistroEventi");
entity.Property(e => e.DataOra).HasColumnType("datetime");
entity.Property(e => e.Evento)
.HasMaxLength(50)
.HasColumnName("evento");
entity.Property(e => e.Commento)
.HasMaxLength(250)
.HasColumnName("commento");
});
modelBuilder.Entity<TeRaExplModel>(entity =>
{
entity.HasKey(e => new { e.DataLav, e.IdxDipendente});
});
OnModelCreatingPartial(modelBuilder);
}
+5 -3
View File
@@ -30,8 +30,9 @@ namespace GPW.CORE.Data
#region Public Methods
public Task Execute(string to, string subject, string message)
public async Task<bool> Execute(string to, string subject, string message)
{
bool fatto = false;
// create message
var email = new MimeMessage();
email.Sender = MailboxAddress.Parse(Options.Sender_EMail);
@@ -47,11 +48,12 @@ namespace GPW.CORE.Data
{
smtp.Connect(Options.Host_Address, Options.Host_Port, Options.Host_SecureSocketOptions);
smtp.Authenticate(Options.Host_Username, Options.Host_Password);
smtp.Send(email);
await smtp.SendAsync(email);
smtp.Disconnect(true);
fatto = true;
}
return Task.FromResult(true);
return fatto;
}
public Task SendEmailAsync(string email, string subject, string message)
+158
View File
@@ -0,0 +1,158 @@
using Microsoft.EntityFrameworkCore.Storage;
using NLog;
using StackExchange.Redis;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace GPW.CORE.Data
{
public class MessagePipe
{
#region Public Constructors
public MessagePipe(IConnectionMultiplexer redisConn, string channelName, bool enableLog = false)
{
_channel = channelName;
redis = redisConn;
redisDb = redis.GetDatabase();
this.enableLog = enableLog;
// aggiungo sottoscrittore
setupSubscriber();
}
#endregion Public Constructors
#region Public Events
public event EventHandler EA_NewMessage = delegate { };
#endregion Public Events
#region Public Methods
/// <summary>
/// Invio messaggio sul canale + salvataggio in cache REDIS
/// </summary>
/// <param name="memKey">Chiave REDIS x salvare valore</param>
/// <param name="message">Messaggio serializzato da inviare</param>
public bool saveAndSendMessage(string memKey, string message)
{
bool answ = false;
Stopwatch stopWatch = new Stopwatch();
stopWatch.Start();
// invio notifica tramite il canale richiesto
answ = sendMessage(message);
if (redisDb != null)
{
redisDb.StringSetAsync(memKey, message);
}
stopWatch.Stop();
TimeSpan ts = stopWatch.Elapsed;
if (numSent.ContainsKey(memKey))
{
numSent[memKey]++;
}
else
{
numSent.Add(memKey, 1);
}
if (enableLog || numSent[memKey] > 30)
{
Log.Info($"saveAndSendMessage| mKey {memKey} x {numSent[memKey]} | {message.Length} size | {ts.TotalMilliseconds} ms");
numSent[memKey] = 0;
}
return answ;
}
/// <summary>
/// Invio messaggio sul canale
/// </summary>
/// <param name="newMess"></param>
/// <returns></returns>
public bool sendMessage(string newMess)
{
bool answ = false;
ISubscriber sub = redis.GetSubscriber();
sub.Publish(_channel, newMess);
return answ;
}
#endregion Public Methods
#region Protected Fields
protected static Logger Log = LogManager.GetCurrentClassLogger();
#endregion Protected Fields
#region Private Fields
private bool enableLog = false;
private Dictionary<string, int> numSent = new Dictionary<string, int>();
private IConnectionMultiplexer redis;
private StackExchange.Redis.IDatabase redisDb;
#endregion Private Fields
#region Private Properties
/// <summary>
/// Canale associato al gestore pipeline messaggi
/// </summary>
private string _channel { get; set; } = "";
#endregion Private Properties
#region Private Methods
private void setupSubscriber()
{
ISubscriber sub = redis.GetSubscriber();
//Subscribe to the channel named messages
sub.Subscribe(_channel, (channel, message) =>
{
if (enableLog)
{
Log.Trace($"req setup ch {channel} | {message}");
}
// messaggio
PubSubEventArgs mea = new PubSubEventArgs(message);
// se qualcuno ascolta sollevo evento nuovo valore...
if (EA_NewMessage != null)
{
EA_NewMessage(this, mea);
}
});
if (enableLog)
{
Log.Info($"Subscribed {_channel}");
}
}
#endregion Private Methods
}
public class PubSubEventArgs : EventArgs
{
#region Public Constructors
public PubSubEventArgs(string messaggio)
{
this.newMessage = messaggio;
}
#endregion Public Constructors
#region Public Properties
public string newMessage { get; set; } = "";
#endregion Public Properties
}
}
+24
View File
@@ -61,6 +61,17 @@ namespace GPW.CORE.Data
return answ;
}
/// <summary>
/// Costruisce una riga ripetendo un carattere molte volte
/// </summary>
/// <param name="padChar"></param>
/// <param name="repNum"></param>
/// <returns></returns>
public static string charLine(char padChar, int repNum)
{
return new string(padChar, repNum);
}
/// <summary>
/// Effettua arrotondamento di un timespan ad un dato step di minuti
///
@@ -79,5 +90,18 @@ namespace GPW.CORE.Data
TimeSpan answ = new TimeSpan(ticks * step.Ticks);
return answ;
}
/// <summary>
/// Inizializzazione con periodo e arrotondamento
/// </summary>
/// <param name="minRound"></param>
/// <returns></returns>
public static DateTime InitDatetime(DateTime dtRif, int minRound)
{
TimeSpan DayElapsed = dtRif.Subtract(dtRif.Date);
int minDay = (int)Math.Ceiling((double)(DayElapsed.TotalMinutes / minRound)) * minRound;
DateTime endRounded = DateTime.Today.AddMinutes(minDay);
return endRounded;
}
}
}
@@ -0,0 +1,25 @@

<div class="progress">
<div class="progress-bar" role="progressbar" aria-label="@CompName" style="width: @CurrPerc;" aria-valuenow="@CurrVal" aria-valuemin="@ValMin" aria-valuemax="@ValMax">@CurrPerc</div>
</div>
@code {
[Parameter]
public double ValMin { get; set; } = 0;
[Parameter]
public double ValMax { get; set; } = 100;
[Parameter]
public double ValCur { get; set; } = 0;
[Parameter]
public string CompName { get; set; } = "";
protected string CurrPerc
{
get => ValMax == 0 ? "0%" : $"{ValCur / ValMax:P0}";
}
protected int CurrVal
{
get => ValMax == 0 ? 0 : (int)(ValCur * 100 / ValMax);
}
}
@@ -0,0 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<NoDefaultLaunchSettingsFile>true</NoDefaultLaunchSettingsFile>
<StaticWebAssetProjectMode>Default</StaticWebAssetProjectMode>
<!--
<GenerateRuntimeConfigDevFile>true</GenerateRuntimeConfigDevFile>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
-->
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.7" />
</ItemGroup>
</Project>
@@ -0,0 +1,63 @@
@page "/clock-display"
@using GPW.CORE.HYB.Client.Components
@using GPW.CORE.HYB.Client.Services
@implements IDisposable
@rendermode InteractiveWebAssembly
@inject PersistentComponentState ApplicationState
@inject ClockService CServ
<h1>Hello, @handler!</h1>
<h3>Clock test</h3>
<ul class="list-group">
<li class="list-group-item">Realtime: @($"{adesso:HH:mm:ss}")</li>
<li class="list-group-item">Last Sync: @($"{lastSync:HH:mm:ss}")</li>
<li class="list-group-item">Delta: @($"{deltaTs.TotalMilliseconds} ms")</li>
<li class="list-group-item">Click: @($"{adesso:HH:mm:ss}")</li>
</ul>
<p>@adesso</p>
@code {
protected string handler = "";
private DateTime adesso
{
get => DateTime.Now;
}
private DateTime lastSync { get; set; } = DateTime.Today;
private DateTime clockDT { get; set; } = DateTime.Today;
private TimeSpan deltaTs { get; set; } = new TimeSpan();
protected override async void OnInitialized()
{
// persistingSubscription = ApplicationState.RegisterOnPersisting(PersistCount);
// if (!ApplicationState.TryTakeFromJson<int>(nameof(currentCount), out var restoredCount))
// {
// currentCount = Random.Shared.Next(50);
// }
// else
// {
// currentCount = restoredCount!;
// }
if (OperatingSystem.IsBrowser())
{
handler = "WASM";
}
else
{
handler = "Server";
}
lastSync = DateTime.Now;
clockDT = await CServ.GetSrvClockAsync();
deltaTs = clockDT.Subtract(DateTime.Now);
}
private PersistingComponentStateSubscription persistingSubscription;
void IDisposable.Dispose() => persistingSubscription.Dispose();
}
@@ -0,0 +1,109 @@
@page "/counter"
@using GPW.CORE.HYB.Client.Components
@implements IDisposable
@rendermode InteractiveAuto
@inject PersistentComponentState ApplicationState
<PageTitle>Counter</PageTitle>
<h1>Counter</h1>
<h1>Hello, @handler!</h1>
<ProgressBar ValMin="0" ValMax="100" ValCur="@currVal"></ProgressBar>
<br />
<ul class="list-group">
<li class="list-group-item">Init: @($"{lastInit:HH:mm:ss}")</li>
<li class="list-group-item">Render: @($"{lastRender:HH:mm:ss}")</li>
<li class="list-group-item">ParamSet: @($"{lastParSet:HH:mm:ss}")</li>
<li class="list-group-item">Click: @($"{adesso:HH:mm:ss}")</li>
</ul>
<br />
@lastInit
<hr />
<p role="status">Current count: @currentCount</p>
<button class="btn btn-primary" @onclick="IncrementCount">Click me</button>
<hr />
<p>@adesso</p>
@code {
private int currentCount = 0;
private PersistingComponentStateSubscription persistingSubscription;
private double currVal = 0;
private async Task IncrementCount()
{
currentCount++;
await AdvProg();
}
private DateTime adesso
{
get => DateTime.Now;
}
private Task PersistCount()
{
ApplicationState.PersistAsJson(nameof(currentCount), currentCount);
return Task.CompletedTask;
}
void IDisposable.Dispose() => persistingSubscription.Dispose();
protected string handler = "";
protected DateTime lastInit = DateTime.Today;
protected DateTime lastRender = DateTime.Today;
protected DateTime lastParSet = DateTime.Today;
protected override void OnInitialized()
{
persistingSubscription = ApplicationState.RegisterOnPersisting(PersistCount);
if (!ApplicationState.TryTakeFromJson<int>(nameof(currentCount), out var restoredCount))
{
currentCount = Random.Shared.Next(50);
}
else
{
currentCount = restoredCount!;
}
if (OperatingSystem.IsBrowser())
{
handler = "WASM";
}
else
{
handler = "Server";
}
lastInit = DateTime.Now;
}
protected override void OnAfterRender(bool firstRender)
{
lastRender = DateTime.Now;
}
protected async Task AdvProg()
{
currVal = 0;
StateHasChanged();
await Task.Delay(100);
for (int i = 0; i < 10; i++)
{
// Simulate asynchronous loading to demonstrate streaming rendering
await Task.Delay(100);
currVal += 10;
StateHasChanged();
}
currVal = 100;
}
protected override void OnParametersSet()
{
lastParSet = DateTime.Now;
}
}
@@ -0,0 +1,9 @@
using GPW.CORE.HYB.Client.Services;
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
var builder = WebAssemblyHostBuilder.CreateDefault(args);
builder.Services.AddScoped<ClockService>();
await builder.Build().RunAsync();
@@ -0,0 +1,19 @@
using System.Net.Http.Json;
namespace GPW.CORE.HYB.Client.Services
{
public class ClockService(HttpClient http) //: IMovieService
{
public async Task<DateTime> GetSrvClockAsync()
{
DateTime answ = DateTime.Today;
var rawData= await http.GetFromJsonAsync<string>("Clock") ?? "";
if (!string.IsNullOrEmpty(rawData))
{
DateTime.TryParse(rawData, out answ);
}
return answ;
}
}
}
@@ -0,0 +1,9 @@
@using System.Net.Http
@using System.Net.Http.Json
@using Microsoft.AspNetCore.Components.Forms
@using Microsoft.AspNetCore.Components.Routing
@using Microsoft.AspNetCore.Components.Web
@using static Microsoft.AspNetCore.Components.Web.RenderMode
@using Microsoft.AspNetCore.Components.Web.Virtualization
@using Microsoft.JSInterop
@using GPW.CORE.HYB.Client
@@ -0,0 +1,8 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
}
}
@@ -0,0 +1,8 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
}
}
+31
View File
@@ -0,0 +1,31 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.10.35122.118
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GPW.CORE.HYB", "GPW.CORE.HYB\GPW.CORE.HYB.csproj", "{7C77D787-A7B1-4A3B-8753-34BF4A56983A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GPW.CORE.HYB.Client", "GPW.CORE.HYB.Client\GPW.CORE.HYB.Client.csproj", "{1FC390C1-D9E5-43CE-923C-78F76A4E7EF8}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{7C77D787-A7B1-4A3B-8753-34BF4A56983A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7C77D787-A7B1-4A3B-8753-34BF4A56983A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7C77D787-A7B1-4A3B-8753-34BF4A56983A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7C77D787-A7B1-4A3B-8753-34BF4A56983A}.Release|Any CPU.Build.0 = Release|Any CPU
{1FC390C1-D9E5-43CE-923C-78F76A4E7EF8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1FC390C1-D9E5-43CE-923C-78F76A4E7EF8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1FC390C1-D9E5-43CE-923C-78F76A4E7EF8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1FC390C1-D9E5-43CE-923C-78F76A4E7EF8}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {DFCC3D3A-2A22-41CE-8361-2DAC02CDB9F6}
EndGlobalSection
EndGlobal
@@ -0,0 +1,20 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<base href="/" />
<link rel="stylesheet" href="bootstrap/bootstrap.min.css" />
<link rel="stylesheet" href="app.css" />
<link rel="stylesheet" href="GPW.CORE.HYB.styles.css" />
<link rel="icon" type="image/png" href="favicon.png" />
<HeadOutlet />
</head>
<body>
<Routes />
<script src="_framework/blazor.web.js"></script>
</body>
</html>
@@ -0,0 +1,23 @@
@inherits LayoutComponentBase
<div class="page">
<div class="sidebar">
<NavMenu />
</div>
<main>
<div class="top-row px-4">
<a href="https://learn.microsoft.com/aspnet/core/" target="_blank">About</a>
</div>
<article class="content px-4">
@Body
</article>
</main>
</div>
<div id="blazor-error-ui">
An unhandled error has occurred.
<a href="" class="reload">Reload</a>
<a class="dismiss">🗙</a>
</div>
@@ -0,0 +1,96 @@
.page {
position: relative;
display: flex;
flex-direction: column;
}
main {
flex: 1;
}
.sidebar {
background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%);
}
.top-row {
background-color: #f7f7f7;
border-bottom: 1px solid #d6d5d5;
justify-content: flex-end;
height: 3.5rem;
display: flex;
align-items: center;
}
.top-row ::deep a, .top-row ::deep .btn-link {
white-space: nowrap;
margin-left: 1.5rem;
text-decoration: none;
}
.top-row ::deep a:hover, .top-row ::deep .btn-link:hover {
text-decoration: underline;
}
.top-row ::deep a:first-child {
overflow: hidden;
text-overflow: ellipsis;
}
@media (max-width: 640.98px) {
.top-row {
justify-content: space-between;
}
.top-row ::deep a, .top-row ::deep .btn-link {
margin-left: 0;
}
}
@media (min-width: 641px) {
.page {
flex-direction: row;
}
.sidebar {
width: 250px;
height: 100vh;
position: sticky;
top: 0;
}
.top-row {
position: sticky;
top: 0;
z-index: 1;
}
.top-row.auth ::deep a:first-child {
flex: 1;
text-align: right;
width: 0;
}
.top-row, article {
padding-left: 2rem !important;
padding-right: 1.5rem !important;
}
}
#blazor-error-ui {
background: lightyellow;
bottom: 0;
box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
display: none;
left: 0;
padding: 0.6rem 1.25rem 0.7rem 1.25rem;
position: fixed;
width: 100%;
z-index: 1000;
}
#blazor-error-ui .dismiss {
cursor: pointer;
position: absolute;
right: 0.75rem;
top: 0.5rem;
}
@@ -0,0 +1,36 @@
<div class="top-row ps-3 navbar navbar-dark">
<div class="container-fluid">
<a class="navbar-brand" href="">GPW.CORE.HYB</a>
</div>
</div>
<input type="checkbox" title="Navigation menu" class="navbar-toggler" />
<div class="nav-scrollable" onclick="document.querySelector('.navbar-toggler').click()">
<nav class="flex-column">
<div class="nav-item px-3">
<NavLink class="nav-link" href="" Match="NavLinkMatch.All">
<span class="bi bi-house-door-fill-nav-menu" aria-hidden="true"></span> Home
</NavLink>
</div>
<div class="nav-item px-3">
<NavLink class="nav-link" href="counter">
<span class="bi bi-plus-square-fill-nav-menu" aria-hidden="true"></span> Counter
</NavLink>
</div>
<div class="nav-item px-3">
<NavLink class="nav-link" href="clock-display">
<span class="bi bi-list-nested-nav-menu" aria-hidden="true"></span> Clock Test
</NavLink>
</div>
<div class="nav-item px-3">
<NavLink class="nav-link" href="weather">
<span class="bi bi-list-nested-nav-menu" aria-hidden="true"></span> Weather
</NavLink>
</div>
</nav>
</div>
@@ -0,0 +1,105 @@
.navbar-toggler {
appearance: none;
cursor: pointer;
width: 3.5rem;
height: 2.5rem;
color: white;
position: absolute;
top: 0.5rem;
right: 1rem;
border: 1px solid rgba(255, 255, 255, 0.1);
background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") no-repeat center/1.75rem rgba(255, 255, 255, 0.1);
}
.navbar-toggler:checked {
background-color: rgba(255, 255, 255, 0.5);
}
.top-row {
height: 3.5rem;
background-color: rgba(0,0,0,0.4);
}
.navbar-brand {
font-size: 1.1rem;
}
.bi {
display: inline-block;
position: relative;
width: 1.25rem;
height: 1.25rem;
margin-right: 0.75rem;
top: -1px;
background-size: cover;
}
.bi-house-door-fill-nav-menu {
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-house-door-fill' viewBox='0 0 16 16'%3E%3Cpath d='M6.5 14.5v-3.505c0-.245.25-.495.5-.495h2c.25 0 .5.25.5.5v3.5a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5v-7a.5.5 0 0 0-.146-.354L13 5.793V2.5a.5.5 0 0 0-.5-.5h-1a.5.5 0 0 0-.5.5v1.293L8.354 1.146a.5.5 0 0 0-.708 0l-6 6A.5.5 0 0 0 1.5 7.5v7a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5Z'/%3E%3C/svg%3E");
}
.bi-plus-square-fill-nav-menu {
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-plus-square-fill' viewBox='0 0 16 16'%3E%3Cpath d='M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2zm6.5 4.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3a.5.5 0 0 1 1 0z'/%3E%3C/svg%3E");
}
.bi-list-nested-nav-menu {
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-list-nested' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M4.5 11.5A.5.5 0 0 1 5 11h10a.5.5 0 0 1 0 1H5a.5.5 0 0 1-.5-.5zm-2-4A.5.5 0 0 1 3 7h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm-2-4A.5.5 0 0 1 1 3h10a.5.5 0 0 1 0 1H1a.5.5 0 0 1-.5-.5z'/%3E%3C/svg%3E");
}
.nav-item {
font-size: 0.9rem;
padding-bottom: 0.5rem;
}
.nav-item:first-of-type {
padding-top: 1rem;
}
.nav-item:last-of-type {
padding-bottom: 1rem;
}
.nav-item ::deep .nav-link {
color: #d7d7d7;
background: none;
border: none;
border-radius: 4px;
height: 3rem;
display: flex;
align-items: center;
line-height: 3rem;
width: 100%;
}
.nav-item ::deep a.active {
background-color: rgba(255,255,255,0.37);
color: white;
}
.nav-item ::deep .nav-link:hover {
background-color: rgba(255,255,255,0.1);
color: white;
}
.nav-scrollable {
display: none;
}
.navbar-toggler:checked ~ .nav-scrollable {
display: block;
}
@media (min-width: 641px) {
.navbar-toggler {
display: none;
}
.nav-scrollable {
/* Never collapse the sidebar for wide screens */
display: block;
/* Allow sidebar to scroll for tall menus */
height: calc(100vh - 3.5rem);
overflow-y: auto;
}
}
@@ -0,0 +1,36 @@
@page "/Error"
@using System.Diagnostics
<PageTitle>Error</PageTitle>
<h1 class="text-danger">Error.</h1>
<h2 class="text-danger">An error occurred while processing your request.</h2>
@if (ShowRequestId)
{
<p>
<strong>Request ID:</strong> <code>@RequestId</code>
</p>
}
<h3>Development Mode</h3>
<p>
Swapping to <strong>Development</strong> environment will display more detailed information about the error that occurred.
</p>
<p>
<strong>The Development environment shouldn't be enabled for deployed applications.</strong>
It can result in displaying sensitive information from exceptions to end users.
For local debugging, enable the <strong>Development</strong> environment by setting the <strong>ASPNETCORE_ENVIRONMENT</strong> environment variable to <strong>Development</strong>
and restarting the app.
</p>
@code{
[CascadingParameter]
private HttpContext? HttpContext { get; set; }
private string? RequestId { get; set; }
private bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
protected override void OnInitialized() =>
RequestId = Activity.Current?.Id ?? HttpContext?.TraceIdentifier;
}
@@ -0,0 +1,7 @@
@page "/"
<PageTitle>Home</PageTitle>
<h1>Hello, world!</h1>
Welcome to your new app.

Some files were not shown because too many files have changed in this diff Show More