├── .github └── workflows │ └── azure-static-web-apps-calm-coast-04a81e80f.yml ├── .gitignore ├── App.razor ├── Constants └── Settings.cs ├── LICENSE ├── ListTemplate ├── Logs.png ├── Logs.stp └── Logs.txt ├── Models ├── Envelope.cs ├── Group.cs ├── Item.cs ├── Metadata.cs ├── Root.cs ├── Upload.cs └── Value.cs ├── Pages ├── About.razor ├── CheckInDmm.razor ├── CheckInJed.razor ├── CheckInRyd.razor ├── CheckOutDmm.razor ├── CheckOutJed.razor ├── CheckOutRyd.razor ├── Index.razor ├── Log.razor ├── Logs.razor ├── LogsDmm.razor ├── LogsJed.razor ├── LogsRyd.razor ├── Permissions.razor └── Smj.razor ├── Program.cs ├── Properties ├── PublishProfiles │ ├── smj-work.pubxml │ └── smj-zen.pubxml └── launchSettings.json ├── README.md ├── Shared ├── AlertBar.razor ├── CheckOut.razor ├── Header.razor ├── LiveStats.razor ├── Loading.razor ├── MainLayout.razor ├── MyLogs.razor ├── NavMenu.razor ├── NotAutorized.razor ├── PeoplePicker.razor └── Popup.razor ├── Validations ├── CheckInEmployee.cs ├── CheckInNonEmployee.cs └── Filter.cs ├── Workers ├── Export.cs ├── JSRuntimeExtentions.cs └── SPTools.cs ├── _Imports.razor ├── dc.csproj ├── dc.sln ├── demo.gif └── wwwroot ├── appsettings.json ├── css ├── bootstrap │ ├── bootstrap.min.css │ └── bootstrap.min.css.map ├── dataTables.bootstrap4.min.css ├── responsive.bootstrap4.min.css └── site.css ├── default.aspx ├── fonts └── Cascadia.ttf ├── img ├── attached.svg ├── check-in.svg ├── check-out.svg ├── copy.svg ├── doc.svg ├── edit.svg ├── excel.svg ├── favicon-16x16.png ├── favicon-32x32.png ├── favicon-96x96.png ├── favicon.ico ├── filter.svg ├── form.png ├── form.svg ├── lang.png ├── lock.svg ├── logo.png ├── logo_color.png ├── logout.png ├── preloader.gif ├── printer.svg ├── sideMenu01.png ├── sideMenu02.png ├── sideMenu03.png ├── sideMenu04.png ├── sideMenu05.png ├── sideMenu06.png ├── sideMenu07.png ├── sideMenu08.png ├── tick.svg ├── user.png └── web.svg └── js ├── bootstrap.min.js ├── bootstrap.min.js.map ├── dataTables.bootstrap4.min.js ├── dataTables.responsive.min.js ├── ie.js ├── jquery-3.4.1.min.js ├── jquery.dataTables.min.js ├── responsive.bootstrap4.min.js └── site.js /.github/workflows/azure-static-web-apps-calm-coast-04a81e80f.yml: -------------------------------------------------------------------------------- 1 | name: Azure Static Web Apps CI/CD 2 | 3 | on: 4 | push: 5 | branches: 6 | - master 7 | pull_request: 8 | types: [opened, synchronize, reopened, closed] 9 | branches: 10 | - master 11 | 12 | jobs: 13 | build_and_deploy_job: 14 | if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed') 15 | runs-on: ubuntu-latest 16 | name: Build and Deploy Job 17 | steps: 18 | - uses: actions/checkout@v2 19 | with: 20 | submodules: true 21 | - name: Build And Deploy 22 | id: builddeploy 23 | uses: Azure/static-web-apps-deploy@v0.0.1-preview 24 | with: 25 | azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_CALM_COAST_04A81E80F }} 26 | repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments) 27 | action: "upload" 28 | ###### Repository/Build Configurations - These values can be configured to match you app requirements. ###### 29 | # For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig 30 | app_location: "Client" # App source code path 31 | api_location: "Api" # Api source code path - optional 32 | app_artifact_location: "wwwroot" # Built app content directory - optional 33 | ###### End of Repository/Build Configurations ###### 34 | 35 | close_pull_request_job: 36 | if: github.event_name == 'pull_request' && github.event.action == 'closed' 37 | runs-on: ubuntu-latest 38 | name: Close Pull Request Job 39 | steps: 40 | - name: Close Pull Request 41 | id: closepullrequest 42 | uses: Azure/static-web-apps-deploy@v0.0.1-preview 43 | with: 44 | azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_CALM_COAST_04A81E80F }} 45 | action: "close" 46 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.rsuser 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Build results 17 | [Dd]ebug/ 18 | [Dd]ebugPublic/ 19 | [Rr]elease/ 20 | [Rr]eleases/ 21 | x64/ 22 | x86/ 23 | [Aa][Rr][Mm]/ 24 | [Aa][Rr][Mm]64/ 25 | bld/ 26 | [Bb]in/ 27 | [Oo]bj/ 28 | [Ll]og/ 29 | 30 | # Visual Studio 2015/2017 cache/options directory 31 | .vs/ 32 | .github/ 33 | 34 | # Uncomment if you have tasks that create the project's static files in wwwroot 35 | #wwwroot/ 36 | 37 | # Visual Studio 2017 auto generated files 38 | Generated\ Files/ 39 | 40 | # MSTest test Results 41 | [Tt]est[Rr]esult*/ 42 | [Bb]uild[Ll]og.* 43 | 44 | # NUNIT 45 | *.VisualState.xml 46 | TestResult.xml 47 | 48 | # Build Results of an ATL Project 49 | [Dd]ebugPS/ 50 | [Rr]eleasePS/ 51 | dlldata.c 52 | 53 | # Benchmark Results 54 | BenchmarkDotNet.Artifacts/ 55 | 56 | # .NET Core 57 | project.lock.json 58 | project.fragment.lock.json 59 | artifacts/ 60 | 61 | # StyleCop 62 | StyleCopReport.xml 63 | 64 | # Files built by Visual Studio 65 | *_i.c 66 | *_p.c 67 | *_h.h 68 | *.ilk 69 | *.meta 70 | *.obj 71 | *.iobj 72 | *.pch 73 | *.pdb 74 | *.ipdb 75 | *.pgc 76 | *.pgd 77 | *.rsp 78 | *.sbr 79 | *.tlb 80 | *.tli 81 | *.tlh 82 | *.tmp 83 | *.tmp_proj 84 | *_wpftmp.csproj 85 | *.log 86 | *.vspscc 87 | *.vssscc 88 | .builds 89 | *.pidb 90 | *.svclog 91 | *.scc 92 | 93 | # Chutzpah Test files 94 | _Chutzpah* 95 | 96 | # Visual C++ cache files 97 | ipch/ 98 | *.aps 99 | *.ncb 100 | *.opendb 101 | *.opensdf 102 | *.sdf 103 | *.cachefile 104 | *.VC.db 105 | *.VC.VC.opendb 106 | 107 | # Visual Studio profiler 108 | *.psess 109 | *.vsp 110 | *.vspx 111 | *.sap 112 | 113 | # Visual Studio Trace Files 114 | *.e2e 115 | 116 | # TFS 2012 Local Workspace 117 | $tf/ 118 | 119 | # Guidance Automation Toolkit 120 | *.gpState 121 | 122 | # ReSharper is a .NET coding add-in 123 | _ReSharper*/ 124 | *.[Rr]e[Ss]harper 125 | *.DotSettings.user 126 | 127 | # JustCode is a .NET coding add-in 128 | .JustCode 129 | 130 | # TeamCity is a build add-in 131 | _TeamCity* 132 | 133 | # DotCover is a Code Coverage Tool 134 | *.dotCover 135 | 136 | # AxoCover is a Code Coverage Tool 137 | .axoCover/* 138 | !.axoCover/settings.json 139 | 140 | # Visual Studio code coverage results 141 | *.coverage 142 | *.coveragexml 143 | 144 | # NCrunch 145 | _NCrunch_* 146 | .*crunch*.local.xml 147 | nCrunchTemp_* 148 | 149 | # MightyMoose 150 | *.mm.* 151 | AutoTest.Net/ 152 | 153 | # Web workbench (sass) 154 | .sass-cache/ 155 | 156 | # Installshield output folder 157 | [Ee]xpress/ 158 | 159 | # DocProject is a documentation generator add-in 160 | DocProject/buildhelp/ 161 | DocProject/Help/*.HxT 162 | DocProject/Help/*.HxC 163 | DocProject/Help/*.hhc 164 | DocProject/Help/*.hhk 165 | DocProject/Help/*.hhp 166 | DocProject/Help/Html2 167 | DocProject/Help/html 168 | 169 | # Click-Once directory 170 | publish/ 171 | 172 | # Publish Web Output 173 | *.[Pp]ublish.xml 174 | *.azurePubxml 175 | # Note: Comment the next line if you want to checkin your web deploy settings, 176 | # but database connection strings (with potential passwords) will be unencrypted 177 | #*.pubxml 178 | *.publishproj 179 | 180 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 181 | # checkin your Azure Web App publish settings, but sensitive information contained 182 | # in these scripts will be unencrypted 183 | PublishScripts/ 184 | 185 | # NuGet Packages 186 | *.nupkg 187 | # The packages folder can be ignored because of Package Restore 188 | **/[Pp]ackages/* 189 | # except build/, which is used as an MSBuild target. 190 | !**/[Pp]ackages/build/ 191 | # Uncomment if necessary however generally it will be regenerated when needed 192 | #!**/[Pp]ackages/repositories.config 193 | # NuGet v3's project.json files produces more ignorable files 194 | *.nuget.props 195 | *.nuget.targets 196 | 197 | # Microsoft Azure Build Output 198 | csx/ 199 | *.build.csdef 200 | 201 | # Microsoft Azure Emulator 202 | ecf/ 203 | rcf/ 204 | 205 | # Windows Store app package directories and files 206 | AppPackages/ 207 | BundleArtifacts/ 208 | Package.StoreAssociation.xml 209 | _pkginfo.txt 210 | *.appx 211 | 212 | # Visual Studio cache files 213 | # files ending in .cache can be ignored 214 | *.[Cc]ache 215 | # but keep track of directories ending in .cache 216 | !?*.[Cc]ache/ 217 | 218 | # Others 219 | ClientBin/ 220 | ~$* 221 | *~ 222 | *.dbmdl 223 | *.dbproj.schemaview 224 | *.jfm 225 | *.pfx 226 | *.publishsettings 227 | orleans.codegen.cs 228 | 229 | # Including strong name files can present a security risk 230 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 231 | #*.snk 232 | 233 | # Since there are multiple workflows, uncomment next line to ignore bower_components 234 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 235 | #bower_components/ 236 | 237 | # RIA/Silverlight projects 238 | Generated_Code/ 239 | 240 | # Backup & report files from converting an old project file 241 | # to a newer Visual Studio version. Backup files are not needed, 242 | # because we have git ;-) 243 | _UpgradeReport_Files/ 244 | Backup*/ 245 | UpgradeLog*.XML 246 | UpgradeLog*.htm 247 | ServiceFabricBackup/ 248 | *.rptproj.bak 249 | 250 | # SQL Server files 251 | *.mdf 252 | *.ldf 253 | *.ndf 254 | 255 | # Business Intelligence projects 256 | *.rdl.data 257 | *.bim.layout 258 | *.bim_*.settings 259 | *.rptproj.rsuser 260 | *- Backup*.rdl 261 | 262 | # Microsoft Fakes 263 | FakesAssemblies/ 264 | 265 | # GhostDoc plugin setting file 266 | *.GhostDoc.xml 267 | 268 | # Node.js Tools for Visual Studio 269 | .ntvs_analysis.dat 270 | node_modules/ 271 | 272 | # Visual Studio 6 build log 273 | *.plg 274 | 275 | # Visual Studio 6 workspace options file 276 | *.opt 277 | 278 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 279 | *.vbw 280 | 281 | # Visual Studio LightSwitch build output 282 | **/*.HTMLClient/GeneratedArtifacts 283 | **/*.DesktopClient/GeneratedArtifacts 284 | **/*.DesktopClient/ModelManifest.xml 285 | **/*.Server/GeneratedArtifacts 286 | **/*.Server/ModelManifest.xml 287 | _Pvt_Extensions 288 | 289 | # Paket dependency manager 290 | .paket/paket.exe 291 | paket-files/ 292 | 293 | # FAKE - F# Make 294 | .fake/ 295 | 296 | # JetBrains Rider 297 | .idea/ 298 | *.sln.iml 299 | 300 | # CodeRush personal settings 301 | .cr/personal 302 | 303 | # Python Tools for Visual Studio (PTVS) 304 | __pycache__/ 305 | *.pyc 306 | 307 | # Cake - Uncomment if you are using it 308 | # tools/** 309 | # !tools/packages.config 310 | 311 | # Tabs Studio 312 | *.tss 313 | 314 | # Telerik's JustMock configuration file 315 | *.jmconfig 316 | 317 | # BizTalk build output 318 | *.btp.cs 319 | *.btm.cs 320 | *.odx.cs 321 | *.xsd.cs 322 | 323 | # OpenCover UI analysis results 324 | OpenCover/ 325 | 326 | # Azure Stream Analytics local run output 327 | ASALocalRun/ 328 | 329 | # MSBuild Binary and Structured Log 330 | *.binlog 331 | 332 | # NVidia Nsight GPU debugger configuration file 333 | *.nvuser 334 | 335 | # MFractors (Xamarin productivity tool) working folder 336 | .mfractor/ 337 | 338 | # Local History for Visual Studio 339 | .localhistory/ 340 | 341 | # BeatPulse healthcheck temp database 342 | healthchecksdb -------------------------------------------------------------------------------- /App.razor: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |

Sorry, there's nothing at this address.

8 |
9 |
10 |
11 | -------------------------------------------------------------------------------- /Constants/Settings.cs: -------------------------------------------------------------------------------- 1 | /* {﷽‎} */ 2 | using dc.Models; 3 | using System; 4 | using System.Collections.Generic; 5 | 6 | namespace dc.Constants 7 | { 8 | public static class Settings 9 | { 10 | public static string Title { get; set; } 11 | public static string LoginName { get; set; } 12 | public static string LoginNameTrimed = string.Empty; 13 | public static int Id; 14 | public static string FormDigestValue { get; set; } 15 | public static List Groups { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright 2020 Syed Mohammed Jafary 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /ListTemplate/Logs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smj0x/BlazorPoint/536de31e45daa9f809bf7c70f21bc2809022c79c/ListTemplate/Logs.png -------------------------------------------------------------------------------- /ListTemplate/Logs.stp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smj0x/BlazorPoint/536de31e45daa9f809bf7c70f21bc2809022c79c/ListTemplate/Logs.stp -------------------------------------------------------------------------------- /ListTemplate/Logs.txt: -------------------------------------------------------------------------------- 1 | Columns 2 | Title Single line of text Required 3 | Employee Person or Group 4 | PoV Multiple lines of text 5 | NationalID Single line of text 6 | FullName Single line of text 7 | ContactNumber Single line of text 8 | WorkEmail Single line of text 9 | Company Single line of text 10 | Datacenter Choice 11 | CheckIn Date and Time 12 | CheckOut Date and Time 13 | VisitorType Choice 14 | Status Choice 15 | IdentityNumber Single line of text 16 | AttachmentUrl Hyperlink or Picture 17 | Modified Date and Time 18 | Created Date and Time 19 | Created By Person or Group 20 | Modified By Person or Group -------------------------------------------------------------------------------- /Models/Envelope.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Xml.Serialization; 3 | using System.Collections.Generic; 4 | 5 | namespace dc.Models 6 | { 7 | [XmlRoot(ElementName = "ConfiguredOutcome", Namespace = "http://nintex.com")] 8 | public class ConfiguredOutcome 9 | { 10 | [XmlAttribute(AttributeName = "Id")] 11 | public string Id { get; set; } 12 | [XmlAttribute(AttributeName = "Name")] 13 | public string Name { get; set; } 14 | [XmlAttribute(AttributeName = "CommentsMode")] 15 | public string CommentsMode { get; set; } 16 | [XmlAttribute(AttributeName = "Description")] 17 | public string Description { get; set; } 18 | [XmlAttribute(AttributeName = "BranchIndex")] 19 | public string BranchIndex { get; set; } 20 | } 21 | 22 | [XmlRoot(ElementName = "GetOutcomesForFlexiTaskResult", Namespace = "http://nintex.com")] 23 | public class GetOutcomesForFlexiTaskResult 24 | { 25 | [XmlElement(ElementName = "ConfiguredOutcome", Namespace = "http://nintex.com")] 26 | public List ConfiguredOutcome { get; set; } 27 | } 28 | 29 | [XmlRoot(ElementName = "GetOutcomesForFlexiTaskResponse", Namespace = "http://nintex.com")] 30 | public class GetOutcomesForFlexiTaskResponse 31 | { 32 | [XmlElement(ElementName = "GetOutcomesForFlexiTaskResult", Namespace = "http://nintex.com")] 33 | public GetOutcomesForFlexiTaskResult GetOutcomesForFlexiTaskResult { get; set; } 34 | [XmlAttribute(AttributeName = "xmlns")] 35 | public string Xmlns { get; set; } 36 | } 37 | 38 | [XmlRoot(ElementName = "Body", Namespace = "http://www.w3.org/2003/05/soap-envelope")] 39 | public class Body 40 | { 41 | [XmlElement(ElementName = "GetOutcomesForFlexiTaskResponse", Namespace = "http://nintex.com")] 42 | public GetOutcomesForFlexiTaskResponse GetOutcomesForFlexiTaskResponse { get; set; } 43 | } 44 | 45 | [XmlRoot(ElementName = "Envelope", Namespace = "http://www.w3.org/2003/05/soap-envelope")] 46 | public class Envelope 47 | { 48 | [XmlElement(ElementName = "Body", Namespace = "http://www.w3.org/2003/05/soap-envelope")] 49 | public Body Body { get; set; } 50 | [XmlAttribute(AttributeName = "soap", Namespace = "http://www.w3.org/2000/xmlns/")] 51 | public string Soap { get; set; } 52 | [XmlAttribute(AttributeName = "xsi", Namespace = "http://www.w3.org/2000/xmlns/")] 53 | public string Xsi { get; set; } 54 | [XmlAttribute(AttributeName = "xsd", Namespace = "http://www.w3.org/2000/xmlns/")] 55 | public string Xsd { get; set; } 56 | } 57 | 58 | } 59 | -------------------------------------------------------------------------------- /Models/Group.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace dc.Models 4 | { 5 | [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] 6 | public class Group 7 | { 8 | public int Id { get; set; } 9 | public bool IsHiddenInUI { get; set; } 10 | public string LoginName { get; set; } 11 | public string Title { get; set; } 12 | public string Description { get; set; } 13 | public int PrincipalType { get; set; } 14 | public bool AllowMembersEditMembership { get; set; } 15 | public bool AllowRequestToJoinLeave { get; set; } 16 | public bool AutoAcceptRequestToJoinLeave { get; set; } 17 | public bool OnlyAllowMembersViewMembership { get; set; } 18 | public string OwnerTitle { get; set; } 19 | public object RequestToJoinLeaveEmailSetting { get; set; } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Models/Item.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Newtonsoft.Json; 3 | using Newtonsoft.Json.Converters; 4 | 5 | namespace dc.Models 6 | { 7 | [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] 8 | public class Item 9 | { 10 | //General 11 | [JsonProperty("__metadata")] 12 | public Metadata Metadata { get; set; } 13 | public string Title { get; set; } 14 | //Visitor 15 | public int? EmployeeId { get; set; } 16 | public string PoV { get; set; } 17 | public string IdentityNumber { get; set; } 18 | public string NationalID { get; set; } 19 | public string FullName { get; set; } 20 | public string ContactNumber { get; set; } 21 | public string WorkEmail { get; set; } 22 | public string Company { get; set; } 23 | public string Datacenter { get; set; } 24 | public DateTime? CheckIn { get; set; } 25 | public DateTime? CheckOut { get; set; } 26 | public string VisitorType { get; set; } 27 | public string Status { get; set; } 28 | public string Purpose { get; set; } 29 | public AttachmentUrl AttachmentUrl { get; set; } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Models/Metadata.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace dc.Models 4 | { 5 | public class Metadata 6 | { 7 | [JsonProperty("type")] 8 | public string Type { get; set; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Models/Root.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | 7 | namespace dc.Models 8 | { 9 | public class Root 10 | { 11 | public List value { get; set; } 12 | public string Title { get; set; } 13 | public string LoginName { get; set; } 14 | public int Id { get; set; } 15 | public string FormDigestValue { get; set; } 16 | [JsonProperty("odata.nextLink")] 17 | public string OdataNextLink { get; set; } 18 | public List Groups { get; set; } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Models/Upload.cs: -------------------------------------------------------------------------------- 1 | namespace dc.Models 2 | { 3 | public class Upload 4 | { 5 | public string controlId { get; set; } 6 | public string url { get; set; } 7 | public string listGuidMain { get; set; } 8 | public int itemId { get; set; } 9 | public string digest { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Models/Value.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | 7 | namespace dc.Models 8 | { 9 | public class Value 10 | { 11 | //Default 12 | public int FileSystemObjectType { get; set; } 13 | public int Id { get; set; } 14 | public int ID { get; set; } 15 | public string Title { get; set; } 16 | public string ContentTypeId { get; set; } 17 | public DateTime Modified { get; set; } 18 | public DateTime Created { get; set; } 19 | public int AuthorId { get; set; } 20 | public int EditorId { get; set; } 21 | public string OData__UIVersionString { get; set; } 22 | public bool Attachments { get; set; } 23 | public List AttachmentFiles { get; set; } 24 | public AttachmentUrl AttachmentUrl { get; set; } 25 | public string GUID { get; set; } 26 | public string Status { get; set; } 27 | public string Purpose { get; set; } 28 | //Tasks 29 | public string Body { get; set; } 30 | public string Priority { get; set; } 31 | public string ApproverComments { get; set; } 32 | public TaskGroup TaskGroup { get; set; } 33 | public AssignedTo AssignedTo { get; set; } 34 | public string WorkflowOutcome { get; set; } 35 | //Site Groups 36 | public string LoginName { get; set; } 37 | public string OwnerTitle { get; set; } 38 | public string Description { get; set; } 39 | //Visitor 40 | public Employee Employee { get; set; } 41 | public string PoV { get; set; } 42 | public string IdentityNumber { get; set; } 43 | public string NationalID { get; set; } 44 | public string FullName { get; set; } 45 | public string ContactNumber { get; set; } 46 | public string WorkEmail { get; set; } 47 | public string Email { get; set; } 48 | public string Company { get; set; } 49 | public string Datacenter { get; set; } 50 | public DateTime? CheckIn { get; set; } 51 | public DateTime? CheckOut { get; set; } 52 | public string VisitorType { get; set; } 53 | } 54 | 55 | public class AttachmentFiles 56 | { 57 | public string FileName { get; set; } 58 | public string ServerRelativeUrl { get; set; } 59 | } 60 | 61 | public class AttachmentUrl 62 | { 63 | public string Description { get; set; } 64 | public string Url { get; set; } 65 | } 66 | 67 | public class Employee 68 | { 69 | public string Title { get; set; } 70 | public string EMail { get; set; } 71 | public string UserName { get; set; } 72 | public string WorkPhone { get; set; } 73 | public string Office { get; set; } 74 | public string Department { get; set; } 75 | } 76 | public class AssignedTo 77 | { 78 | public string Title { get; set; } 79 | } 80 | 81 | public class TaskGroup 82 | { 83 | public string Title { get; set; } 84 | } 85 | } -------------------------------------------------------------------------------- /Pages/About.razor: -------------------------------------------------------------------------------- 1 | @page "/default.aspx/about" 2 | @using Models; 3 | @using Newtonsoft.Json; 4 | @using System.Net.Http; 5 | 6 |
7 |
8 |
9 |
10 | 11 |
12 |

SEC Datacenter

13 |
14 |
15 |
16 |
17 | @if (groupMemebers != null) 18 | { 19 |

Datacenter Visitor Log Application

20 |
21 | Administrators 22 |
23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | @if (groupMemebers.Count != 0) 35 | { 36 | @foreach (var item in groupMemebers) 37 | { 38 | 39 | 40 | 41 | 42 | 43 | } 44 | } 45 | 46 |
Employee NameEmployee NumberWork Email
@item.Title@item.LoginName.Split('|')[1]@item.Email
47 |
48 |
49 |
50 | } 51 |
52 | 53 | @code 54 | { 55 | private Root rootGroupMemebers = new Root(); 56 | private List groupMemebers = new List(); 57 | 58 | protected override async Task OnInitializedAsync() 59 | { 60 | await LoadGroupMembersAsync(14); 61 | StateHasChanged(); 62 | } 63 | private async Task LoadGroupMembersAsync(int Gid) 64 | { 65 | string response = string.Empty; 66 | HttpClient Http = new HttpClient(); 67 | Http.DefaultRequestHeaders.Add("Accept", "application/json"); 68 | response = await Http.GetStringAsync(Navigator.BaseUri + Configuration["BaseURL"] + "_api/web/sitegroups/GetById('" + Gid + "')/Users"); 69 | rootGroupMemebers = JsonConvert.DeserializeObject(response); 70 | groupMemebers = rootGroupMemebers.value; 71 | } 72 | 73 | } 74 | 75 | -------------------------------------------------------------------------------- /Pages/CheckOutDmm.razor: -------------------------------------------------------------------------------- 1 | @page "/default.aspx/dmm/check-out" 2 | @page "/default.aspx/dmm/check-out/{filter}" 3 | @using Workers; 4 | @using Models; 5 | 6 | @if (authorized) 7 | { 8 |

Check-Out (DMM)

9 | 10 |
11 | 12 | 18 |
19 |
20 | 21 | 22 | } 23 | else 24 | { 25 | 26 | } 27 | @code { 28 | [Parameter] 29 | public string Filter { get; set; } 30 | private bool authorized = true; 31 | 32 | protected override async Task OnInitializedAsync() 33 | { 34 | if (!await AuthorizedAsync(Configuration["DmmOpGroup"])) 35 | authorized = false; 36 | else 37 | authorized = true; 38 | StateHasChanged(); 39 | } 40 | 41 | private async Task AuthorizedAsync(string assignTo) 42 | { 43 | var groups = await SPTools.GetMyGroupsAsync(Navigator.BaseUri,Configuration["BaseURL"]); 44 | if (groups != null) 45 | { 46 | foreach (Group group in groups) 47 | { 48 | if (group.LoginName.Equals(assignTo)) 49 | { 50 | //authorized 51 | return true; 52 | } 53 | } 54 | //unauthorized 55 | return false; 56 | } 57 | else 58 | { 59 | //unauthorized 60 | return false; 61 | } 62 | } 63 | } -------------------------------------------------------------------------------- /Pages/CheckOutJed.razor: -------------------------------------------------------------------------------- 1 | @page "/default.aspx/jed/check-out" 2 | @page "/default.aspx/jed/check-out/{filter}" 3 | @using Workers; 4 | @using Models; 5 | 6 | @if (authorized) 7 | { 8 |

Check-Out (JED)

9 | 10 |
11 | 12 | 18 |
19 |
20 | 21 | 22 | }else { 23 | 24 | } 25 | @code { 26 | [Parameter] 27 | public string Filter { get; set; } 28 | private bool authorized = true; 29 | 30 | protected override async Task OnInitializedAsync() 31 | { 32 | if (!await AuthorizedAsync(Configuration["JedOpGroup"])) 33 | authorized = false; 34 | else 35 | authorized = true; 36 | StateHasChanged(); 37 | } 38 | 39 | private async Task AuthorizedAsync(string assignTo) 40 | { 41 | var groups = await SPTools.GetMyGroupsAsync(Navigator.BaseUri,Configuration["BaseURL"]); 42 | if (groups != null) 43 | { 44 | foreach (Group group in groups) 45 | { 46 | if (group.LoginName.Equals(assignTo)) 47 | { 48 | //authorized 49 | return true; 50 | } 51 | } 52 | //unauthorized 53 | return false; 54 | } 55 | else 56 | { 57 | //unauthorized 58 | return false; 59 | } 60 | } 61 | } -------------------------------------------------------------------------------- /Pages/CheckOutRyd.razor: -------------------------------------------------------------------------------- 1 | @page "/default.aspx/ryd/check-out" 2 | @page "/default.aspx/ryd/check-out/{filter}" 3 | @using Workers; 4 | @using Models; 5 | 6 | @if (authorized) 7 | { 8 |

Check-Out (RYD)

9 | 10 |
11 | 12 | 18 |
19 |
20 | 21 | 22 | } 23 | else 24 | { 25 | 26 | } 27 | @code { 28 | [Parameter] 29 | public string Filter { get; set; } 30 | private bool authorized = true; 31 | 32 | protected override async Task OnInitializedAsync() 33 | { 34 | if (!await AuthorizedAsync(Configuration["RydOpGroup"])) 35 | authorized = false; 36 | else 37 | authorized = true; 38 | StateHasChanged(); 39 | } 40 | 41 | private async Task AuthorizedAsync(string assignTo) 42 | { 43 | var groups = await SPTools.GetMyGroupsAsync(Navigator.BaseUri,Configuration["BaseURL"]); 44 | if (groups != null) 45 | { 46 | foreach (Group group in groups) 47 | { 48 | if (group.LoginName.Equals(assignTo)) 49 | { 50 | //authorized 51 | return true; 52 | } 53 | } 54 | //unauthorized 55 | return false; 56 | } 57 | else 58 | { 59 | //unauthorized 60 | return false; 61 | } 62 | } 63 | } -------------------------------------------------------------------------------- /Pages/Index.razor: -------------------------------------------------------------------------------- 1 | @page "/default.aspx" 2 | @using Models; 3 | @using Newtonsoft.Json; 4 | @using System.Net.Http; 5 |

Home

6 | 7 |
8 | @if (groups != null) 9 | { 10 | @foreach (var group in groups) 11 | { 12 | 13 | @if (group.LoginName == Configuration["RydOpGroup"]) 14 | { 15 |
16 |
17 | 18 | form 19 | 23 | 24 |
25 |
26 | 27 | form 28 | 32 | 33 |
34 |
35 |
36 |
37 | }}} 38 |
39 | @if (groups != null) 40 | { 41 | @foreach (var group in groups) 42 | { 43 | 44 | @if (group.LoginName == Configuration["DmmOpGroup"]) 45 | { 46 |
47 |
48 | 49 | form 50 | 54 | 55 |
56 |
57 | 58 | form 59 | 63 | 64 |
65 |
66 |
67 |
68 | }}} 69 |
70 | @if (groups != null) 71 | { 72 | @foreach (var group in groups) 73 | { 74 | 75 | @if (group.LoginName == Configuration["JedOpGroup"]) 76 | { 77 |
78 |
79 | 80 | form 81 | 85 | 86 |
87 |
88 | 89 | form 90 | 94 | 95 |
96 |
97 |
98 |
99 | } 100 | }} 101 | @if (groups != null) 102 | { 103 | @foreach (var group in groups) 104 | { 105 | 106 | @if (group.LoginName == Configuration["AdminGroup"]) 107 | { 108 | 109 | } 110 | }} 111 | 112 |
113 | 114 | 115 | 116 | @code { 117 | List groups = new List(); 118 | 119 | protected override async Task OnInitializedAsync() 120 | { 121 | HttpClient Http = new HttpClient(); 122 | Root root = new Root(); 123 | root.Groups = new List(); 124 | Http.DefaultRequestHeaders.Add("Accept", "application/json"); 125 | string temp = await Http.GetStringAsync(Navigator.BaseUri + Configuration["BaseURL"] + "_api/web/currentuser?$expand=groups"); 126 | root = JsonConvert.DeserializeObject(temp); 127 | //Setting Global Variables 128 | Settings.Id = root.Id; 129 | Settings.LoginName = root.LoginName; 130 | Settings.Title = root.Title; 131 | Settings.Groups = root.Groups; 132 | groups = root.Groups; 133 | StateHasChanged(); 134 | } 135 | } 136 | -------------------------------------------------------------------------------- /Pages/Log.razor: -------------------------------------------------------------------------------- 1 | @page "/default.aspx/log" 2 | @page "/default.aspx/log/{Id:int}" 3 | @using Newtonsoft.Json; 4 | @using Models; 5 | @using Workers; 6 | @inject IJSRuntime jsRun 7 | 8 | @if (value != null) 9 | { 10 |
11 |
12 |

Log: #@value.Title

13 |
14 |
15 | 16 |
17 |
18 |
19 |
20 | Visitor Details 21 |
22 |
23 | 24 | 25 |
26 |
27 | 28 | 29 |
30 |
31 | @if (value.VisitorType == "Employee") 32 | {} 33 | else 34 | {} 35 | 36 |
37 |
38 |
39 | Contact Details 40 |
41 |
42 | 43 | 44 |
45 |
46 |
47 |
48 | 49 | 50 |
51 |
52 | 53 | 54 |
55 |
56 | 57 | 58 |
59 |
60 |
61 |
62 | Check-In And Check-Out Details 63 |
64 |
65 | 66 | 67 |
68 |
69 | 70 | 71 |
72 |
73 |
74 |
75 | 76 | 77 |
78 |
79 | 80 | 81 |
82 |
83 |
84 |
85 | 86 | 87 |
88 |
89 | 90 |
91 | @if (value.Attachments) 92 | { 93 |
94 | Attachments 95 | 96 | 97 | @foreach (AttachmentFiles itemFile in value.AttachmentFiles) 98 | { 99 | 100 | } 101 | 102 |
@itemFile.FileName
103 |
104 | } 105 | else 106 | { 107 | @if (value.AttachmentUrl != null) 108 | { 109 |
110 | Attachment By URL 111 | 112 | 113 | 114 | 115 |
@value.AttachmentUrl.Description
116 |
117 | } 118 | } 119 |
120 | } 121 | 122 | @code { 123 | [Parameter] 124 | public int Id { get; set; } 125 | private Value value; 126 | //private AttachmentFiles file = new AttachmentFiles(); 127 | //private bool authorized = true; 128 | 129 | protected override async Task OnParametersSetAsync() 130 | { 131 | string response = string.Empty; 132 | HttpClient Http = new HttpClient(); 133 | Http.DefaultRequestHeaders.Add("Accept", "application/json"); 134 | response = await Http.GetStringAsync(Navigator.BaseUri + Configuration["BaseURL"] + "_api/web/lists(guid'" + Configuration["LogListGuid"] + "')/items(" + Id + ")?$select=*,AttachmentFiles/ServerRelativeUrl,AttachmentFiles/FileName,Employee/Title,Employee/EMail,Employee/UserName,Employee/WorkPhone,Employee/Office,Employee/Department&$expand=AttachmentFiles,Employee"); 135 | value = new Value(); 136 | value.AttachmentFiles = new List(); 137 | value.AttachmentUrl = new AttachmentUrl(); 138 | //value.Employee = new Employee(); 139 | value = JsonConvert.DeserializeObject(response); 140 | //if (!await AuthorizedAsync(Configuration["AdminGroup"])) 141 | // authorized = false; 142 | StateHasChanged(); 143 | } 144 | 145 | private string GetDuration(DateTime? cin, DateTime? cout) { 146 | return cout.GetValueOrDefault().Subtract(cin.GetValueOrDefault()).ToString(); 147 | } 148 | 149 | private async Task OnPrintAsync() 150 | { 151 | bool x = await jsRun.InvokeAsync("printContent"); 152 | } 153 | } 154 | -------------------------------------------------------------------------------- /Pages/Logs.razor: -------------------------------------------------------------------------------- 1 | @page "/default.aspx/logs" 2 | @using Workers; 3 | @using Models; 4 | @using Validations; 5 | 6 | @if (authorized) 7 | { 8 |

Logs

9 |
10 | Filter 11 | 12 |
13 | 14 |
15 | 16 | 17 | 18 |
19 |
20 |
21 | 22 | 23 | 24 |
25 |
26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 |
35 |
36 | 37 |
38 | 39 |
40 |
41 |
42 | 43 | 44 | } 45 | else 46 | { 47 | 48 | } 49 | 50 | 51 | @code { 52 | public Filter _Filter = new Filter(); 53 | public Filter Filter; 54 | private bool authorized = true; 55 | 56 | protected override async Task OnInitializedAsync() 57 | { 58 | if (!await AuthorizedAsync(Configuration["AdminGroup"])) 59 | authorized = false; 60 | else 61 | authorized = true; 62 | StateHasChanged(); 63 | } 64 | 65 | private void SetFilter(bool excel) { 66 | Filter = new Filter() 67 | { 68 | To = _Filter.To, 69 | From = _Filter.From, 70 | Datacenter = _Filter.Datacenter, 71 | ExportExcel = excel 72 | }; 73 | } 74 | 75 | private async Task AuthorizedAsync(string assignTo) 76 | { 77 | var groups = await SPTools.GetMyGroupsAsync(Navigator.BaseUri,Configuration["BaseURL"]); 78 | if (groups != null) 79 | { 80 | foreach (Group group in groups) 81 | { 82 | if (group.LoginName.Equals(assignTo)) 83 | { 84 | //authorized 85 | return true; 86 | } 87 | } 88 | //unauthorized 89 | return false; 90 | } 91 | else 92 | { 93 | //unauthorized 94 | return false; 95 | } 96 | } 97 | } -------------------------------------------------------------------------------- /Pages/LogsDmm.razor: -------------------------------------------------------------------------------- 1 | @page "/default.aspx/dmm/logs" 2 | @using Workers; 3 | @using Models; 4 | @using Validations; 5 | 6 | @if (authorized) 7 | { 8 |

Logs (Dammam)

9 |
10 | Filter 11 | 12 |
13 | 14 |
15 | 16 | 17 | 18 |
19 |
20 |
21 | 22 | 23 | 24 |
25 |
26 | 27 |
28 | 29 |
30 |
31 |
32 | 33 | 34 | } 35 | else 36 | { 37 | 38 | } 39 | 40 | 41 | @code { 42 | public Filter _Filter = new Filter(); 43 | public Filter Filter; 44 | private bool authorized = true; 45 | 46 | protected override async Task OnInitializedAsync() 47 | { 48 | if (!await AuthorizedAsync(Configuration["DmmOpGroup"])) 49 | authorized = false; 50 | else 51 | authorized = true; 52 | StateHasChanged(); 53 | } 54 | 55 | private void SetFilter(bool excel) 56 | { 57 | Filter = new Filter() 58 | { 59 | To = _Filter.To, 60 | From = _Filter.From, 61 | Datacenter = "Dammam", 62 | ExportExcel = excel 63 | }; 64 | } 65 | 66 | private async Task AuthorizedAsync(string assignTo) 67 | { 68 | var groups = await SPTools.GetMyGroupsAsync(Navigator.BaseUri,Configuration["BaseURL"]); 69 | if (groups != null) 70 | { 71 | foreach (Group group in groups) 72 | { 73 | if (group.LoginName.Equals(assignTo)) 74 | { 75 | //authorized 76 | return true; 77 | } 78 | } 79 | //unauthorized 80 | return false; 81 | } 82 | else 83 | { 84 | //unauthorized 85 | return false; 86 | } 87 | } 88 | } -------------------------------------------------------------------------------- /Pages/LogsJed.razor: -------------------------------------------------------------------------------- 1 | @page "/default.aspx/jed/logs" 2 | @using Workers; 3 | @using Models; 4 | @using Validations; 5 | 6 | @if (authorized) 7 | { 8 |

Logs (Jeddah)

9 |
10 | Filter 11 | 12 |
13 | 14 |
15 | 16 | 17 | 18 |
19 |
20 |
21 | 22 | 23 | 24 |
25 |
26 | 27 |
28 | 29 |
30 |
31 |
32 | 33 | 34 | } 35 | else 36 | { 37 | 38 | } 39 | 40 | 41 | @code { 42 | public Filter _Filter = new Filter(); 43 | public Filter Filter; 44 | private bool authorized = true; 45 | 46 | protected override async Task OnInitializedAsync() 47 | { 48 | if (!await AuthorizedAsync(Configuration["JedOpGroup"])) 49 | authorized = false; 50 | else 51 | authorized = true; 52 | StateHasChanged(); 53 | } 54 | 55 | private void SetFilter(bool excel) 56 | { 57 | Filter = new Filter() 58 | { 59 | To = _Filter.To, 60 | From = _Filter.From, 61 | Datacenter = "Jeddah", 62 | ExportExcel = excel 63 | }; 64 | } 65 | 66 | private async Task AuthorizedAsync(string assignTo) 67 | { 68 | var groups = await SPTools.GetMyGroupsAsync(Navigator.BaseUri,Configuration["BaseURL"]); 69 | if (groups != null) 70 | { 71 | foreach (Group group in groups) 72 | { 73 | if (group.LoginName.Equals(assignTo)) 74 | { 75 | //authorized 76 | return true; 77 | } 78 | } 79 | //unauthorized 80 | return false; 81 | } 82 | else 83 | { 84 | //unauthorized 85 | return false; 86 | } 87 | } 88 | } -------------------------------------------------------------------------------- /Pages/LogsRyd.razor: -------------------------------------------------------------------------------- 1 | @page "/default.aspx/ryd/logs" 2 | @using Workers; 3 | @using Models; 4 | @using Validations; 5 | 6 | @if (authorized) 7 | { 8 |

Logs (Riyadh)

9 |
10 | Filter 11 | 12 |
13 | 14 |
15 | 16 | 17 | 18 |
19 |
20 |
21 | 22 | 23 | 24 |
25 |
26 | 27 |
28 | 29 |
30 |
31 |
32 | 33 | 34 | } 35 | else 36 | { 37 | 38 | } 39 | 40 | 41 | @code { 42 | public Filter _Filter = new Filter(); 43 | public Filter Filter; 44 | private bool authorized = true; 45 | 46 | protected override async Task OnInitializedAsync() 47 | { 48 | if (!await AuthorizedAsync(Configuration["RydOpGroup"])) 49 | authorized = false; 50 | else 51 | authorized = true; 52 | StateHasChanged(); 53 | } 54 | 55 | private void SetFilter(bool excel) 56 | { 57 | Filter = new Filter() 58 | { 59 | To = _Filter.To, 60 | From = _Filter.From, 61 | Datacenter = "Riyadh", 62 | ExportExcel = excel 63 | }; 64 | } 65 | 66 | private async Task AuthorizedAsync(string assignTo) 67 | { 68 | var groups = await SPTools.GetMyGroupsAsync(Navigator.BaseUri,Configuration["BaseURL"]); 69 | if (groups != null) 70 | { 71 | foreach (Group group in groups) 72 | { 73 | if (group.LoginName.Equals(assignTo)) 74 | { 75 | //authorized 76 | return true; 77 | } 78 | } 79 | //unauthorized 80 | return false; 81 | } 82 | else 83 | { 84 | //unauthorized 85 | return false; 86 | } 87 | } 88 | } -------------------------------------------------------------------------------- /Pages/Permissions.razor: -------------------------------------------------------------------------------- 1 | @page "/default.aspx/permissions" 2 | @using Models; 3 | @using Workers; 4 | @using Newtonsoft.Json; 5 | @using System.Net; 6 | @using System.Net.Http; 7 | @using System.Net.Http.Headers; 8 | 9 |

Permissions

10 |
11 | Permission Details 12 |
13 |
14 | 15 | 22 |
23 |
24 | @if (groupInfo != null) 25 | { 26 |
27 | Group Information 28 |
29 |
30 |
31 |
Group Name
32 |

@groupInfo.LoginName

33 |
34 |
35 |
Group Owner
36 |

@groupInfo.OwnerTitle

37 |
38 |
39 |
Group Description
40 |

@groupInfo.Description

41 |
42 |
43 |
44 |
45 | } 46 | @if (groupMemebers != null) 47 | { 48 |
49 | Group Members 50 |
51 |
52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | @if (groupMemebers.Count != 0) 62 | { 63 | @foreach (var item in groupMemebers) 64 | { 65 | 66 | 67 | 68 | 69 | } 70 | } 71 | 72 |
MembersEmployee Number
@item.Title@item.LoginName.Split('|')[1]
73 |
74 |
75 |
76 | } 77 |
78 | Add or Remove Members 79 | @if (success == 1) 80 | { 81 | 82 | } 83 | else if (success == 2) 84 | { 85 | 86 | } 87 |
88 | 89 |
90 |
91 |
92 | 93 | 94 |
95 |
96 |
97 |
98 | 99 | @code { 100 | private Root rootGroupInfo = new Root(); 101 | private Root rootGroupMemebers = new Root(); 102 | private List groupMemebers = new List(); 103 | private Value groupInfo = new Value(); 104 | private PeoplePicker peoplePicker = new PeoplePicker(); 105 | private int groupID; 106 | private int success; 107 | 108 | private string selectedGroupName = string.Empty; 109 | 110 | private async Task OnRolesSelectedAsync(ChangeEventArgs roleEvent) 111 | { 112 | selectedGroupName = roleEvent.Value.ToString(); 113 | await LoadGroupInfoAsync(selectedGroupName).ConfigureAwait(false); 114 | } 115 | 116 | private async Task LoadGroupInfoAsync(string loginName) 117 | { 118 | string response = string.Empty; 119 | HttpClient Http = new HttpClient(); 120 | Http.DefaultRequestHeaders.Add("Accept", "application/json"); 121 | response = await Http.GetStringAsync(Navigator.BaseUri + Configuration["BaseURL"] + "_api/web/sitegroups?$filter=LoginName eq '" + loginName + "'"); 122 | rootGroupInfo = JsonConvert.DeserializeObject(response); 123 | groupInfo = rootGroupInfo.value[0]; 124 | if (groupInfo != null) 125 | { 126 | groupID = groupInfo.Id; 127 | await LoadGroupMembersAsync(groupInfo.Id); 128 | } 129 | StateHasChanged(); 130 | } 131 | 132 | private async Task LoadGroupMembersAsync(int Gid) 133 | { 134 | string response = string.Empty; 135 | HttpClient Http = new HttpClient(); 136 | Http.DefaultRequestHeaders.Add("Accept", "application/json"); 137 | response = await Http.GetStringAsync(Navigator.BaseUri + Configuration["BaseURL"] + "_api/web/sitegroups/GetById('" + Gid + "')/Users"); 138 | rootGroupMemebers = JsonConvert.DeserializeObject(response); 139 | groupMemebers = rootGroupMemebers.value; 140 | } 141 | 142 | 143 | private async Task AddEmployeeAsync() 144 | { 145 | HttpClient Http = new HttpClient(); 146 | string data = @"" + 147 | @"" + 148 | "" + 149 | "" + 150 | @"" + 151 | "" + groupInfo.LoginName + "" + 152 | "" + peoplePicker.loginName + "" + 153 | "" + 154 | "" + 155 | ""; 156 | StringContent queryString = new StringContent(data); 157 | queryString.Headers.ContentType = new MediaTypeHeaderValue("application/soap+xml"); 158 | var response = await Http.PostAsync(Navigator.BaseUri + Configuration["BaseURL"] + "_vti_bin/usergroup.asmx", queryString); 159 | if (response.StatusCode == HttpStatusCode.OK) 160 | { 161 | success = 1; 162 | await LoadGroupInfoAsync(selectedGroupName).ConfigureAwait(false); 163 | } 164 | else 165 | { 166 | success = 2; 167 | } 168 | StateHasChanged(); 169 | } 170 | 171 | private async Task RemoveEmployeeAsync() 172 | { 173 | HttpClient Http = new HttpClient(); 174 | string data = @"" + 175 | @"" + 176 | "" + 177 | "" + 178 | @"" + 179 | "" + groupInfo.LoginName + "" + 180 | "" + peoplePicker.loginName + "" + 181 | "" + 182 | "" + 183 | ""; 184 | StringContent queryString = new StringContent(data); 185 | queryString.Headers.ContentType = new MediaTypeHeaderValue("application/soap+xml"); 186 | var response = await Http.PostAsync(Navigator.BaseUri + Configuration["BaseURL"] + "_vti_bin/usergroup.asmx", queryString); 187 | if (response.StatusCode == HttpStatusCode.OK) 188 | { 189 | success = 1; 190 | await LoadGroupInfoAsync(selectedGroupName).ConfigureAwait(false); 191 | } 192 | else 193 | { 194 | success = 2; 195 | } 196 | StateHasChanged(); 197 | } 198 | 199 | private async Task AuthorizedAsync(string assignTo) 200 | { 201 | var groups = await SPTools.GetMyGroupsAsync(Navigator.BaseUri,Configuration["BaseURL"]); 202 | if (groups != null) 203 | { 204 | foreach (Group group in groups) 205 | { 206 | if (group.LoginName.Equals(assignTo)) 207 | { 208 | //authorized 209 | return true; 210 | } 211 | } 212 | //unauthorized 213 | return false; 214 | } 215 | else 216 | { 217 | //unauthorized 218 | return false; 219 | } 220 | } 221 | } -------------------------------------------------------------------------------- /Pages/Smj.razor: -------------------------------------------------------------------------------- 1 | @page "/default.aspx/smj" 2 |
3 |
4 |
5 |
6 | 7 |
8 |

SEC Datacenter

9 |
10 |
11 |
12 |
13 |

14 | Developed By 15 | Mohammed Syed 16 |

17 |
18 | @code { 19 | 20 | } 21 | -------------------------------------------------------------------------------- /Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Net.Http; 3 | using System.Collections.Generic; 4 | using System.Threading.Tasks; 5 | using System.Text; 6 | using Microsoft.AspNetCore.Components.WebAssembly.Hosting; 7 | using Microsoft.Extensions.Configuration; 8 | using Microsoft.Extensions.DependencyInjection; 9 | using Microsoft.Extensions.Logging; 10 | 11 | namespace dc 12 | { 13 | public class Program 14 | { 15 | public static async Task Main(string[] args) 16 | { 17 | var builder = WebAssemblyHostBuilder.CreateDefault(args); 18 | builder.RootComponents.Add("app"); 19 | 20 | builder.Services.AddTransient(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) }); 21 | 22 | await builder.Build().RunAsync(); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Properties/PublishProfiles/smj-work.pubxml: -------------------------------------------------------------------------------- 1 |  2 | 5 | 6 | 7 | True 8 | False 9 | True 10 | Release 11 | Any CPU 12 | FileSystem 13 | C:\Users\2073923019\source\release\dc 14 | FileSystem 15 | 16 | netstandard2.1 17 | 9f05ae86-7a09-4f58-8b07-99b63346be5b 18 | 19 | -------------------------------------------------------------------------------- /Properties/PublishProfiles/smj-zen.pubxml: -------------------------------------------------------------------------------- 1 |  2 | 5 | 6 | 7 | True 8 | False 9 | True 10 | Release 11 | Any CPU 12 | FileSystem 13 | C:\Users\smj\source\release\dc 14 | FileSystem 15 | 16 | netstandard2.1 17 | 9f05ae86-7a09-4f58-8b07-99b63346be5b 18 | 19 | -------------------------------------------------------------------------------- /Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:62801", 7 | "sslPort": 0 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", 15 | "environmentVariables": { 16 | "ASPNETCORE_ENVIRONMENT": "Development" 17 | } 18 | }, 19 | "dc": { 20 | "commandName": "Project", 21 | "launchBrowser": true, 22 | "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", 23 | "applicationUrl": "http://localhost:5000", 24 | "environmentVariables": { 25 | "ASPNETCORE_ENVIRONMENT": "Development" 26 | } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Blazor for SharePoint 2 | BlazorPoint is Blazor(Client Side) on SharePoint 3 | 4 | This is a sample project to help you get started with hosting blazor on SharePoint Pages, Completely Client Side. 5 | This Project is an experimental project, still missng authorizations and other cool stuff which will be added later on. 6 | 7 | This Project Contains Components such as: 8 | - Insert data into lists using forms 9 | - uploading attachments to list item 10 | - people picker 11 | - lookup lists 12 | - tables to list items with search 13 | - repeat section to add data to another list 14 | 15 | and lots more will be added as soon as published. 16 | 17 | Steps to set up and running, you will need [https://dot.net] 18 | 19 | 20 | ## Step 1: 21 | 22 | Create your project using this below command 23 | 24 | `dotnet new blazorwasm -o [YourProjectName]` 25 | `cd [YourProjectName]/wwwroot` 26 | 27 | Now, rename your _index.html_ file to any file name with _.aspx_ 28 | 29 | Example: 30 | `index.html` 31 | to 32 | `default.aspx` 33 | 34 | ## Step 2: 35 | Determine your site collection root path. 36 | 37 | for example if you are using . sharepoint site collection with root name http://[your_site].com/ . or 38 | "http:/[your_site].com/sites/example" 39 | 40 | either way edit your _default.aspx_ file to reflect the base meta tag 41 | 42 | Example: 43 | 44 | for root path 45 | `` 46 | 47 | for _sites/example_ path 48 | `` 49 | 50 | if you are hosting in _Pages_ Library 51 | `` 52 | 53 | ## Step 3: 54 | 55 | Allow .json in Central admin then 56 | 57 | `Manage WebApp -> Block Types -> Remove json-> save` 58 | 59 | Modify your Web Applications Web.Config and add or replace this line if it already exists. 60 | 61 | `` 62 | 63 | if you want to allow .json file only on pages library 64 | 65 | change path attribute to `path="/Pages/*.json"` 66 | 67 | ## Step 4: 68 | 69 | Making your default.aspx as welcome page. 70 | 71 | Navigate to `Site Settings -> Welcome Page` in your site collection, if you don't see this option enable 72 | site collection feature `SharePoint Server Publishing Infrastructure` 73 | 74 | Then enable `SharePoint Server Publishing` in site feature 75 | 76 | ## Demo 77 | 78 | Demo Project: Datacenter Visitor Log. 79 | 80 | 1) Import List Template in ListTemplate Folder 81 | 2) Change List Guid & List Type in Contants/Settings.cs File 82 | 3) Create SharePoint Groups Named As (Admins,DC-OP-Jeddah,DC-OP-Dammam,DC-OP-Riyadh) 83 | 84 | ![BlazorPoint](demo.gif) 85 | 86 | ## Contributors 87 | 88 | - Syed Mohammed Jafary 89 | -------------------------------------------------------------------------------- /Shared/AlertBar.razor: -------------------------------------------------------------------------------- 1 |  7 | 8 | @code { 9 | [Parameter] 10 | public string PrimaryMessage { get; set; } 11 | [Parameter] 12 | public string SecondaryMessage { get; set; } 13 | [Parameter] 14 | public string Type { get; set; } 15 | } 16 | -------------------------------------------------------------------------------- /Shared/CheckOut.razor: -------------------------------------------------------------------------------- 1 | @using Microsoft.JSInterop; 2 | @using Newtonsoft.Json; 3 | @using Models; 4 | @using Workers; 5 | @using System.Net; 6 | @using System.Net.Http; 7 | @using System.Net.Http.Headers; 8 | @using System.Threading; 9 | @inject IJSRuntime jsRun 10 | 11 |
12 | @if (values != null) 13 | { 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | @foreach (var report in values) 30 | { 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | } 43 | 44 |
#Visitor NumberVisitor TypeNameIdentity NumberCompanyCheckInDurationCheckOut
@report.Id@report.Title@report.VisitorType@report.FullName@report.IdentityNumber@report.Company@(report.CheckIn != null ? report.CheckIn?.ToLocalTime().ToString() : "")@(DateTime.Now.ToLocalTime().Subtract(report.CheckIn.GetValueOrDefault().ToLocalTime()).ToString())
45 | } 46 | else 47 | { 48 | 49 | } 50 |
51 |
52 | @code { 53 | [Parameter] 54 | public string Filter { get; set; } 55 | [Parameter] 56 | public string Region { get; set; } 57 | private Root root = new Root(); 58 | private List values; 59 | private List _values = new List(); 60 | private Employee Employee = new Employee(); 61 | private int count = 1; 62 | 63 | protected override async Task OnInitializedAsync() 64 | { 65 | var timer = new Timer(new TimerCallback(_ => 66 | { 67 | if (count <= 0) return; 68 | count++; 69 | 70 | // Note that the following line is necessary because otherwise 71 | // Blazor would not recognize the state change and not refresh the UI 72 | ReloadTableAsync().ConfigureAwait(false); 73 | }), null, 5000, 5000); 74 | await Task.FromResult(0); 75 | } 76 | 77 | protected override async Task OnParametersSetAsync() 78 | { 79 | await SetTableAsync(); 80 | } 81 | 82 | private async Task SetTableAsync() 83 | { 84 | _values.Clear(); 85 | values = null; 86 | bool x = await jsRun.InvokeAsync("dataTableDestroy"); 87 | await GetMyReportsAsync(Region); 88 | values = new List(); 89 | values = _values; 90 | StateHasChanged(); 91 | bool y = await jsRun.InvokeAsync("dataTableCreate"); 92 | } 93 | 94 | private async Task ReloadTableAsync() { 95 | _values.Clear(); 96 | values = null; 97 | await GetMyReportsAsync(Region); 98 | values = new List(); 99 | values = _values; 100 | StateHasChanged(); 101 | bool y = await jsRun.InvokeAsync("dataTableReload"); 102 | } 103 | 104 | private async Task GetMyReportsAsync(string _filter) 105 | { 106 | string response = string.Empty; 107 | string url = string.Empty; 108 | HttpClient Http = new HttpClient(); 109 | Http.DefaultRequestHeaders.Add("Accept", "application/json"); 110 | if (_filter != null) 111 | url = "_api/web/lists(guid'" + Configuration["LogListGuid"] + "')/items?$orderby=ID desc&$top=5000&$filter= Datacenter eq '" + _filter + "' and Status eq 'Checked-In'"; 112 | else 113 | url = "_api/web/lists(guid'" + Configuration["LogListGuid"] + "')/items?$orderby=ID desc&$top=5000&$filter= Status eq 'Checked-In'"; 114 | response = await Http.GetStringAsync(Navigator.BaseUri + Configuration["BaseURL"] + url); 115 | root = JsonConvert.DeserializeObject(response); 116 | _values = root.value; 117 | } 118 | 119 | private async Task CheckOutVisitor(int Id) 120 | { 121 | HttpClient Http = new HttpClient(); 122 | Http.DefaultRequestHeaders.Add("Accept", "application/json"); 123 | Http.DefaultRequestHeaders.Add("X-RequestDigest", await SPTools.GetDigestAsync(Navigator.BaseUri,Configuration["BaseURL"])); 124 | Http.DefaultRequestHeaders.Add("IF-MATCH", "*"); 125 | Http.DefaultRequestHeaders.Add("X-HTTP-Method", "MERGE"); 126 | Item data = new Item(); 127 | Metadata metadata = new Metadata(); 128 | metadata.Type = Configuration["LogListType"]; 129 | data.Metadata = metadata; 130 | data.CheckOut = DateTime.UtcNow; 131 | data.Status = "Checked-Out"; 132 | var myContent = JsonConvert.SerializeObject(data); 133 | var buffer = System.Text.Encoding.UTF8.GetBytes(myContent); 134 | var byteContent = new ByteArrayContent(buffer); 135 | var mediaType = new MediaTypeWithQualityHeaderValue("application/json"); 136 | MediaTypeWithQualityHeaderValue.TryParse("application/json;odata=verbose", out mediaType); 137 | byteContent.Headers.ContentType = mediaType; 138 | var response = await Http.PostAsync(Navigator.BaseUri + Configuration["BaseURL"] + "_api/web/lists(guid'" + Configuration["LogListGuid"] + "')/items('" + Id + "')", byteContent); 139 | if (response.StatusCode == HttpStatusCode.NoContent) 140 | { 141 | //bool x = await jsRun.InvokeAsync("alertx"); 142 | //Navigator.NavigateTo("default.aspx/meter/workflow/" + id); 143 | Console.WriteLine("Success"); 144 | } 145 | else 146 | { 147 | Console.WriteLine("Failed to Check-Out" + " : " + JsonConvert.SerializeObject(data)); 148 | } 149 | } 150 | } 151 | -------------------------------------------------------------------------------- /Shared/Header.razor: -------------------------------------------------------------------------------- 1 |  13 | 14 | @code { 15 | [Parameter] 16 | public string SubHeading { get; set; } 17 | [Parameter] 18 | public string Parameter { get; set; } 19 | } 20 | -------------------------------------------------------------------------------- /Shared/LiveStats.razor: -------------------------------------------------------------------------------- 1 | @using Microsoft.JSInterop; 2 | @using Newtonsoft.Json; 3 | @using Models; 4 | @using Workers; 5 | @using System.Net; 6 | @using System.Net.Http; 7 | @using System.Net.Http.Headers; 8 | @using System.Threading; 9 | 10 |
11 |
12 |
13 | Riyadh Datacenter 14 |
15 | Loading... 16 |
17 |
18 |
19 |
Total Checked-In: @Ryd
20 |
21 |
22 | 23 |
24 |
25 | Dammam Datacenter 26 |
27 | Loading... 28 |
29 |
30 |
31 |
Total Checked-In: @Dmm
32 |
33 |
34 | 35 |
36 |
37 | Jeddah Datacenter 38 |
39 | Loading... 40 |
41 |
42 |
43 |
Total Checked-In: @Jed
44 |
45 |
46 |
47 | @code { 48 | private Root root = new Root(); 49 | private int count = 1; 50 | private int Jed,Dmm,Ryd; 51 | 52 | protected override async Task OnInitializedAsync() 53 | { 54 | var timer = new Timer(new TimerCallback(_ => 55 | { 56 | if (count <= 0) return; 57 | count++; 58 | 59 | // Note that the following line is necessary because otherwise 60 | // Blazor would not recognize the state change and not refresh the UI 61 | GetCheckedInAsync("Jeddah").ConfigureAwait(false); 62 | GetCheckedInAsync("Riyadh").ConfigureAwait(false); 63 | GetCheckedInAsync("Dammam").ConfigureAwait(false); 64 | StateHasChanged(); 65 | }), null, 5000, 5000); 66 | await Task.FromResult(0); 67 | } 68 | 69 | private async Task GetCheckedInAsync(string _filter) 70 | { 71 | string response = string.Empty; 72 | string url = string.Empty; 73 | HttpClient Http = new HttpClient(); 74 | Http.DefaultRequestHeaders.Add("Accept", "application/json"); 75 | if (_filter != null) 76 | url = "_api/web/lists(guid'" + Configuration["LogListGuid"] + "')/items?$orderby=ID desc&$top=1000&$filter= Datacenter eq '" + _filter + "' and Status eq 'Checked-In'"; 77 | else 78 | url = "_api/web/lists(guid'" + Configuration["LogListGuid"] + "')/items?$orderby=ID desc&$top=1000&$filter= Status eq 'Checked-In'"; 79 | response = await Http.GetStringAsync(Navigator.BaseUri + Configuration["BaseURL"] + url); 80 | root = JsonConvert.DeserializeObject(response); 81 | if(_filter == "Jeddah") 82 | Jed = root.value.Count; 83 | if(_filter == "Riyadh") 84 | Ryd = root.value.Count; 85 | if(_filter == "Dammam") 86 | Dmm = root.value.Count; 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /Shared/Loading.razor: -------------------------------------------------------------------------------- 1 | 
2 |
3 | Loading... 4 |
5 |
6 | Loading... 7 |
8 |
9 | Loading... 10 |
11 |
-------------------------------------------------------------------------------- /Shared/MainLayout.razor: -------------------------------------------------------------------------------- 1 | @inherits LayoutComponentBase 2 | 3 | 6 | 7 |
8 |
9 | @*About*@ 10 |
11 | 12 |
13 | @Body 14 |
15 |
16 | -------------------------------------------------------------------------------- /Shared/MyLogs.razor: -------------------------------------------------------------------------------- 1 | @using Microsoft.JSInterop; 2 | @using Newtonsoft.Json; 3 | @using Models; 4 | @using Validations; 5 | @using Workers; 6 | @inject IJSRuntime jsRun 7 | 8 |
9 | @if (values != null) 10 | { 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | @foreach (var report in values) 28 | { 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | } 42 | 43 |
#Visitor NumberVisitor TypeNameIdentity NumberCompanyDatacenterCheckInCheckOutDuration
@report.Id@report.Title@report.VisitorType@report.FullName@report.IdentityNumber@report.Company@report.Datacenter@(report.CheckIn != null ? report.CheckIn?.ToLocalTime().ToString() : "")@(report.CheckOut != null ? report.CheckOut?.ToLocalTime().ToString() : "")@(report.CheckOut.GetValueOrDefault().Subtract(report.CheckIn.GetValueOrDefault()).ToString())
44 | } 45 | else 46 | { 47 | 48 | } 49 |
50 |
51 | @code { 52 | [Parameter] 53 | public string Datacenter { get; set; } 54 | [Parameter] 55 | public Filter Filter { get; set; } 56 | private Root root = new Root(); 57 | private List values; 58 | private List _values = new List(); 59 | //Filter 60 | string filter_response = string.Empty; 61 | private HttpClient FilterHttp = new HttpClient(); 62 | private string filter_url; 63 | 64 | protected override async Task OnParametersSetAsync() 65 | { 66 | _values.Clear(); 67 | values = null; 68 | bool x = await jsRun.InvokeAsync("dataTableDestroy1"); 69 | if (Filter != null) { 70 | await GetFilterReportsAsync(Filter); 71 | if (Filter.ExportExcel) { 72 | Export export = new Export(); 73 | var excelBytes = export.WriteExcel("DatacenterVisitorLog",_values); 74 | await jsRun.SaveAs(excelBytes); 75 | } 76 | } 77 | else 78 | await GetMyReportsAsync(Datacenter); 79 | values = new List(); 80 | values = _values; 81 | StateHasChanged(); 82 | bool y = await jsRun.InvokeAsync("dataTableCreate1"); 83 | } 84 | 85 | private async Task GetMyReportsAsync(string datacenter) 86 | { 87 | string response = string.Empty; 88 | string url = string.Empty; 89 | HttpClient Http = new HttpClient(); 90 | Http.DefaultRequestHeaders.Add("Accept", "application/json"); 91 | if (datacenter != null && datacenter != "") 92 | url = "_api/web/lists(guid'" + Configuration["LogListGuid"] + "')/items?$orderby=ID desc&$top=250&$filter= Datacenter eq '" + datacenter + "' and Status eq 'Checked-Out'"; 93 | else 94 | url = "_api/web/lists(guid'" + Configuration["LogListGuid"] + "')/items?$orderby=ID desc&$top=250&$filter= Status eq 'Checked-Out'"; 95 | response = await Http.GetStringAsync(Navigator.BaseUri + Configuration["BaseURL"] + url); 96 | root = JsonConvert.DeserializeObject(response); 97 | _values = root.value; 98 | } 99 | 100 | private async Task GetFilterReportsAsync(Filter filter) { 101 | if (filter.Datacenter != null && filter.Datacenter != "") 102 | filter_url = Navigator.BaseUri + Configuration["BaseURL"] + "_api/web/lists(guid'" + Configuration["LogListGuid"] + "')/items?$top=5000&$filter=(Created ge datetime'"+Filter.From.ToLocalTime().ToUniversalTime().ToString("o")+"') and (Created le datetime'"+Filter.To.ToLocalTime().ToUniversalTime().ToString("o")+"') and Datacenter eq '"+Filter.Datacenter+"'and Status eq 'Checked-Out'"; 103 | else 104 | filter_url = Navigator.BaseUri + Configuration["BaseURL"] + "_api/web/lists(guid'" + Configuration["LogListGuid"] + "')/items?$top=5000&$filter=(Created ge datetime'"+Filter.From.ToLocalTime().ToUniversalTime().ToString("o")+"') and (Created le datetime'"+Filter.To.ToLocalTime().ToUniversalTime().ToString("o")+"') and Status eq 'Checked-Out'"; 105 | FilterHttp.DefaultRequestHeaders.Add("Accept", "application/json"); 106 | await FilterHelperAsync(); 107 | } 108 | 109 | private async Task FilterHelperAsync() { 110 | filter_response = await FilterHttp.GetStringAsync(filter_url); 111 | root = JsonConvert.DeserializeObject(filter_response); 112 | _values.AddRange(root.value); 113 | 114 | if (root.OdataNextLink != null) 115 | { 116 | filter_url = root.OdataNextLink; 117 | await FilterHelperAsync(); 118 | } 119 | } 120 | } 121 | -------------------------------------------------------------------------------- /Shared/NavMenu.razor: -------------------------------------------------------------------------------- 1 | @using Models; 2 | @using Newtonsoft.Json; 3 | @using System.Net.Http; 4 | 5 | 10 |
11 | logo 12 |
13 |
14 |
15 |
16 |

Datacenter Visitor Log

17 |
18 |
19 |
20 | 21 |
22 |
23 |

@username

24 | @if (groups != null && groups.Count > 0) 25 | { 26 |

@groups[0].Description

27 | } 28 |
29 |
30 | 31 |
32 | 98 |
99 | 100 | @code { 101 | bool collapseNavMenu = true; 102 | string username = ""; 103 | List groups = new List(); 104 | string NavMenuCssClass => collapseNavMenu ? "collapse" : null; 105 | 106 | void ToggleNavMenu() 107 | { 108 | collapseNavMenu = !collapseNavMenu; 109 | } 110 | 111 | protected override async Task OnInitializedAsync() 112 | { 113 | HttpClient Http = new HttpClient(); 114 | Root root = new Root(); 115 | 116 | root.Groups = new List(); 117 | Http.DefaultRequestHeaders.Add("Accept", "application/json"); 118 | string temp = await Http.GetStringAsync(Navigator.BaseUri + Configuration["BaseURL"] + "_api/web/currentuser?$expand=groups"); 119 | root = JsonConvert.DeserializeObject(temp); 120 | //Setting Global Variables 121 | Settings.Id = root.Id; 122 | Settings.LoginName = root.LoginName; 123 | Settings.Title = root.Title; 124 | Settings.Groups = root.Groups; 125 | groups = root.Groups; 126 | username = root.Title; 127 | StateHasChanged(); 128 | } 129 | } -------------------------------------------------------------------------------- /Shared/NotAutorized.razor: -------------------------------------------------------------------------------- 1 | 
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | 10 |
11 |

SEC Datacenter

12 |
13 |

You are not Authorized to access this page

14 |

15 | Contact Administrators for more Information. 16 |

17 |
18 |
-------------------------------------------------------------------------------- /Shared/PeoplePicker.razor: -------------------------------------------------------------------------------- 1 | @using Models; 2 | @using Workers; 3 | @using Newtonsoft.Json; 4 | @using System.Net.Http; 5 | 6 | 7 |
8 | 9 | 10 |
11 | 12 |
13 |
14 | 15 | @code{ 16 | [Parameter] public string Label { get; set; } = ""; 17 | string name { get; set; } = ""; 18 | public int empId { get; set; } 19 | public string loginName { get; set; } 20 | public string userInput { get; set; } 21 | private Root root { get; set; } 22 | private string digest { get; set; } = ""; 23 | string validation { get; set; } = ""; 24 | 25 | private async Task getUserListAsync() 26 | { 27 | 28 | if (name != "") 29 | { 30 | HttpClient Http = new HttpClient(); 31 | string url = Navigator.BaseUri + Configuration["BaseURL"]; 32 | Http.DefaultRequestHeaders.Add("Accept", "application/json"); 33 | Http.DefaultRequestHeaders.Add("X-RequestDigest", await SPTools.GetDigestAsync(Navigator.BaseUri,Configuration["BaseURL"])); 34 | var response = await Http.PostAsync(url + "_api/web/ensureuser('" + name + "')", null); 35 | if ((int)response.StatusCode == 200) 36 | { 37 | root = JsonConvert.DeserializeObject(await response.Content.ReadAsStringAsync()); 38 | empId = root.Id; 39 | loginName = root.LoginName; 40 | userInput = name; 41 | name = root.Title; 42 | CalculateValidation(); 43 | } 44 | else 45 | { 46 | empId = 0; 47 | loginName = ""; 48 | userInput = ""; 49 | CalculateValidation(); 50 | } 51 | } 52 | StateHasChanged(); 53 | } 54 | 55 | public void CalculateValidation() 56 | { 57 | if (empId > 0) 58 | { 59 | validation = "is-valid"; 60 | } 61 | else 62 | { 63 | validation = "is-invalid"; 64 | } 65 | StateHasChanged(); 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /Shared/Popup.razor: -------------------------------------------------------------------------------- 1 |  2 | 20 | @code { 21 | [Parameter] 22 | public string Title { get; set; } 23 | [Parameter] 24 | public string Message { get; set; } 25 | } -------------------------------------------------------------------------------- /Validations/CheckInEmployee.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel.DataAnnotations; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | 7 | namespace dc.Validations 8 | { 9 | public class CheckInEmployee 10 | { 11 | [Required(ErrorMessage = "Purpose of Visit field is required.")] 12 | public string PoV { get; set; } 13 | public string Datacenter { get; set; } 14 | public DateTime CheckIn { get; set; } 15 | public string VisitorType { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Validations/CheckInNonEmployee.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel.DataAnnotations; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | 7 | namespace dc.Validations 8 | { 9 | public class CheckInNonEmployee 10 | { 11 | [Required(ErrorMessage = "Purpose of Visit field is required.")] 12 | public string PoV { get; set; } 13 | [Required(ErrorMessage = "National ID field is required.")] 14 | public string NationalID { get; set; } 15 | [Required(ErrorMessage = "Name field is required.")] 16 | public string FullName { get; set; } 17 | [Required(ErrorMessage = "Contact Number field is required.")] 18 | [Phone] 19 | public string ContactNumber { get; set; } 20 | //[Required(ErrorMessage = "Work Email field is required.")] 21 | [EmailAddress] 22 | public string WorkEmail { get; set; } 23 | [Required] 24 | public string Company { get; set; } 25 | public string Datacenter { get; set; } 26 | public DateTime CheckIn { get; set; } 27 | public string VisitorType { get; set; } 28 | public string AttachmentURL { get; set; } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Validations/Filter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using System.ComponentModel.DataAnnotations; 6 | 7 | namespace dc.Validations 8 | { 9 | public class Filter : IValidatableObject 10 | { 11 | [Required(ErrorMessage = "From Date is Required.")] 12 | public DateTime From { get; set; } = DateTime.Today.Date; 13 | [Required(ErrorMessage = "To Date is Required.")] 14 | public DateTime To { get; set; } = DateTime.Today.Date.AddDays(1); 15 | public string Datacenter { get; set; } 16 | public bool ExportExcel { get; set; } = false; 17 | public IEnumerable Validate(ValidationContext validationContext) 18 | { 19 | if (From > To) 20 | { 21 | yield return 22 | new ValidationResult(errorMessage: "\"From\" Date must be less than \"To\" Date", 23 | memberNames: new[] { "To" }); 24 | } 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Workers/Export.cs: -------------------------------------------------------------------------------- 1 | using dc.Models; 2 | using System.Collections.Generic; 3 | using OfficeOpenXml; 4 | using OfficeOpenXml.Style; 5 | 6 | namespace dc.Workers 7 | { 8 | public class Export 9 | { 10 | public byte[] WriteExcel(string SheetName, List values) { 11 | // Creating an instance 12 | // of ExcelPackage 13 | ExcelPackage excel = new ExcelPackage(); 14 | // name of the sheet 15 | var workSheet = excel.Workbook.Worksheets.Add(SheetName); 16 | // setting the properties 17 | // of the work sheet 18 | workSheet.TabColor = System.Drawing.Color.FromName("#1e4691"); 19 | workSheet.DefaultRowHeight = 12; 20 | 21 | // Setting the properties 22 | // of the first row 23 | workSheet.Row(1).Height = 20; 24 | workSheet.Row(1).Style.HorizontalAlignment = ExcelHorizontalAlignment.Center; 25 | workSheet.Row(1).Style.Font.Bold = true; 26 | 27 | // Header of the Excel sheet 28 | workSheet.Cells[1, 1].Value = "S.No"; 29 | workSheet.Cells[1, 2].Value = "Visitor Id"; 30 | workSheet.Cells[1, 3].Value = "Visitor Type"; 31 | workSheet.Cells[1, 4].Value = "Identity Number"; 32 | workSheet.Cells[1, 5].Value = "FullName"; 33 | workSheet.Cells[1, 6].Value = "ContactNumber"; 34 | workSheet.Cells[1, 7].Value = "WorkEmail"; 35 | workSheet.Cells[1, 8].Value = "Company"; 36 | workSheet.Cells[1, 9].Value = "CheckIn"; 37 | workSheet.Cells[1, 10].Value = "CheckOut"; 38 | workSheet.Cells[1, 11].Value = "Duration"; 39 | workSheet.Cells[1, 12].Value = "Datacenter"; 40 | workSheet.Cells[1, 13].Value = "Purpose"; 41 | 42 | // Inserting the article data into excel 43 | // sheet by using the for each loop 44 | // As we have values to the first row 45 | // we will start with second row 46 | int recordIndex = 2; 47 | 48 | foreach (var value in values) 49 | { 50 | workSheet.Cells[recordIndex, 1].Value = (recordIndex - 1).ToString(); 51 | workSheet.Cells[recordIndex, 2].Value = value.Title; 52 | workSheet.Cells[recordIndex, 3].Value = value.VisitorType; 53 | workSheet.Cells[recordIndex, 4].Value = value.IdentityNumber; 54 | workSheet.Cells[recordIndex, 5].Value = value.FullName; 55 | workSheet.Cells[recordIndex, 6].Value = value.ContactNumber; 56 | workSheet.Cells[recordIndex, 7].Value = value.WorkEmail; 57 | workSheet.Cells[recordIndex, 8].Value = value.Company; 58 | workSheet.Cells[recordIndex, 9].Value = value.CheckIn.ToString(); 59 | workSheet.Cells[recordIndex, 10].Value = value.CheckOut.ToString(); 60 | workSheet.Cells[recordIndex, 11].Value = value.CheckOut.GetValueOrDefault().Subtract(value.CheckIn.GetValueOrDefault()).ToString(); 61 | workSheet.Cells[recordIndex, 12].Value = value.Datacenter; 62 | workSheet.Cells[recordIndex, 13].Value = value.PoV; 63 | recordIndex++; 64 | } 65 | 66 | // By default, the column width is not 67 | // set to auto fit for the content 68 | // of the range, so we are using 69 | // AutoFit() method here. 70 | //workSheet.Column(1).AutoFit(); 71 | //workSheet.Column(2).AutoFit(); 72 | //workSheet.Column(3).AutoFit(); 73 | 74 | // file name with .xlsx extension 75 | //string p_strPath = "doc\\"+SheetName+".xlsx"; 76 | 77 | //if (File.Exists(p_strPath)) 78 | //File.Delete(p_strPath); 79 | 80 | // Create excel file on physical disk 81 | //FileStream objFileStrm = File.Create(p_strPath); 82 | //objFileStrm.Close(); 83 | 84 | // Write content to excel file 85 | //File.WriteAllBytes(p_strPath, excel.GetAsByteArray()); 86 | //Console.ReadKey(); 87 | 88 | return excel.GetAsByteArray(); 89 | } 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /Workers/JSRuntimeExtentions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.JSInterop; 6 | 7 | namespace dc.Workers 8 | { 9 | public static class JSRuntimeExtentions 10 | { 11 | public static ValueTask SaveAs(this IJSRuntime js, byte[] data) 12 | => js.InvokeVoidAsync( 13 | "smj.interop.saveAsFile", 14 | "DVL-" + DateTime.Now.ToString("ddMMyyyyHH:mm:ss") + ".xlsx", 15 | Convert.ToBase64String(data)); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Workers/SPTools.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using dc.Models; 3 | using dc.Constants; 4 | using Newtonsoft.Json; 5 | using System.Net.Http; 6 | using System.Collections.Generic; 7 | 8 | namespace dc.Workers 9 | { 10 | 11 | public class SPTools 12 | { 13 | public static async Task GetDigestAsync(string url, string urlBase) 14 | { 15 | HttpClient Http = new HttpClient(); 16 | Http.DefaultRequestHeaders.Add("Accept", "application/json"); 17 | var response = await Http.PostAsync(url + urlBase + "_api/contextinfo", null); 18 | Root root = JsonConvert.DeserializeObject(await response.Content.ReadAsStringAsync()); 19 | return root.FormDigestValue; 20 | } 21 | 22 | public static async Task> GetMyGroupsAsync(string url,string urlBase) 23 | { 24 | List _groups = new List(); 25 | HttpClient Http = new HttpClient(); 26 | Root root = new Root(); 27 | root.Groups = _groups; 28 | Http.DefaultRequestHeaders.Add("Accept", "application/json"); 29 | string temp = await Http.GetStringAsync(url + urlBase + "_api/web/currentuser?$expand=groups"); 30 | root = JsonConvert.DeserializeObject(temp); 31 | return root.Groups; 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /_Imports.razor: -------------------------------------------------------------------------------- 1 | @using System.Net.Http 2 | @using System.Net.Http.Json 3 | @using Microsoft.AspNetCore.Components.Forms 4 | @using Microsoft.AspNetCore.Components.Routing 5 | @using Microsoft.AspNetCore.Components.Web 6 | @using Microsoft.AspNetCore.Components.WebAssembly.Http 7 | @using Microsoft.Extensions.Configuration 8 | @using Microsoft.JSInterop 9 | @using dc 10 | @using dc.Shared 11 | @using dc.Constants 12 | @inject NavigationManager Navigator; 13 | @inject IConfiguration Configuration 14 | -------------------------------------------------------------------------------- /dc.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.1 5 | 3.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /dc.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.30114.105 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "dc", "dc.csproj", "{9F05AE86-7A09-4F58-8B07-99B63346BE5B}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {9F05AE86-7A09-4F58-8B07-99B63346BE5B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {9F05AE86-7A09-4F58-8B07-99B63346BE5B}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {9F05AE86-7A09-4F58-8B07-99B63346BE5B}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {9F05AE86-7A09-4F58-8B07-99B63346BE5B}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {00C183F9-6F38-4769-BEBF-C98F6094B14D} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smj0x/BlazorPoint/536de31e45daa9f809bf7c70f21bc2809022c79c/demo.gif -------------------------------------------------------------------------------- /wwwroot/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "AppName": "Datacenter Visitor Log", 3 | "BaseURL": "../", 4 | "AttachmentURL": "../", 5 | "TasksListGuid": "C8695948-9133-4392-A9D0-97B822288723", 6 | "TaskListName": "Workflow Tasks", 7 | "LogListGuid": "FA478C63-73AF-4DFC-B6FE-F363927FDDD7", 8 | "LogListType": "SP.Data.Log1ListItem", 9 | "AdminGroup": "Admins", 10 | "JedOpGroup": "DC-OP-Jeddah", 11 | "DmmOpGroup": "DC-OP-Dammam", 12 | "RydOpGroup": "DC-OP-Riyadh" 13 | } -------------------------------------------------------------------------------- /wwwroot/css/dataTables.bootstrap4.min.css: -------------------------------------------------------------------------------- 1 | table.dataTable{clear:both;margin-top:6px !important;margin-bottom:6px !important;max-width:none !important;border-collapse:separate !important;border-spacing:0}table.dataTable td,table.dataTable th{-webkit-box-sizing:content-box;box-sizing:content-box}table.dataTable td.dataTables_empty,table.dataTable th.dataTables_empty{text-align:center}table.dataTable.nowrap th,table.dataTable.nowrap td{white-space:nowrap}div.dataTables_wrapper div.dataTables_length label{font-weight:normal;text-align:left;white-space:nowrap}div.dataTables_wrapper div.dataTables_length select{width:auto;display:inline-block}div.dataTables_wrapper div.dataTables_filter{text-align:right}div.dataTables_wrapper div.dataTables_filter label{font-weight:normal;white-space:nowrap;text-align:left}div.dataTables_wrapper div.dataTables_filter input{margin-left:0.5em;display:inline-block;width:auto}div.dataTables_wrapper div.dataTables_info{padding-top:0.85em;white-space:nowrap}div.dataTables_wrapper div.dataTables_paginate{margin:0;white-space:nowrap;text-align:right}div.dataTables_wrapper div.dataTables_paginate ul.pagination{margin:2px 0;white-space:nowrap;justify-content:flex-end}div.dataTables_wrapper div.dataTables_processing{position:absolute;top:50%;left:50%;width:200px;margin-left:-100px;margin-top:-26px;text-align:center;padding:1em 0}table.dataTable thead>tr>th.sorting_asc,table.dataTable thead>tr>th.sorting_desc,table.dataTable thead>tr>th.sorting,table.dataTable thead>tr>td.sorting_asc,table.dataTable thead>tr>td.sorting_desc,table.dataTable thead>tr>td.sorting{padding-right:30px}table.dataTable thead>tr>th:active,table.dataTable thead>tr>td:active{outline:none}table.dataTable thead .sorting,table.dataTable thead .sorting_asc,table.dataTable thead .sorting_desc,table.dataTable thead .sorting_asc_disabled,table.dataTable thead .sorting_desc_disabled{cursor:pointer;position:relative}table.dataTable thead .sorting:before,table.dataTable thead .sorting:after,table.dataTable thead .sorting_asc:before,table.dataTable thead .sorting_asc:after,table.dataTable thead .sorting_desc:before,table.dataTable thead .sorting_desc:after,table.dataTable thead .sorting_asc_disabled:before,table.dataTable thead .sorting_asc_disabled:after,table.dataTable thead .sorting_desc_disabled:before,table.dataTable thead .sorting_desc_disabled:after{position:absolute;bottom:0.9em;display:block;opacity:0.3}table.dataTable thead .sorting:before,table.dataTable thead .sorting_asc:before,table.dataTable thead .sorting_desc:before,table.dataTable thead .sorting_asc_disabled:before,table.dataTable thead .sorting_desc_disabled:before{right:1em;content:"\2191"}table.dataTable thead .sorting:after,table.dataTable thead .sorting_asc:after,table.dataTable thead .sorting_desc:after,table.dataTable thead .sorting_asc_disabled:after,table.dataTable thead .sorting_desc_disabled:after{right:0.5em;content:"\2193"}table.dataTable thead .sorting_asc:before,table.dataTable thead .sorting_desc:after{opacity:1}table.dataTable thead .sorting_asc_disabled:before,table.dataTable thead .sorting_desc_disabled:after{opacity:0}div.dataTables_scrollHead table.dataTable{margin-bottom:0 !important}div.dataTables_scrollBody table{border-top:none;margin-top:0 !important;margin-bottom:0 !important}div.dataTables_scrollBody table thead .sorting:before,div.dataTables_scrollBody table thead .sorting_asc:before,div.dataTables_scrollBody table thead .sorting_desc:before,div.dataTables_scrollBody table thead .sorting:after,div.dataTables_scrollBody table thead .sorting_asc:after,div.dataTables_scrollBody table thead .sorting_desc:after{display:none}div.dataTables_scrollBody table tbody tr:first-child th,div.dataTables_scrollBody table tbody tr:first-child td{border-top:none}div.dataTables_scrollFoot>.dataTables_scrollFootInner{box-sizing:content-box}div.dataTables_scrollFoot>.dataTables_scrollFootInner>table{margin-top:0 !important;border-top:none}@media screen and (max-width: 767px){div.dataTables_wrapper div.dataTables_length,div.dataTables_wrapper div.dataTables_filter,div.dataTables_wrapper div.dataTables_info,div.dataTables_wrapper div.dataTables_paginate{text-align:center}}table.dataTable.table-sm>thead>tr>th{padding-right:20px}table.dataTable.table-sm .sorting:before,table.dataTable.table-sm .sorting_asc:before,table.dataTable.table-sm .sorting_desc:before{top:5px;right:0.85em}table.dataTable.table-sm .sorting:after,table.dataTable.table-sm .sorting_asc:after,table.dataTable.table-sm .sorting_desc:after{top:5px}table.table-bordered.dataTable th,table.table-bordered.dataTable td{border-left-width:0}table.table-bordered.dataTable th:last-child,table.table-bordered.dataTable th:last-child,table.table-bordered.dataTable td:last-child,table.table-bordered.dataTable td:last-child{border-right-width:0}table.table-bordered.dataTable tbody th,table.table-bordered.dataTable tbody td{border-bottom-width:0}div.dataTables_scrollHead table.table-bordered{border-bottom-width:0}div.table-responsive>div.dataTables_wrapper>div.row{margin:0}div.table-responsive>div.dataTables_wrapper>div.row>div[class^="col-"]:first-child{padding-left:0}div.table-responsive>div.dataTables_wrapper>div.row>div[class^="col-"]:last-child{padding-right:0} 2 | -------------------------------------------------------------------------------- /wwwroot/css/responsive.bootstrap4.min.css: -------------------------------------------------------------------------------- 1 | table.dataTable.dtr-inline.collapsed>tbody>tr>td.child,table.dataTable.dtr-inline.collapsed>tbody>tr>th.child,table.dataTable.dtr-inline.collapsed>tbody>tr>td.dataTables_empty{cursor:default !important}table.dataTable.dtr-inline.collapsed>tbody>tr>td.child:before,table.dataTable.dtr-inline.collapsed>tbody>tr>th.child:before,table.dataTable.dtr-inline.collapsed>tbody>tr>td.dataTables_empty:before{display:none !important}table.dataTable.dtr-inline.collapsed>tbody>tr[role="row"]>td:first-child,table.dataTable.dtr-inline.collapsed>tbody>tr[role="row"]>th:first-child{position:relative;padding-left:30px;cursor:pointer}table.dataTable.dtr-inline.collapsed>tbody>tr[role="row"]>td:first-child:before,table.dataTable.dtr-inline.collapsed>tbody>tr[role="row"]>th:first-child:before{top:12px;left:4px;height:14px;width:14px;display:block;position:absolute;color:white;border:2px solid white;border-radius:14px;box-shadow:0 0 3px #444;box-sizing:content-box;text-align:center;text-indent:0 !important;font-family:'Courier New', Courier, monospace;line-height:14px;content:'+';background-color:#0275d8}table.dataTable.dtr-inline.collapsed>tbody>tr.parent>td:first-child:before,table.dataTable.dtr-inline.collapsed>tbody>tr.parent>th:first-child:before{content:'-';background-color:#d33333}table.dataTable.dtr-inline.collapsed.compact>tbody>tr>td:first-child,table.dataTable.dtr-inline.collapsed.compact>tbody>tr>th:first-child{padding-left:27px}table.dataTable.dtr-inline.collapsed.compact>tbody>tr>td:first-child:before,table.dataTable.dtr-inline.collapsed.compact>tbody>tr>th:first-child:before{top:5px;left:4px;height:14px;width:14px;border-radius:14px;line-height:14px;text-indent:3px}table.dataTable.dtr-column>tbody>tr>td.control,table.dataTable.dtr-column>tbody>tr>th.control{position:relative;cursor:pointer}table.dataTable.dtr-column>tbody>tr>td.control:before,table.dataTable.dtr-column>tbody>tr>th.control:before{top:50%;left:50%;height:16px;width:16px;margin-top:-10px;margin-left:-10px;display:block;position:absolute;color:white;border:2px solid white;border-radius:14px;box-shadow:0 0 3px #444;box-sizing:content-box;text-align:center;text-indent:0 !important;font-family:'Courier New', Courier, monospace;line-height:14px;content:'+';background-color:#0275d8}table.dataTable.dtr-column>tbody>tr.parent td.control:before,table.dataTable.dtr-column>tbody>tr.parent th.control:before{content:'-';background-color:#d33333}table.dataTable>tbody>tr.child{padding:0.5em 1em}table.dataTable>tbody>tr.child:hover{background:transparent !important}table.dataTable>tbody>tr.child ul.dtr-details{display:inline-block;list-style-type:none;margin:0;padding:0}table.dataTable>tbody>tr.child ul.dtr-details>li{border-bottom:1px solid #efefef;padding:0.5em 0}table.dataTable>tbody>tr.child ul.dtr-details>li:first-child{padding-top:0}table.dataTable>tbody>tr.child ul.dtr-details>li:last-child{border-bottom:none}table.dataTable>tbody>tr.child span.dtr-title{display:inline-block;min-width:75px;font-weight:bold}div.dtr-modal{position:fixed;box-sizing:border-box;top:0;left:0;height:100%;width:100%;z-index:100;padding:10em 1em}div.dtr-modal div.dtr-modal-display{position:absolute;top:0;left:0;bottom:0;right:0;width:50%;height:50%;overflow:auto;margin:auto;z-index:102;overflow:auto;background-color:#f5f5f7;border:1px solid black;border-radius:0.5em;box-shadow:0 12px 30px rgba(0,0,0,0.6)}div.dtr-modal div.dtr-modal-content{position:relative;padding:1em}div.dtr-modal div.dtr-modal-close{position:absolute;top:6px;right:6px;width:22px;height:22px;border:1px solid #eaeaea;background-color:#f9f9f9;text-align:center;border-radius:3px;cursor:pointer;z-index:12}div.dtr-modal div.dtr-modal-close:hover{background-color:#eaeaea}div.dtr-modal div.dtr-modal-background{position:fixed;top:0;left:0;right:0;bottom:0;z-index:101;background:rgba(0,0,0,0.6)}@media screen and (max-width: 767px){div.dtr-modal div.dtr-modal-display{width:95%}}div.dtr-bs-modal table.table tr:first-child td{border-top:none} 2 | -------------------------------------------------------------------------------- /wwwroot/css/site.css: -------------------------------------------------------------------------------- 1 | /* 2 | SEC Theme 3 | Blue #1e4691 (30,70,145) 4 | Orange #F78F3A (247,143,58) 5 | Grey #828282 (130,130,130) 6 | Dark Blue #192b5c (25,43,92) 7 | Dark Grey #585858 (88,88,88) 8 | */ 9 | /*@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');*/ 10 | 11 | @font-face { 12 | font-family: 'Cascadia'; 13 | src: url('../fonts/Cascadia.ttf'); 14 | src: url('../fonts/Cascadia.ttf') format('truetype'); 15 | font-weight: 300; 16 | font-style: normal; 17 | } 18 | 19 | html, body { 20 | /*font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;*/ 21 | font-family: 'Cascadia', Helvetica, Arial, sans-serif; 22 | } 23 | 24 | app { 25 | position: relative; 26 | display: flex; 27 | flex-direction: column; 28 | } 29 | 30 | .top-row { 31 | height: 3.5rem; 32 | display: flex; 33 | align-items: center; 34 | } 35 | 36 | .main { 37 | flex: 1; 38 | } 39 | 40 | .main .top-row { 41 | background-color: #FFF; 42 | } 43 | 44 | .heading { 45 | font-size: 1.7em; 46 | color: #1e4691; 47 | } 48 | 49 | .heading1 { 50 | font-size: 1.9em; 51 | color: #1e4691; 52 | } 53 | 54 | .sidebar { 55 | /*background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%);*/ 56 | background-color: #1e4691; 57 | overflow-y: auto; 58 | } 59 | 60 | .sidebar .top-row { 61 | background-color: rgba(0,0,0,0); 62 | } 63 | 64 | .sidebar .navbar-brand { 65 | font-size: 1.1rem; 66 | } 67 | 68 | .sidebar .oi { 69 | width: 2rem; 70 | font-size: 1.1rem; 71 | vertical-align: text-top; 72 | top: -2px; 73 | } 74 | 75 | .sidebar .userInfo { 76 | width: 100%; 77 | margin-bottom: 20px; 78 | text-align: center; 79 | } 80 | 81 | .sidebar .userInfo .userAvatar { 82 | display: inline-block; 83 | margin-top: 30px; 84 | background-color: #FFFFFF; 85 | width: 64px; 86 | height: 64px; 87 | border-radius: 50%; 88 | overflow: hidden; 89 | box-shadow: 0 20px 35px rgba(0, 0, 0, 0.2); 90 | } 91 | 92 | .sidebar .userInfo .userAvatar img { 93 | width: 100%; 94 | height: 100%; 95 | } 96 | 97 | .sidebar .userInfo .userAvatar i { 98 | font-size: 3em; 99 | text-align: center; 100 | line-height: 64px; 101 | color: #f78f3a; 102 | } 103 | 104 | .sidebar .userInfo .username { 105 | margin: 20px 0; 106 | } 107 | 108 | .sidebar .userInfo .username h4 { 109 | font-size: 1.3em; 110 | font-weight: bold; 111 | color: #FFFFFF; 112 | } 113 | 114 | .nav-item { 115 | font-size: 0.9rem; 116 | padding-bottom: 0.5rem; 117 | } 118 | 119 | .nav-item:first-of-type { 120 | padding-top: 1rem; 121 | } 122 | 123 | .nav-item:last-of-type { 124 | padding-bottom: 1rem; 125 | } 126 | 127 | .nav-item a { 128 | color: #d7d7d7; 129 | border-radius: 4px; 130 | height: 3rem; 131 | display: flex; 132 | align-items: center; 133 | line-height: 3rem; 134 | } 135 | 136 | .nav-item a.active { 137 | background-color: rgba(255,255,255,0.25); 138 | color: white; 139 | } 140 | 141 | .nav-item a:hover { 142 | background-color: rgba(255,255,255,0.1); 143 | color: white; 144 | } 145 | 146 | .content { 147 | padding-top: 1.1rem; 148 | } 149 | 150 | .navbar-toggler { 151 | background-color: rgba(255, 255, 255, 0.1); 152 | } 153 | 154 | .valid.modified:not([type=checkbox]) { 155 | outline: 1px solid #26b050; 156 | } 157 | 158 | .invalid { 159 | outline: 1px solid red; 160 | } 161 | 162 | .validation-message { 163 | color: red; 164 | } 165 | 166 | @media (max-width: 767.98px) { 167 | .main .top-row { 168 | display: none; 169 | } 170 | } 171 | 172 | @media (min-width: 768px) { 173 | app { 174 | flex-direction: row; 175 | } 176 | 177 | .sidebar { 178 | width: 250px; 179 | height: 100vh; 180 | position: sticky; 181 | top: 0; 182 | } 183 | 184 | .main .top-row { 185 | position: sticky; 186 | top: 0; 187 | } 188 | 189 | .main > div { 190 | padding-left: 2rem !important; 191 | padding-right: 1.5rem !important; 192 | } 193 | 194 | .navbar-toggler { 195 | display: none; 196 | } 197 | 198 | .sidebar .collapse { 199 | /* Never collapse the sidebar for wide screens */ 200 | display: block; 201 | } 202 | } 203 | 204 | .sec-pre-loader { 205 | position: fixed; 206 | left: 0px; 207 | top: 0px; 208 | width: 100%; 209 | height: 100%; 210 | z-index: 9999; 211 | background: url(../img/Preloader.gif) center no-repeat rgba(255, 255, 255, 1); 212 | } 213 | 214 | .sec-blue { 215 | color: #1e4691; 216 | } 217 | 218 | .sec-orange { 219 | color: #F78F3A; 220 | } 221 | 222 | /* VCS old */ 223 | .button { 224 | padding: 12px 15px !important; 225 | color: #FFFFFF !important; 226 | display: block; 227 | font-size: 0.9em !important; 228 | border-radius: 3px; 229 | border: none; 230 | float: left; 231 | cursor: pointer; 232 | margin-right: 10px !important; 233 | transition: .5s; 234 | -webkit-transition: .5s; 235 | -moz-transition: .5s; 236 | } 237 | 238 | .button i { 239 | margin-left: 10px; 240 | float: right; 241 | font-size: 1.1em; 242 | } 243 | 244 | .button:focus { 245 | color: #FFFFFF !important; 246 | text-decoration: none; 247 | outline: none; 248 | } 249 | 250 | .button:hover { 251 | color: #FFFFFF !important; 252 | transition: .5s; 253 | -webkit-transition: .5s; 254 | -moz-transition: .5s; 255 | } 256 | 257 | .button.green { 258 | background: #0b2b68; 259 | /* Old browsers */ 260 | } 261 | 262 | .button.green:hover { 263 | background: #0b2b68; 264 | } 265 | 266 | .button.red { 267 | background-color: #c83838 !important; 268 | } 269 | 270 | .button.red:hover { 271 | background-color: #8f2116 !important; 272 | } 273 | 274 | .button.gray { 275 | background: #505c61; 276 | /* Old browsers */ 277 | color: #FFFFFF !important; 278 | } 279 | 280 | .button.gray:hover { 281 | background: #000000; 282 | /* Old browsers */ 283 | } 284 | 285 | .button.disabled { 286 | background: #b5b5b5 !important; 287 | color: #FFFFFF; 288 | border: none; 289 | display: inline-block; 290 | cursor: default; 291 | } 292 | 293 | .button.disabled:focus { 294 | color: #FFFFFF; 295 | text-decoration: none; 296 | } 297 | 298 | .button.disabled:hover { 299 | background: #b5b5b5 !important; 300 | color: #FFFFFF; 301 | border-bottom: 1px solid #818181; 302 | border-top: 1px solid #dadada; 303 | text-shadow: 1px 1px 1px #818181; 304 | } 305 | 306 | .button.blue { 307 | background: #1e4691; 308 | cursor: pointer; 309 | } 310 | 311 | .button.blue:hover { 312 | background: #f78f3a; 313 | } 314 | 315 | .button.refresh { 316 | font-size: 0.9em !important; 317 | margin-top: -10px; 318 | padding: 8px 10px !important; 319 | transition: .5s; 320 | -webkit-transition: .5s; 321 | -moz-transition: .5s; 322 | } 323 | 324 | .button.refresh:hover b { 325 | transform: rotate(360deg); 326 | transition: .5s; 327 | -webkit-transition: .5s; 328 | -moz-transition: .5s; 329 | transition-timing-function: !important; 330 | } 331 | 332 | .button.outline { 333 | background-color: transparent !important; 334 | border: 2px solid #e0dcd0 !important; 335 | color: #505c61 !important; 336 | margin-top: 20px; 337 | } 338 | 339 | .button.outline:hover { 340 | background-color: #FFFFFF !important; 341 | } 342 | 343 | .button.orange { 344 | background: #f78f3a !important; 345 | cursor: pointer; 346 | } 347 | 348 | .button.orange:hover { 349 | background: #FFFFFF !important; 350 | color: #f78f3a !important; 351 | } 352 | 353 | .fieldset { 354 | width: -webkit-calc(100% - 20px); 355 | width: -moz-calc(100% - 20px); 356 | width: calc(100% - 20px); 357 | border: 1px solid #dbdbdb; 358 | margin: 10px; 359 | padding: 10px; 360 | padding-bottom: 20px; 361 | position: relative; 362 | } 363 | 364 | .fieldset legend { 365 | display: block; 366 | padding-left: 2px; 367 | padding-right: 2px; 368 | color: #1e4691; 369 | border: none; 370 | width: auto; 371 | font-weight: bold; 372 | font-size: 1.1em; 373 | } 374 | /*print*/ 375 | @page { 376 | margin: 2mm 377 | } 378 | @media print { 379 | .sidebar { 380 | display: none; 381 | } 382 | 383 | .top-row { 384 | display: none; 385 | } 386 | 387 | .heading { 388 | display: none; 389 | } 390 | 391 | .printbtn { 392 | display: none; 393 | } 394 | 395 | .noprint { 396 | display: none; 397 | } 398 | 399 | .print_only { 400 | display: block; 401 | } 402 | } 403 | 404 | .print_only { 405 | display: none; 406 | } 407 | 408 | .nofont { 409 | font-family: "Arial"; 410 | } 411 | 412 | /*Timeline*/ 413 | .multi-steps > li.is-active:before, .multi-steps > li.is-active ~ li:before { 414 | content: counter(stepNum); 415 | font-family: inherit; 416 | font-weight: 700; 417 | } 418 | 419 | .multi-steps > li.is-active:after, .multi-steps > li.is-active ~ li:after { 420 | background-color: #ededed; 421 | } 422 | 423 | .multi-steps { 424 | display: table; 425 | table-layout: fixed; 426 | width: 100%; 427 | } 428 | 429 | .multi-steps > li { 430 | counter-increment: stepNum; 431 | text-align: center; 432 | display: table-cell; 433 | position: relative; 434 | color: #F78F3A; 435 | } 436 | 437 | .multi-steps > li:before { 438 | content: '\f00c'; 439 | content: '\2713;'; 440 | content: '\10003'; 441 | content: '\10004'; 442 | content: '\2713'; 443 | display: block; 444 | margin: 0 auto 4px; 445 | background-color: #fff; 446 | width: 36px; 447 | height: 36px; 448 | line-height: 32px; 449 | text-align: center; 450 | font-weight: bold; 451 | border-width: 2px; 452 | border-style: solid; 453 | border-color: #F78F3A; 454 | border-radius: 50%; 455 | } 456 | 457 | .multi-steps > li:after { 458 | content: '1'; 459 | height: 2px; 460 | width: 100%; 461 | background-color: #F78F3A; 462 | position: absolute; 463 | top: 16px; 464 | left: 50%; 465 | z-index: -1; 466 | } 467 | 468 | .multi-steps > li:last-child:after { 469 | display: none; 470 | } 471 | 472 | .multi-steps > li.is-active:before { 473 | background-color: #fff; 474 | border-color: #F78F3A; 475 | } 476 | 477 | .multi-steps > li.is-active ~ li { 478 | color: #808080; 479 | } 480 | 481 | .multi-steps > li.is-active ~ li:before { 482 | background-color: #ededed; 483 | border-color: #ededed; 484 | } 485 | 486 | 487 | /*print*/ 488 | @media print { 489 | .sidebar { 490 | display: none; 491 | } 492 | 493 | .top-row { 494 | display: none; 495 | } 496 | 497 | .heading { 498 | display: none; 499 | } 500 | 501 | .printbtn { 502 | display: none; 503 | } 504 | 505 | .noprint { 506 | display: none; 507 | } 508 | 509 | .print_only { 510 | display: block; 511 | } 512 | } 513 | 514 | .print_only { 515 | display: none; 516 | } 517 | 518 | .nofont { 519 | font-family: "Arial"; 520 | } -------------------------------------------------------------------------------- /wwwroot/default.aspx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | Datacenter Log | Managment Portal 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /wwwroot/fonts/Cascadia.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smj0x/BlazorPoint/536de31e45daa9f809bf7c70f21bc2809022c79c/wwwroot/fonts/Cascadia.ttf -------------------------------------------------------------------------------- /wwwroot/img/attached.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /wwwroot/img/check-in.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /wwwroot/img/check-out.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /wwwroot/img/copy.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /wwwroot/img/doc.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /wwwroot/img/edit.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wwwroot/img/excel.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 7 | 8 | 10 | 12 | 14 | 16 | 18 | 20 | 22 | 24 | 25 | 28 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /wwwroot/img/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smj0x/BlazorPoint/536de31e45daa9f809bf7c70f21bc2809022c79c/wwwroot/img/favicon-16x16.png -------------------------------------------------------------------------------- /wwwroot/img/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smj0x/BlazorPoint/536de31e45daa9f809bf7c70f21bc2809022c79c/wwwroot/img/favicon-32x32.png -------------------------------------------------------------------------------- /wwwroot/img/favicon-96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smj0x/BlazorPoint/536de31e45daa9f809bf7c70f21bc2809022c79c/wwwroot/img/favicon-96x96.png -------------------------------------------------------------------------------- /wwwroot/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smj0x/BlazorPoint/536de31e45daa9f809bf7c70f21bc2809022c79c/wwwroot/img/favicon.ico -------------------------------------------------------------------------------- /wwwroot/img/filter.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /wwwroot/img/form.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smj0x/BlazorPoint/536de31e45daa9f809bf7c70f21bc2809022c79c/wwwroot/img/form.png -------------------------------------------------------------------------------- /wwwroot/img/form.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /wwwroot/img/lang.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smj0x/BlazorPoint/536de31e45daa9f809bf7c70f21bc2809022c79c/wwwroot/img/lang.png -------------------------------------------------------------------------------- /wwwroot/img/lock.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /wwwroot/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smj0x/BlazorPoint/536de31e45daa9f809bf7c70f21bc2809022c79c/wwwroot/img/logo.png -------------------------------------------------------------------------------- /wwwroot/img/logo_color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smj0x/BlazorPoint/536de31e45daa9f809bf7c70f21bc2809022c79c/wwwroot/img/logo_color.png -------------------------------------------------------------------------------- /wwwroot/img/logout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smj0x/BlazorPoint/536de31e45daa9f809bf7c70f21bc2809022c79c/wwwroot/img/logout.png -------------------------------------------------------------------------------- /wwwroot/img/preloader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smj0x/BlazorPoint/536de31e45daa9f809bf7c70f21bc2809022c79c/wwwroot/img/preloader.gif -------------------------------------------------------------------------------- /wwwroot/img/printer.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /wwwroot/img/sideMenu01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smj0x/BlazorPoint/536de31e45daa9f809bf7c70f21bc2809022c79c/wwwroot/img/sideMenu01.png -------------------------------------------------------------------------------- /wwwroot/img/sideMenu02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smj0x/BlazorPoint/536de31e45daa9f809bf7c70f21bc2809022c79c/wwwroot/img/sideMenu02.png -------------------------------------------------------------------------------- /wwwroot/img/sideMenu03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smj0x/BlazorPoint/536de31e45daa9f809bf7c70f21bc2809022c79c/wwwroot/img/sideMenu03.png -------------------------------------------------------------------------------- /wwwroot/img/sideMenu04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smj0x/BlazorPoint/536de31e45daa9f809bf7c70f21bc2809022c79c/wwwroot/img/sideMenu04.png -------------------------------------------------------------------------------- /wwwroot/img/sideMenu05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smj0x/BlazorPoint/536de31e45daa9f809bf7c70f21bc2809022c79c/wwwroot/img/sideMenu05.png -------------------------------------------------------------------------------- /wwwroot/img/sideMenu06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smj0x/BlazorPoint/536de31e45daa9f809bf7c70f21bc2809022c79c/wwwroot/img/sideMenu06.png -------------------------------------------------------------------------------- /wwwroot/img/sideMenu07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smj0x/BlazorPoint/536de31e45daa9f809bf7c70f21bc2809022c79c/wwwroot/img/sideMenu07.png -------------------------------------------------------------------------------- /wwwroot/img/sideMenu08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smj0x/BlazorPoint/536de31e45daa9f809bf7c70f21bc2809022c79c/wwwroot/img/sideMenu08.png -------------------------------------------------------------------------------- /wwwroot/img/tick.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /wwwroot/img/user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smj0x/BlazorPoint/536de31e45daa9f809bf7c70f21bc2809022c79c/wwwroot/img/user.png -------------------------------------------------------------------------------- /wwwroot/img/web.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /wwwroot/js/dataTables.bootstrap4.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | DataTables Bootstrap 4 integration 3 | ©2011-2017 SpryMedia Ltd - datatables.net/license 4 | */ 5 | (function(b){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(a){return b(a,window,document)}):"object"===typeof exports?module.exports=function(a,d){a||(a=window);if(!d||!d.fn.dataTable)d=require("datatables.net")(a,d).$;return b(d,a,a.document)}:b(jQuery,window,document)})(function(b,a,d,m){var f=b.fn.dataTable;b.extend(!0,f.defaults,{dom:"<'row'<'col-sm-12 col-md-6'l><'col-sm-12 col-md-6'f>><'row'<'col-sm-12'tr>><'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>", 6 | renderer:"bootstrap"});b.extend(f.ext.classes,{sWrapper:"dataTables_wrapper dt-bootstrap4",sFilterInput:"form-control form-control-sm",sLengthSelect:"custom-select custom-select-sm form-control form-control-sm",sProcessing:"dataTables_processing card",sPageButton:"paginate_button page-item"});f.ext.renderer.pageButton.bootstrap=function(a,h,r,s,j,n){var o=new f.Api(a),t=a.oClasses,k=a.oLanguage.oPaginate,u=a.oLanguage.oAria.paginate||{},e,g,p=0,q=function(d,f){var l,h,i,c,m=function(a){a.preventDefault(); 7 | !b(a.currentTarget).hasClass("disabled")&&o.page()!=a.data.action&&o.page(a.data.action).draw("page")};l=0;for(h=f.length;l", 8 | {"class":t.sPageButton+" "+g,id:0===r&&"string"===typeof c?a.sTableId+"_"+c:null}).append(b("",{href:"/Tasks#","aria-controls":a.sTableId,"aria-label":u[c],"data-dt-idx":p,tabindex:a.iTabIndex,"class":"page-link"}).html(e)).appendTo(d),a.oApi._fnBindAction(i,{action:c},m),p++)}},i;try{i=b(h).find(d.activeElement).data("dt-idx")}catch(v){}q(b(h).empty().html('
    ').children("ul"),s);i!==m&&b(h).find("[data-dt-idx="+i+"]").focus()};return f}); 9 | -------------------------------------------------------------------------------- /wwwroot/js/dataTables.responsive.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | Responsive 2.2.2 3 | 2014-2018 SpryMedia Ltd - datatables.net/license 4 | */ 5 | (function(d){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(l){return d(l,window,document)}):"object"===typeof exports?module.exports=function(l,j){l||(l=window);if(!j||!j.fn.dataTable)j=require("datatables.net")(l,j).$;return d(j,l,l.document)}:d(jQuery,window,document)})(function(d,l,j,q){function t(a,b,c){var e=b+"-"+c;if(n[e])return n[e];for(var d=[],a=a.cell(b,c).node().childNodes,b=0,c=a.length;btd, >th", 8 | e).each(function(e){e=b.column.index("toData",e);!1===a.s.current[e]&&d(this).css("display","none")})});b.on("destroy.dtr",function(){b.off(".dtr");d(b.table().body()).off(".dtr");d(l).off("resize.dtr orientationchange.dtr");d.each(a.s.current,function(b,e){!1===e&&a._setColumnVis(b,!0)})});this.c.breakpoints.sort(function(a,b){return a.widthb.width?-1:0});this._classLogic();this._resizeAuto();c=this.c.details;!1!==c.type&&(a._detailsInit(),b.on("column-visibility.dtr",function(){a._timer&& 9 | clearTimeout(a._timer);a._timer=setTimeout(function(){a._timer=null;a._classLogic();a._resizeAuto();a._resize();a._redrawChildren()},100)}),b.on("draw.dtr",function(){a._redrawChildren()}),d(b.table().node()).addClass("dtr-"+c.type));b.on("column-reorder.dtr",function(){a._classLogic();a._resizeAuto();a._resize()});b.on("column-sizing.dtr",function(){a._resizeAuto();a._resize()});b.on("preXhr.dtr",function(){var e=[];b.rows().every(function(){this.child.isShown()&&e.push(this.id(true))});b.one("draw.dtr", 10 | function(){a._resizeAuto();a._resize();b.rows(e).every(function(){a._detailsDisplay(this,false)})})});b.on("init.dtr",function(){a._resizeAuto();a._resize();d.inArray(false,a.s.current)&&b.columns.adjust()});this._resize()},_columnsVisiblity:function(a){var b=this.s.dt,c=this.s.columns,e,f,g=c.map(function(a,b){return{columnIdx:b,priority:a.priority}}).sort(function(a,b){return a.priority!==b.priority?a.priority-b.priority:a.columnIdx-b.columnIdx}),h=d.map(c,function(e,c){return!1===b.column(c).visible()? 11 | "not-visible":e.auto&&null===e.minWidth?!1:!0===e.auto?"-":-1!==d.inArray(a,e.includeIn)}),m=0;e=0;for(f=h.length;em-c[k].minWidth?(s=!0,h[k]=!1):h[k]=!0,m-=c[k].minWidth)}g=!1;e=0;for(f=c.length;e=k&&f(d,b[c].name)}else{if("not-"===g){c=0;for(g=b.length;c").append(h).appendTo(f)}d("").append(g).appendTo(e);"inline"===this.c.details.type&&d(c).addClass("dtr-inline collapsed");d(c).find("[name]").removeAttr("name");d(c).css("position","relative"); 21 | c=d("
    ").css({width:1,height:1,overflow:"hidden",clear:"both"}).append(c);c.insertBefore(a.table().node());g.each(function(c){c=a.column.index("fromVisible",c);b[c].minWidth=this.offsetWidth||0});c.remove()}},_setColumnVis:function(a,b){var c=this.s.dt,e=b?"":"none";d(c.column(a).header()).css("display",e);d(c.column(a).footer()).css("display",e);c.column(a).nodes().to$().css("display",e);d.isEmptyObject(n)||c.cells(null,a).indexes().each(function(a){r(c,a.row,a.column)})},_tabIndexes:function(){var a= 22 | this.s.dt,b=a.cells({page:"current"}).nodes().to$(),c=a.settings()[0],e=this.c.details.target;b.filter("[data-dtr-keyboard]").removeData("[data-dtr-keyboard]");"number"===typeof e?a.cells(null,e,{page:"current"}).nodes().to$().attr("tabIndex",c.iTabIndex).data("dtr-keyboard",1):("td:first-child, th:first-child"===e&&(e=">td:first-child, >th:first-child"),d(e,a.rows({page:"current"}).nodes()).attr("tabIndex",c.iTabIndex).data("dtr-keyboard",1))}});i.breakpoints=[{name:"desktop",width:Infinity},{name:"tablet-l", 23 | width:1024},{name:"tablet-p",width:768},{name:"mobile-l",width:480},{name:"mobile-p",width:320}];i.display={childRow:function(a,b,c){if(b){if(d(a.node()).hasClass("parent"))return a.child(c(),"child").show(),!0}else{if(a.child.isShown())return a.child(!1),d(a.node()).removeClass("parent"),!1;a.child(c(),"child").show();d(a.node()).addClass("parent");return!0}},childRowImmediate:function(a,b,c){if(!b&&a.child.isShown()||!a.responsive.hasHidden())return a.child(!1),d(a.node()).removeClass("parent"), 24 | !1;a.child(c(),"child").show();d(a.node()).addClass("parent");return!0},modal:function(a){return function(b,c,e){if(c)d("div.dtr-modal-content").empty().append(e());else{var f=function(){g.remove();d(j).off("keypress.dtr")},g=d('
    ').append(d('
    ').append(d('
    ').append(e())).append(d('
    ×
    ').click(function(){f()}))).append(d('
    ').click(function(){f()})).appendTo("body"); 25 | d(j).on("keyup.dtr",function(a){27===a.keyCode&&(a.stopPropagation(),f())})}a&&a.header&&d("div.dtr-modal-content").prepend("

    "+a.header(b)+"

    ")}}};var n={};i.renderer={listHiddenNodes:function(){return function(a,b,c){var e=d('
      '),f=!1;d.each(c,function(b,c){c.hidden&&(d('
    • '+c.title+"
    • ").append(d('').append(t(a, 26 | c.rowIndex,c.columnIndex))).appendTo(e),f=!0)});return f?e:!1}},listHidden:function(){return function(a,b,c){return(a=d.map(c,function(a){return a.hidden?'
    • '+a.title+' '+a.data+"
    • ":""}).join(""))?d('
        ').append(a):!1}},tableAll:function(a){a=d.extend({tableClass:""},a);return function(b, 27 | c,e){b=d.map(e,function(a){return''+a.title+": "+a.data+""}).join("");return d('').append(b)}}};i.defaults={breakpoints:i.breakpoints,auto:!0,details:{display:i.display.childRow,renderer:i.renderer.listHidden(),target:0,type:"inline"},orthogonal:"display"};var p=d.fn.dataTable.Api;p.register("responsive()",function(){return this});p.register("responsive.index()", 28 | function(a){a=d(a);return{column:a.data("dtr-index"),row:a.parent().data("dtr-index")}});p.register("responsive.rebuild()",function(){return this.iterator("table",function(a){a._responsive&&a._responsive._classLogic()})});p.register("responsive.recalc()",function(){return this.iterator("table",function(a){a._responsive&&(a._responsive._resizeAuto(),a._responsive._resize())})});p.register("responsive.hasHidden()",function(){var a=this.context[0];return a._responsive?-1!==d.inArray(!1,a._responsive.s.current): 29 | !1});p.registerPlural("columns().responsiveHidden()","column().responsiveHidden()",function(){return this.iterator("column",function(a,b){return a._responsive?a._responsive.s.current[b]:!1},1)});i.version="2.2.2";d.fn.dataTable.Responsive=i;d.fn.DataTable.Responsive=i;d(j).on("preInit.dt.dtr",function(a,b){if("dt"===a.namespace&&(d(b.nTable).hasClass("responsive")||d(b.nTable).hasClass("dt-responsive")||b.oInit.responsive||o.defaults.responsive)){var c=b.oInit.responsive;!1!==c&&new i(b,d.isPlainObject(c)? 30 | c:{})}});return i}); 31 | -------------------------------------------------------------------------------- /wwwroot/js/ie.js: -------------------------------------------------------------------------------- 1 | // Get IE or Edge browser version 2 | var version = detectIE(); 3 | var message = "Please use \"Google Chrome\""; 4 | if (version === false) { 5 | //alert(message); 6 | } else if (version >= 12) { 7 | //alert(message + version); 8 | } else { 9 | alert(message); 10 | } 11 | 12 | // add details to debug result 13 | //document.getElementById('details').innerHTML = navigator.userAgent; 14 | 15 | 16 | function detectIE() { 17 | var ua = navigator.userAgent; 18 | 19 | // Test values; Uncomment to check result … 20 | 21 | // IE 10 22 | //ua = 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0)'; 23 | 24 | // IE 11 25 | //ua = 'Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko'; 26 | 27 | // Edge 12 (Spartan) 28 | // ua = 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36 Edge/12.0'; 29 | 30 | // Edge 13 31 | // ua = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586'; 32 | 33 | var msie = ua.indexOf('MSIE '); 34 | if (msie > 0) { 35 | // IE 10 or older => return version number 36 | return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10); 37 | } 38 | 39 | var trident = ua.indexOf('Trident/'); 40 | if (trident > 0) { 41 | // IE 11 => return version number 42 | var rv = ua.indexOf('rv:'); 43 | return parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10); 44 | } 45 | 46 | var edge = ua.indexOf('Edge/'); 47 | if (edge > 0) { 48 | // Edge (IE 12+) => return version number 49 | return parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10); 50 | } 51 | 52 | // other browser 53 | return false; 54 | } -------------------------------------------------------------------------------- /wwwroot/js/responsive.bootstrap4.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | Bootstrap 4 integration for DataTables' Responsive 3 | ©2016 SpryMedia Ltd - datatables.net/license 4 | */ 5 | (function(c){"function"===typeof define&&define.amd?define(["jquery","datatables.net-bs4","datatables.net-responsive"],function(a){return c(a,window,document)}):"object"===typeof exports?module.exports=function(a,b){a||(a=window);if(!b||!b.fn.dataTable)b=require("datatables.net-bs4")(a,b).$;b.fn.dataTable.Responsive||require("datatables.net-responsive")(a,b);return c(b,a,a.document)}:c(jQuery,window,document)})(function(c){var a=c.fn.dataTable,b=a.Responsive.display,g=b.modal,e=c('