Przeglądaj źródła

Merge branch 'test' into dev

henri carmelo 10 miesięcy temu
rodzic
commit
c4cc6cc0c6
34 zmienionych plików z 590123 dodań i 4558 usunięć
  1. 0 594
      angular-client/dist/fatboar/browser/3rdpartylicenses.txt
  2. 2 2
      angular-client/dist/fatboar/browser/index.html
  3. 0 0
      angular-client/dist/fatboar/browser/layers-2x.png
  4. 0 0
      angular-client/dist/fatboar/browser/layers.png
  5. 0 1
      angular-client/dist/fatboar/browser/main-es2015.af9c9947cf2f07f573cd.js
  6. 0 1
      angular-client/dist/fatboar/browser/main-es5.af9c9947cf2f07f573cd.js
  7. 7676 0
      angular-client/dist/fatboar/browser/main.js
  8. 1 0
      angular-client/dist/fatboar/browser/main.js.map
  9. 0 0
      angular-client/dist/fatboar/browser/marker-icon.png
  10. 0 1
      angular-client/dist/fatboar/browser/polyfills-es2015.92fd38b82bc07971832d.js
  11. 0 1
      angular-client/dist/fatboar/browser/polyfills-es5.4735a6869193f02e06a8.js
  12. 3520 0
      angular-client/dist/fatboar/browser/polyfills.js
  13. 1 0
      angular-client/dist/fatboar/browser/polyfills.js.map
  14. 0 1
      angular-client/dist/fatboar/browser/runtime-es2015.1eba213af0b233498d9d.js
  15. 0 1
      angular-client/dist/fatboar/browser/runtime-es5.1eba213af0b233498d9d.js
  16. 155 0
      angular-client/dist/fatboar/browser/runtime.js
  17. 1 0
      angular-client/dist/fatboar/browser/runtime.js.map
  18. 10484 0
      angular-client/dist/fatboar/browser/styles.css
  19. 1 0
      angular-client/dist/fatboar/browser/styles.css.map
  20. 0 9
      angular-client/dist/fatboar/browser/styles.ef582ae2929323c4e400.css
  21. 237210 0
      angular-client/dist/fatboar/browser/vendor.js
  22. 1 0
      angular-client/dist/fatboar/browser/vendor.js.map
  23. 327499 0
      angular-client/dist/fatboar/server/main.js
  24. 1 0
      angular-client/dist/fatboar/server/main.js.map
  25. 3108 3819
      angular-client/package-lock.json
  26. 4 2
      angular-client/package.json
  27. 80 4
      angular-client/server.ts
  28. 2 0
      angular-client/src/app/app.module.ts
  29. 2 0
      angular-client/src/app/app.server.module.ts
  30. 81 24
      angular-client/src/app/components/shared/contact/map/map.component.ts
  31. 238 95
      angular-client/src/app/services/auth.service.ts
  32. 20 0
      angular-client/src/app/services/leaflet.service.ts
  33. 33 0
      angular-client/src/app/services/storage.service.ts
  34. 3 3
      express-server/lib/db.js

+ 0 - 594
angular-client/dist/fatboar/browser/3rdpartylicenses.txt

@@ -1,594 +0,0 @@
-@angular-devkit/build-angular
-MIT
-The MIT License
-
-Copyright (c) 2017 Google, Inc.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
-
-
-@angular/animations
-MIT
-
-@angular/cdk
-MIT
-The MIT License
-
-Copyright (c) 2020 Google LLC.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
-
-
-@angular/common
-MIT
-
-@angular/core
-MIT
-
-@angular/flex-layout
-MIT
-The MIT License
-
-Copyright (c) 2020 Google LLC.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
-
-
-@angular/forms
-MIT
-
-@angular/material
-MIT
-The MIT License
-
-Copyright (c) 2020 Google LLC.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
-
-
-@angular/platform-browser
-MIT
-
-@angular/router
-MIT
-
-chart.js
-MIT
-The MIT License (MIT)
-
-Copyright (c) 2018 Chart.js Contributors
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-
-core-js
-MIT
-Copyright (c) 2014-2020 Denis Pushkarev
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
-
-
-css-loader
-MIT
-Copyright JS Foundation and other contributors
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-'Software'), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-
-jwt-decode
-MIT
-The MIT License (MIT)
- 
-Copyright (c) 2015 Auth0, Inc. <support@auth0.com> (http://auth0.com)
- 
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
- 
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
- 
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
-
-
-leaflet
-BSD-2-Clause
-BSD 2-Clause License
-
-Copyright (c) 2010-2023, Volodymyr Agafonkin
-Copyright (c) 2010-2011, CloudMade
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-1. Redistributions of source code must retain the above copyright notice, this
-   list of conditions and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the above copyright notice,
-   this list of conditions and the following disclaimer in the documentation
-   and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-lodash-es
-MIT
-Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
-
-Based on Underscore.js, copyright Jeremy Ashkenas,
-DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
-
-This software consists of voluntary contributions made by many
-individuals. For exact contribution history, see the revision history
-available at https://github.com/lodash/lodash
-
-The following license applies to all parts of this software except as
-documented below:
-
-====
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-====
-
-Copyright and related rights for sample code are waived via CC0. Sample
-code is defined as all source code displayed within the prose of the
-documentation.
-
-CC0: http://creativecommons.org/publicdomain/zero/1.0/
-
-====
-
-Files located in the node_modules and vendor directories are externally
-maintained libraries used by this software which have their own
-licenses; we recommend you read them, as their terms may differ from the
-terms above.
-
-
-moment
-MIT
-Copyright (c) JS Foundation and other contributors
-
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the "Software"), to deal in the Software without
-restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-
-ng2-charts
-ISC
-
-regenerator-runtime
-MIT
-MIT License
-
-Copyright (c) 2014-present, Facebook, Inc.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
-
-
-rxjs
-Apache-2.0
-                               Apache License
-                         Version 2.0, January 2004
-                      http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
-    "License" shall mean the terms and conditions for use, reproduction,
-    and distribution as defined by Sections 1 through 9 of this document.
-
-    "Licensor" shall mean the copyright owner or entity authorized by
-    the copyright owner that is granting the License.
-
-    "Legal Entity" shall mean the union of the acting entity and all
-    other entities that control, are controlled by, or are under common
-    control with that entity. For the purposes of this definition,
-    "control" means (i) the power, direct or indirect, to cause the
-    direction or management of such entity, whether by contract or
-    otherwise, or (ii) ownership of fifty percent (50%) or more of the
-    outstanding shares, or (iii) beneficial ownership of such entity.
-
-    "You" (or "Your") shall mean an individual or Legal Entity
-    exercising permissions granted by this License.
-
-    "Source" form shall mean the preferred form for making modifications,
-    including but not limited to software source code, documentation
-    source, and configuration files.
-
-    "Object" form shall mean any form resulting from mechanical
-    transformation or translation of a Source form, including but
-    not limited to compiled object code, generated documentation,
-    and conversions to other media types.
-
-    "Work" shall mean the work of authorship, whether in Source or
-    Object form, made available under the License, as indicated by a
-    copyright notice that is included in or attached to the work
-    (an example is provided in the Appendix below).
-
-    "Derivative Works" shall mean any work, whether in Source or Object
-    form, that is based on (or derived from) the Work and for which the
-    editorial revisions, annotations, elaborations, or other modifications
-    represent, as a whole, an original work of authorship. For the purposes
-    of this License, Derivative Works shall not include works that remain
-    separable from, or merely link (or bind by name) to the interfaces of,
-    the Work and Derivative Works thereof.
-
-    "Contribution" shall mean any work of authorship, including
-    the original version of the Work and any modifications or additions
-    to that Work or Derivative Works thereof, that is intentionally
-    submitted to Licensor for inclusion in the Work by the copyright owner
-    or by an individual or Legal Entity authorized to submit on behalf of
-    the copyright owner. For the purposes of this definition, "submitted"
-    means any form of electronic, verbal, or written communication sent
-    to the Licensor or its representatives, including but not limited to
-    communication on electronic mailing lists, source code control systems,
-    and issue tracking systems that are managed by, or on behalf of, the
-    Licensor for the purpose of discussing and improving the Work, but
-    excluding communication that is conspicuously marked or otherwise
-    designated in writing by the copyright owner as "Not a Contribution."
-
-    "Contributor" shall mean Licensor and any individual or Legal Entity
-    on behalf of whom a Contribution has been received by Licensor and
-    subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
-    this License, each Contributor hereby grants to You a perpetual,
-    worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-    copyright license to reproduce, prepare Derivative Works of,
-    publicly display, publicly perform, sublicense, and distribute the
-    Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
-    this License, each Contributor hereby grants to You a perpetual,
-    worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-    (except as stated in this section) patent license to make, have made,
-    use, offer to sell, sell, import, and otherwise transfer the Work,
-    where such license applies only to those patent claims licensable
-    by such Contributor that are necessarily infringed by their
-    Contribution(s) alone or by combination of their Contribution(s)
-    with the Work to which such Contribution(s) was submitted. If You
-    institute patent litigation against any entity (including a
-    cross-claim or counterclaim in a lawsuit) alleging that the Work
-    or a Contribution incorporated within the Work constitutes direct
-    or contributory patent infringement, then any patent licenses
-    granted to You under this License for that Work shall terminate
-    as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
-    Work or Derivative Works thereof in any medium, with or without
-    modifications, and in Source or Object form, provided that You
-    meet the following conditions:
-
-    (a) You must give any other recipients of the Work or
-        Derivative Works a copy of this License; and
-
-    (b) You must cause any modified files to carry prominent notices
-        stating that You changed the files; and
-
-    (c) You must retain, in the Source form of any Derivative Works
-        that You distribute, all copyright, patent, trademark, and
-        attribution notices from the Source form of the Work,
-        excluding those notices that do not pertain to any part of
-        the Derivative Works; and
-
-    (d) If the Work includes a "NOTICE" text file as part of its
-        distribution, then any Derivative Works that You distribute must
-        include a readable copy of the attribution notices contained
-        within such NOTICE file, excluding those notices that do not
-        pertain to any part of the Derivative Works, in at least one
-        of the following places: within a NOTICE text file distributed
-        as part of the Derivative Works; within the Source form or
-        documentation, if provided along with the Derivative Works; or,
-        within a display generated by the Derivative Works, if and
-        wherever such third-party notices normally appear. The contents
-        of the NOTICE file are for informational purposes only and
-        do not modify the License. You may add Your own attribution
-        notices within Derivative Works that You distribute, alongside
-        or as an addendum to the NOTICE text from the Work, provided
-        that such additional attribution notices cannot be construed
-        as modifying the License.
-
-    You may add Your own copyright statement to Your modifications and
-    may provide additional or different license terms and conditions
-    for use, reproduction, or distribution of Your modifications, or
-    for any such Derivative Works as a whole, provided Your use,
-    reproduction, and distribution of the Work otherwise complies with
-    the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
-    any Contribution intentionally submitted for inclusion in the Work
-    by You to the Licensor shall be under the terms and conditions of
-    this License, without any additional terms or conditions.
-    Notwithstanding the above, nothing herein shall supersede or modify
-    the terms of any separate license agreement you may have executed
-    with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
-    names, trademarks, service marks, or product names of the Licensor,
-    except as required for reasonable and customary use in describing the
-    origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
-    agreed to in writing, Licensor provides the Work (and each
-    Contributor provides its Contributions) on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-    implied, including, without limitation, any warranties or conditions
-    of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-    PARTICULAR PURPOSE. You are solely responsible for determining the
-    appropriateness of using or redistributing the Work and assume any
-    risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
-    whether in tort (including negligence), contract, or otherwise,
-    unless required by applicable law (such as deliberate and grossly
-    negligent acts) or agreed to in writing, shall any Contributor be
-    liable to You for damages, including any direct, indirect, special,
-    incidental, or consequential damages of any character arising as a
-    result of this License or out of the use or inability to use the
-    Work (including but not limited to damages for loss of goodwill,
-    work stoppage, computer failure or malfunction, or any and all
-    other commercial damages or losses), even if such Contributor
-    has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
-    the Work or Derivative Works thereof, You may choose to offer,
-    and charge a fee for, acceptance of support, warranty, indemnity,
-    or other liability obligations and/or rights consistent with this
-    License. However, in accepting such obligations, You may act only
-    on Your own behalf and on Your sole responsibility, not on behalf
-    of any other Contributor, and only if You agree to indemnify,
-    defend, and hold each Contributor harmless for any liability
-    incurred by, or claims asserted against, such Contributor by reason
-    of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
-    To apply the Apache License to your work, attach the following
-    boilerplate notice, with the fields enclosed by brackets "[]"
-    replaced with your own identifying information. (Don't include
-    the brackets!)  The text should be enclosed in the appropriate
-    comment syntax for the file format. We also recommend that a
-    file or class name and description of purpose be included on the
-    same "printed page" as the copyright notice for easier
-    identification within third-party archives.
-
- Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- 
-
-
-saturn-datepicker
-MIT
-
-webpack
-MIT
-Copyright JS Foundation and other contributors
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-'Software'), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-
-zone.js
-MIT
-The MIT License
-
-Copyright (c) 2010-2020 Google LLC. http://angular.io/license
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.

+ 2 - 2
angular-client/dist/fatboar/browser/index.html

@@ -8,8 +8,8 @@
   <link rel="icon" type="image/x-icon" href="favicon.ico">
   <link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500&display=swap" rel="stylesheet">
   <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
-<link rel="stylesheet" href="styles.ef582ae2929323c4e400.css"></head>
+<link rel="stylesheet" href="styles.css"></head>
 <body class="mat-typography">
   <app-root></app-root>
-<script src="runtime-es2015.1eba213af0b233498d9d.js" type="module"></script><script src="runtime-es5.1eba213af0b233498d9d.js" nomodule defer></script><script src="polyfills-es5.4735a6869193f02e06a8.js" nomodule defer></script><script src="polyfills-es2015.92fd38b82bc07971832d.js" type="module"></script><script src="main-es2015.af9c9947cf2f07f573cd.js" type="module"></script><script src="main-es5.af9c9947cf2f07f573cd.js" nomodule defer></script></body>
+<script src="runtime.js" type="module"></script><script src="polyfills.js" type="module"></script><script src="vendor.js" type="module"></script><script src="main.js" type="module"></script></body>
 </html>

angular-client/dist/fatboar/browser/layers-2x.8f2c4d11474275fbc161.png → angular-client/dist/fatboar/browser/layers-2x.png


angular-client/dist/fatboar/browser/layers.416d91365b44e4b4f477.png → angular-client/dist/fatboar/browser/layers.png


Plik diff jest za duży
+ 0 - 1
angular-client/dist/fatboar/browser/main-es2015.af9c9947cf2f07f573cd.js


Plik diff jest za duży
+ 0 - 1
angular-client/dist/fatboar/browser/main-es5.af9c9947cf2f07f573cd.js


Plik diff jest za duży
+ 7676 - 0
angular-client/dist/fatboar/browser/main.js


Plik diff jest za duży
+ 1 - 0
angular-client/dist/fatboar/browser/main.js.map


angular-client/dist/fatboar/browser/marker-icon.2b3e1faf89f94a483539.png → angular-client/dist/fatboar/browser/marker-icon.png


Plik diff jest za duży
+ 0 - 1
angular-client/dist/fatboar/browser/polyfills-es2015.92fd38b82bc07971832d.js


Plik diff jest za duży
+ 0 - 1
angular-client/dist/fatboar/browser/polyfills-es5.4735a6869193f02e06a8.js


Plik diff jest za duży
+ 3520 - 0
angular-client/dist/fatboar/browser/polyfills.js


Plik diff jest za duży
+ 1 - 0
angular-client/dist/fatboar/browser/polyfills.js.map


Plik diff jest za duży
+ 0 - 1
angular-client/dist/fatboar/browser/runtime-es2015.1eba213af0b233498d9d.js


Plik diff jest za duży
+ 0 - 1
angular-client/dist/fatboar/browser/runtime-es5.1eba213af0b233498d9d.js


+ 155 - 0
angular-client/dist/fatboar/browser/runtime.js

@@ -0,0 +1,155 @@
+/******/ (function(modules) { // webpackBootstrap
+/******/ 	// install a JSONP callback for chunk loading
+/******/ 	function webpackJsonpCallback(data) {
+/******/ 		var chunkIds = data[0];
+/******/ 		var moreModules = data[1];
+/******/ 		var executeModules = data[2];
+/******/
+/******/ 		// add "moreModules" to the modules object,
+/******/ 		// then flag all "chunkIds" as loaded and fire callback
+/******/ 		var moduleId, chunkId, i = 0, resolves = [];
+/******/ 		for(;i < chunkIds.length; i++) {
+/******/ 			chunkId = chunkIds[i];
+/******/ 			if(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {
+/******/ 				resolves.push(installedChunks[chunkId][0]);
+/******/ 			}
+/******/ 			installedChunks[chunkId] = 0;
+/******/ 		}
+/******/ 		for(moduleId in moreModules) {
+/******/ 			if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {
+/******/ 				modules[moduleId] = moreModules[moduleId];
+/******/ 			}
+/******/ 		}
+/******/ 		if(parentJsonpFunction) parentJsonpFunction(data);
+/******/
+/******/ 		while(resolves.length) {
+/******/ 			resolves.shift()();
+/******/ 		}
+/******/
+/******/ 		// add entry modules from loaded chunk to deferred list
+/******/ 		deferredModules.push.apply(deferredModules, executeModules || []);
+/******/
+/******/ 		// run deferred modules when all chunks ready
+/******/ 		return checkDeferredModules();
+/******/ 	};
+/******/ 	function checkDeferredModules() {
+/******/ 		var result;
+/******/ 		for(var i = 0; i < deferredModules.length; i++) {
+/******/ 			var deferredModule = deferredModules[i];
+/******/ 			var fulfilled = true;
+/******/ 			for(var j = 1; j < deferredModule.length; j++) {
+/******/ 				var depId = deferredModule[j];
+/******/ 				if(installedChunks[depId] !== 0) fulfilled = false;
+/******/ 			}
+/******/ 			if(fulfilled) {
+/******/ 				deferredModules.splice(i--, 1);
+/******/ 				result = __webpack_require__(__webpack_require__.s = deferredModule[0]);
+/******/ 			}
+/******/ 		}
+/******/
+/******/ 		return result;
+/******/ 	}
+/******/
+/******/ 	// The module cache
+/******/ 	var installedModules = {};
+/******/
+/******/ 	// object to store loaded and loading chunks
+/******/ 	// undefined = chunk not loaded, null = chunk preloaded/prefetched
+/******/ 	// Promise = chunk loading, 0 = chunk loaded
+/******/ 	var installedChunks = {
+/******/ 		"runtime": 0
+/******/ 	};
+/******/
+/******/ 	var deferredModules = [];
+/******/
+/******/ 	// The require function
+/******/ 	function __webpack_require__(moduleId) {
+/******/
+/******/ 		// Check if module is in cache
+/******/ 		if(installedModules[moduleId]) {
+/******/ 			return installedModules[moduleId].exports;
+/******/ 		}
+/******/ 		// Create a new module (and put it into the cache)
+/******/ 		var module = installedModules[moduleId] = {
+/******/ 			i: moduleId,
+/******/ 			l: false,
+/******/ 			exports: {}
+/******/ 		};
+/******/
+/******/ 		// Execute the module function
+/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
+/******/
+/******/ 		// Flag the module as loaded
+/******/ 		module.l = true;
+/******/
+/******/ 		// Return the exports of the module
+/******/ 		return module.exports;
+/******/ 	}
+/******/
+/******/
+/******/ 	// expose the modules object (__webpack_modules__)
+/******/ 	__webpack_require__.m = modules;
+/******/
+/******/ 	// expose the module cache
+/******/ 	__webpack_require__.c = installedModules;
+/******/
+/******/ 	// define getter function for harmony exports
+/******/ 	__webpack_require__.d = function(exports, name, getter) {
+/******/ 		if(!__webpack_require__.o(exports, name)) {
+/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
+/******/ 		}
+/******/ 	};
+/******/
+/******/ 	// define __esModule on exports
+/******/ 	__webpack_require__.r = function(exports) {
+/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
+/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
+/******/ 		}
+/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
+/******/ 	};
+/******/
+/******/ 	// create a fake namespace object
+/******/ 	// mode & 1: value is a module id, require it
+/******/ 	// mode & 2: merge all properties of value into the ns
+/******/ 	// mode & 4: return value when already ns object
+/******/ 	// mode & 8|1: behave like require
+/******/ 	__webpack_require__.t = function(value, mode) {
+/******/ 		if(mode & 1) value = __webpack_require__(value);
+/******/ 		if(mode & 8) return value;
+/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
+/******/ 		var ns = Object.create(null);
+/******/ 		__webpack_require__.r(ns);
+/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
+/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
+/******/ 		return ns;
+/******/ 	};
+/******/
+/******/ 	// getDefaultExport function for compatibility with non-harmony modules
+/******/ 	__webpack_require__.n = function(module) {
+/******/ 		var getter = module && module.__esModule ?
+/******/ 			function getDefault() { return module['default']; } :
+/******/ 			function getModuleExports() { return module; };
+/******/ 		__webpack_require__.d(getter, 'a', getter);
+/******/ 		return getter;
+/******/ 	};
+/******/
+/******/ 	// Object.prototype.hasOwnProperty.call
+/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
+/******/
+/******/ 	// __webpack_public_path__
+/******/ 	__webpack_require__.p = "";
+/******/
+/******/ 	var jsonpArray = window["webpackJsonp"] = window["webpackJsonp"] || [];
+/******/ 	var oldJsonpFunction = jsonpArray.push.bind(jsonpArray);
+/******/ 	jsonpArray.push = webpackJsonpCallback;
+/******/ 	jsonpArray = jsonpArray.slice();
+/******/ 	for(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);
+/******/ 	var parentJsonpFunction = oldJsonpFunction;
+/******/
+/******/
+/******/ 	// run deferred modules from other chunks
+/******/ 	checkDeferredModules();
+/******/ })
+/************************************************************************/
+/******/ ([]);
+//# sourceMappingURL=runtime.js.map

Plik diff jest za duży
+ 1 - 0
angular-client/dist/fatboar/browser/runtime.js.map


Plik diff jest za duży
+ 10484 - 0
angular-client/dist/fatboar/browser/styles.css


Plik diff jest za duży
+ 1 - 0
angular-client/dist/fatboar/browser/styles.css.map


Plik diff jest za duży
+ 0 - 9
angular-client/dist/fatboar/browser/styles.ef582ae2929323c4e400.css


Plik diff jest za duży
+ 237210 - 0
angular-client/dist/fatboar/browser/vendor.js


Plik diff jest za duży
+ 1 - 0
angular-client/dist/fatboar/browser/vendor.js.map


Plik diff jest za duży
+ 327499 - 0
angular-client/dist/fatboar/server/main.js


Plik diff jest za duży
+ 1 - 0
angular-client/dist/fatboar/server/main.js.map


Plik diff jest za duży
+ 3108 - 3819
angular-client/package-lock.json


+ 4 - 2
angular-client/package.json

@@ -29,9 +29,9 @@
     "@angular/router": "~9.1.4",
     "@nguniversal/express-engine": "^9.1.1",
     "@types/jwt-decode": "^2.2.1",
-    "@types/leaflet": "^1.5.12",
     "bootstrap": "^4.4.1",
     "chart.js": "^2.9.3",
+    "domino": "^2.1.6",
     "express": "^4.15.2",
     "jwt-decode": "^2.2.0",
     "karma-coverage": "^2.0.3",
@@ -52,9 +52,11 @@
     "@angular/core": "~9.1.4",
     "@angular/language-service": "~9.1.4",
     "@nguniversal/builders": "^9.1.1",
-    "@types/express": "^4.17.0",
+    "@types/express": "^4.17.2",
+    "@types/express-serve-static-core": "^4.17.13",
     "@types/jasmine": "~3.5.0",
     "@types/jasminewd2": "~2.0.3",
+    "@types/leaflet": "^1.5.17",
     "@types/node": "^12.11.1",
     "chai": "^4.2.0",
     "codelyzer": "^5.1.2",

+ 80 - 4
angular-client/server.ts

@@ -1,18 +1,31 @@
 import 'zone.js/dist/zone-node';
-
 import { ngExpressEngine } from '@nguniversal/express-engine';
 import * as express from 'express';
 import { join } from 'path';
-
 import { AppServerModule } from './src/main.server';
 import { APP_BASE_HREF } from '@angular/common';
 import { existsSync } from 'fs';
 
+// Polyfills pour le SSR
+const domino = require('domino');
+const fs = require('fs');
+const path = require('path');
+// const distFolder = join(process.cwd(), 'dist/fatboar/browser');
+// const indexHtml = existsSync(join(distFolder, 'index.original.html')) ? 'index.original.html' : 'index';
+// const template = fs.readFileSync(join(distFolder, indexHtml)).toString();
+const distFolder = join(process.cwd(), 'dist/fatboar/browser');
+const indexHtml = existsSync(join(distFolder, 'index.html')) ? 'index.html' : 'index';
+const template = fs.readFileSync(join(distFolder, indexHtml)).toString();
+
+const win = domino.createWindow(template);
+global['window'] = win;
+global['document'] = win.document;
+global['navigator'] = win.navigator;
+global['CSS'] = null;
+
 // The Express app is exported so that it can be used by serverless Functions.
 export function app() {
   const server = express();
-  const distFolder = join(process.cwd(), 'dist/fatboar/browser');
-  const indexHtml = existsSync(join(distFolder, 'index.original.html')) ? 'index.original.html' : 'index';
 
   // Our Universal express-engine (found @ https://github.com/angular/universal/tree/master/modules/express-engine)
   server.engine('html', ngExpressEngine({
@@ -58,3 +71,66 @@ if (moduleFilename === __filename || moduleFilename.includes('iisnode')) {
 }
 
 export * from './src/main.server';
+
+
+
+// import 'zone.js/dist/zone-node';
+
+// import { ngExpressEngine } from '@nguniversal/express-engine';
+// import * as express from 'express';
+// import { join } from 'path';
+
+// import { AppServerModule } from './src/main.server';
+// import { APP_BASE_HREF } from '@angular/common';
+// import { existsSync } from 'fs';
+
+// // The Express app is exported so that it can be used by serverless Functions.
+// export function app() {
+//   const server = express();
+//   const distFolder = join(process.cwd(), 'dist/fatboar/browser');
+//   const indexHtml = existsSync(join(distFolder, 'index.original.html')) ? 'index.original.html' : 'index';
+
+//   // Our Universal express-engine (found @ https://github.com/angular/universal/tree/master/modules/express-engine)
+//   server.engine('html', ngExpressEngine({
+//     bootstrap: AppServerModule,
+//   }));
+
+//   server.set('view engine', 'html');
+//   server.set('views', distFolder);
+
+//   // Example Express Rest API endpoints
+//   // server.get('/api/**', (req, res) => { });
+//   // Serve static files from /browser
+//   server.get('*.*', express.static(distFolder, {
+//     maxAge: '1y'
+//   }));
+
+//   // All regular routes use the Universal engine
+//   server.get('*', (req, res) => {
+//     res.render(indexHtml, { req, providers: [{ provide: APP_BASE_HREF, useValue: req.baseUrl }] });
+//   });
+
+//   return server;
+// }
+
+// function run() {
+//   const port = process.env.PORT || 4000;
+
+//   // Start up the Node server
+//   const server = app();
+//   server.listen(port, () => {
+//     console.log(`Node Express server listening on http://localhost:${port}`);
+//   });
+// }
+
+// // Webpack will replace 'require' with '__webpack_require__'
+// // '__non_webpack_require__' is a proxy to Node 'require'
+// // The below code is to ensure that the server is run only when not requiring the bundle.
+// declare const __non_webpack_require__: NodeRequire;
+// const mainModule = __non_webpack_require__.main;
+// const moduleFilename = mainModule && mainModule.filename || '';
+// if (moduleFilename === __filename || moduleFilename.includes('iisnode')) {
+//   run();
+// }
+
+// export * from './src/main.server';

+ 2 - 0
angular-client/src/app/app.module.ts

@@ -16,6 +16,7 @@ import { FlexLayoutModule } from "@angular/flex-layout";
 import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
 import { ChartsModule } from 'ng2-charts';
 import { FormsModule } from '@angular/forms';
+// import { FlexLayoutServerModule } from '@angular/flex-layout/server';
 import { ReactiveFormsModule } from '@angular/forms';
 
 //components
@@ -123,6 +124,7 @@ import { TirageComponent } from './components/auth/tirage/tirage.component';
     MatSnackBarModule,
     ReactiveFormsModule, 
     SatDatepickerModule, 
+    // FlexLayoutServerModule,
     SatNativeDateModule,
 
   ],

+ 2 - 0
angular-client/src/app/app.server.module.ts

@@ -1,5 +1,6 @@
 import { NgModule } from '@angular/core';
 import { ServerModule } from '@angular/platform-server';
+import { FlexLayoutServerModule } from '@angular/flex-layout/server';
 
 import { AppModule } from './app.module';
 import { AppComponent } from './app.component';
@@ -7,6 +8,7 @@ import { AppComponent } from './app.component';
 @NgModule({
   imports: [
     AppModule,
+    FlexLayoutServerModule,
     ServerModule,
   ],
   bootstrap: [AppComponent],

+ 81 - 24
angular-client/src/app/components/shared/contact/map/map.component.ts

@@ -1,9 +1,8 @@
+import { Component, OnInit, Inject, PLATFORM_ID } from '@angular/core';
+import { isPlatformBrowser } from '@angular/common';
 import { Restaurant } from './../../../../models/restaurant';
-import { Component, OnInit } from '@angular/core';
-import { HttpClient } from '@angular/common/http';
-import * as L from 'leaflet';
 import { RestaurantsService } from 'src/app/services/restaurants.service';
-
+import { LeafletService } from 'src/app/services/leaflet.service'; // Assurez-vous de créer ce service
 
 @Component({
   selector: 'app-map',
@@ -11,35 +10,93 @@ import { RestaurantsService } from 'src/app/services/restaurants.service';
   styleUrls: ['./map.component.scss']
 })
 export class MapComponent implements OnInit {
-  constructor(private restaurantsService: RestaurantsService) {}
- 
-  // Fonction d'initialisation du composant.
+  private L: any;
+  private macarte: any;
+
+  constructor(
+    private restaurantsService: RestaurantsService,
+    private leafletService: LeafletService,
+    @Inject(PLATFORM_ID) private platformId: Object
+  ) {}
+
   ngOnInit() {
+    if (isPlatformBrowser(this.platformId)) {
+      this.L = this.leafletService.getLeaflet();
+      this.initMap();
+    }
+  }
+
+  private initMap(): void {
+    if (!this.L) return;
+
     // Déclaration de la carte avec les coordonnées du centre et le niveau de zoom.
-    const macarte = L.map('frugalmap').setView([48.85513, 2.353429], 9);
-   
-    L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
+    this.macarte = this.L.map('frugalmap').setView([48.85513, 2.353429], 9);
+
+    this.L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
       attribution: 'FatBoar',
-    }).addTo(macarte);
-   
-    const myIcon = L.icon({
-      // iconUrl: 'https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.2.0/images/marker-icon.png'
+    }).addTo(this.macarte);
+
+    const myIcon = this.L.icon({
       iconUrl: "../assets/img/marker/markericon.png"
-      
     });
-   
-   
+
     this.restaurantsService.getRestaurants().subscribe((data: any) => {
-      console.log('test resto', data)
-      data.forEach( (res : Restaurant ) => {
-        var marker = L.marker([res.latitude, res.longitude], {icon: myIcon}).addTo(macarte);
-  
+      console.log('test resto', data);
+      data.forEach((res: Restaurant) => {
+        const marker = this.L.marker([res.latitude, res.longitude], { icon: myIcon }).addTo(this.macarte);
 
         marker.bindPopup(`<h5 style="text-align: center"><b>${res.name}</b></h5>  <b> adresse : </b>${res.adress}`,
-        { maxWidth: 130 , minWidth:120}
+          { maxWidth: 130, minWidth: 120 }
         );
       });
     });
-   
-  }
   }
+}
+
+
+
+// import { Restaurant } from './../../../../models/restaurant';
+// import { Component, OnInit } from '@angular/core';
+// import { HttpClient } from '@angular/common/http';
+// import * as L from 'leaflet';
+// import { RestaurantsService } from 'src/app/services/restaurants.service';
+
+
+// @Component({
+//   selector: 'app-map',
+//   templateUrl: './map.component.html',
+//   styleUrls: ['./map.component.scss']
+// })
+// export class MapComponent implements OnInit {
+//   constructor(private restaurantsService: RestaurantsService) {}
+ 
+//   // Fonction d'initialisation du composant.
+//   ngOnInit() {
+//     // Déclaration de la carte avec les coordonnées du centre et le niveau de zoom.
+//     const macarte = L.map('frugalmap').setView([48.85513, 2.353429], 9);
+   
+//     L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
+//       attribution: 'FatBoar',
+//     }).addTo(macarte);
+   
+//     const myIcon = L.icon({
+//       // iconUrl: 'https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.2.0/images/marker-icon.png'
+//       iconUrl: "../assets/img/marker/markericon.png"
+      
+//     });
+   
+   
+//     this.restaurantsService.getRestaurants().subscribe((data: any) => {
+//       console.log('test resto', data)
+//       data.forEach( (res : Restaurant ) => {
+//         var marker = L.marker([res.latitude, res.longitude], {icon: myIcon}).addTo(macarte);
+  
+
+//         marker.bindPopup(`<h5 style="text-align: center"><b>${res.name}</b></h5>  <b> adresse : </b>${res.adress}`,
+//         { maxWidth: 130 , minWidth:120}
+//         );
+//       });
+//     });
+   
+//   }
+//   }

+ 238 - 95
angular-client/src/app/services/auth.service.ts

@@ -1,144 +1,103 @@
 import { environment } from 'src/environments/environment';
 import { User } from './../models/userResponse';
 import { Token, payloadToken } from './../models/token';
-import { Injectable } from '@angular/core';
-import { HttpClient, HttpHeaders } from '@angular/common/http';
-import { BehaviorSubject, Observable, throwError } from 'rxjs';
+import { Injectable, Inject, PLATFORM_ID } from '@angular/core';
+import { HttpClient } from '@angular/common/http';
+import { BehaviorSubject, Observable } from 'rxjs';
 import { Router } from '@angular/router';
 import { MatSnackBar } from '@angular/material/snack-bar';
-import { AlertMessageComponent } from 'src/app/components/shared/alert-message/alert-message.component'
-import { catchError, map, tap } from 'rxjs/operators';
+import { AlertMessageComponent } from 'src/app/components/shared/alert-message/alert-message.component';
+import { map, tap } from 'rxjs/operators';
 import * as jwt_decode from 'jwt-decode';
-
-
+import { isPlatformBrowser } from '@angular/common';
+import { StorageService } from 'src/app/services/storage.service'; // Assurez-vous de créer ce service
 
 @Injectable({
   providedIn: 'root'
 })
 export class AuthService {
-
-  //url api
-  private apiUrl = environment.apiUrl
-
+  private apiUrl = environment.apiUrl;
   private currentUserSubject: BehaviorSubject<User> = new BehaviorSubject<User>(null);
   public currentUser: Observable<User> = this.currentUserSubject.asObservable();
-
-  
-
-
   private tokenSubject: BehaviorSubject<Token>;
   public token: Observable<Token>;
-
   private user_infoSubject: BehaviorSubject<User>;
   public user_info: Observable<User>;
-
   private messageSource = new BehaviorSubject('default message');
   currentMessage = this.messageSource.asObservable();
 
-  constructor(private http: HttpClient, public router: Router, public snackBar: MatSnackBar) {
-
-    this.tokenSubject = new BehaviorSubject<Token>(JSON.parse(localStorage.getItem('token')));
+  constructor(
+    private http: HttpClient,
+    public router: Router,
+    public snackBar: MatSnackBar,
+    private storageService: StorageService,
+    @Inject(PLATFORM_ID) private platformId: Object
+  ) {
+    this.tokenSubject = new BehaviorSubject<Token>(JSON.parse(this.storageService.getItem('token')));
     this.token = this.tokenSubject.asObservable();
-
-    this.user_infoSubject = new BehaviorSubject<User>(JSON.parse(localStorage.getItem('user')));
+    this.user_infoSubject = new BehaviorSubject<User>(JSON.parse(this.storageService.getItem('user')));
     this.user_info = this.user_infoSubject.asObservable();
-    
   }
 
   changeMessage(message: string) {
-    this.messageSource.next(message)
+    this.messageSource.next(message);
   }
 
-  //get token
   public get tokenValue(): Token {
     return this.tokenSubject.value;
   }
 
-  //get user Info
   public get userValue(): User {
     return this.user_infoSubject.value;
   }
 
-  // login get  token on login 
   signIn(credentials): Observable<Token> {
-     //debugger;
-    console.log("url ========",this.apiUrl);
-
     return this.http.post<Token>(`${this.apiUrl}/api/auth/login`, credentials)
       .pipe(map(token => {
-        // store jwt token in local storage 
-        localStorage.setItem('token', JSON.stringify(token));
+        this.storageService.setItem('token', JSON.stringify(token));
         this.tokenSubject.next(token);
         return token;
       }));
   }
 
-
-  // Méthode pour s'authentifier avec Google
   signInWithGoogle(): Observable<User> {
     return this.http.get<User>(`${this.apiUrl}/api/auth/google`).pipe(
       map(user => {
-        console.log('je suis present', user )
-        localStorage.setItem('user', JSON.stringify(user));
+        console.log('je suis present', user);
+        this.storageService.setItem('user', JSON.stringify(user));
         return user;
       })
     );
   }
-  
-  // signInWithGoogle(): Observable<string> {
-  //   return this.http.get<any>(`${this.apiUrl}/api/auth/google/callback`).pipe(
-  //     map(response => response.token),
-  //     catchError(error => {
-  //       console.log(error);
-  //       // Gérer l'erreur
-  //       throw error;
-  //     })
-  //   );
-  // }
-    // login get  token on login admin
-    signInAdmin(credentials): Observable<Token> {
-       //debugger;
-      console.log("url ========",this.apiUrl);
-  
-      return this.http.post<Token>(`${this.apiUrl}/api/auth/admin`, credentials)
-        .pipe(map(token => {
-          // store jwt token in local storage 
-          localStorage.setItem('token', JSON.stringify(token));
-          this.tokenSubject.next(token);
-          return token;
-        }));
-    }
-
 
+  signInAdmin(credentials): Observable<Token> {
+    return this.http.post<Token>(`${this.apiUrl}/api/auth/admin`, credentials)
+      .pipe(map(token => {
+        this.storageService.setItem('token', JSON.stringify(token));
+        this.tokenSubject.next(token);
+        return token;
+      }));
+  }
 
-  // iscription get  token on login 
   signUP(data): Observable<Token> {
-
     return this.http.post<Token>(`${this.apiUrl}/api/auth/signup`, data)
       .pipe(map(token => {
-        // store jwt token in local storage 
-        localStorage.setItem('token', JSON.stringify(token));
+        this.storageService.setItem('token', JSON.stringify(token));
         this.tokenSubject.next(token);
         return token;
       }));
   }
 
+  lostPassword(email): Observable<any> {
+    return this.http.put<any>(`${this.apiUrl}/api/auth/forgot-password`, email);
+  }
 
+  resetPassword(data): Observable<any> {
+    return this.http.put<any>(`${this.apiUrl}/api/auth/reset-password`, data);
+  }
 
-// mot de passe oublie 
-lostPassword(email): Observable<any> {
-  return this.http.put<any>(`${this.apiUrl}/api/auth/forgot-password`, email)
-}
-
-
-// réinitialiser mot de passe  
-resetPassword(data): Observable<any> {
-  return this.http.put<any>(`${this.apiUrl}/api/auth/reset-password`, data)
-}
-
-  // isLoggedIn
   public isLoggedIn() {
-    return localStorage.getItem('token') !== null;
+    return this.storageService.getItem('token') !== null;
   }
 
   getCurrentUser(): Observable<User> {
@@ -149,34 +108,28 @@ resetPassword(data): Observable<any> {
     );
   }
 
-  //logout
   public logout() {
-    // remove token from local storage 
-    localStorage.removeItem('token');
+    this.storageService.removeItem('token');
     this.tokenSubject.next(null);
-    // remove user from local storage 
-    localStorage.removeItem('user');
+    this.storageService.removeItem('user');
     this.user_infoSubject.next(null);
     this.router.navigate(['/login']);
-    setTimeout(() => {
-      document.location.reload()
-    },1000)
+    if (isPlatformBrowser(this.platformId)) {
+      setTimeout(() => {
+        document.location.reload();
+      }, 1000);
+    }
   }
 
-   // get info user 
-   getUserInfo(): Observable<User> {
-    
-    let decodedToken : payloadToken = jwt_decode(this.tokenSubject.value.token); 
+  getUserInfo(): Observable<User> {
+    let decodedToken: payloadToken = jwt_decode(this.tokenSubject.value.token); 
     return this.http.get<User>(`${this.apiUrl}/api/users/${decodedToken.userId}`)
       .pipe(map(user => {
-        // store user info in local storage 
-        localStorage.setItem('user', JSON.stringify(user));
+        this.storageService.setItem('user', JSON.stringify(user));
         this.user_infoSubject.next(user);
         return user; 
       }));
-    
   }
-  
 
   openSnackBar(message: string) {
     this.snackBar.openFromComponent(AlertMessageComponent, {
@@ -185,6 +138,196 @@ resetPassword(data): Observable<any> {
       duration: 10000
     });
   }
+}
+
+
+// import { environment } from 'src/environments/environment';
+// import { User } from './../models/userResponse';
+// import { Token, payloadToken } from './../models/token';
+// import { Injectable } from '@angular/core';
+// import { HttpClient, HttpHeaders } from '@angular/common/http';
+// import { BehaviorSubject, Observable, throwError } from 'rxjs';
+// import { Router } from '@angular/router';
+// import { MatSnackBar } from '@angular/material/snack-bar';
+// import { AlertMessageComponent } from 'src/app/components/shared/alert-message/alert-message.component'
+// import { catchError, map, tap } from 'rxjs/operators';
+// import * as jwt_decode from 'jwt-decode';
+
+
+
+// @Injectable({
+//   providedIn: 'root'
+// })
+// export class AuthService {
+
+//   //url api
+//   private apiUrl = environment.apiUrl
+
+//   private currentUserSubject: BehaviorSubject<User> = new BehaviorSubject<User>(null);
+//   public currentUser: Observable<User> = this.currentUserSubject.asObservable();
+
+  
+
+
+//   private tokenSubject: BehaviorSubject<Token>;
+//   public token: Observable<Token>;
+
+//   private user_infoSubject: BehaviorSubject<User>;
+//   public user_info: Observable<User>;
+
+//   private messageSource = new BehaviorSubject('default message');
+//   currentMessage = this.messageSource.asObservable();
+
+//   constructor(private http: HttpClient, public router: Router, public snackBar: MatSnackBar) {
+
+//     this.tokenSubject = new BehaviorSubject<Token>(JSON.parse(localStorage.getItem('token')));
+//     this.token = this.tokenSubject.asObservable();
+
+//     this.user_infoSubject = new BehaviorSubject<User>(JSON.parse(localStorage.getItem('user')));
+//     this.user_info = this.user_infoSubject.asObservable();
+    
+//   }
+
+//   changeMessage(message: string) {
+//     this.messageSource.next(message)
+//   }
+
+//   //get token
+//   public get tokenValue(): Token {
+//     return this.tokenSubject.value;
+//   }
+
+//   //get user Info
+//   public get userValue(): User {
+//     return this.user_infoSubject.value;
+//   }
+
+//   // login get  token on login 
+//   signIn(credentials): Observable<Token> {
+//      //debugger;
+//     console.log("url ========",this.apiUrl);
+
+//     return this.http.post<Token>(`${this.apiUrl}/api/auth/login`, credentials)
+//       .pipe(map(token => {
+//         // store jwt token in local storage 
+//         localStorage.setItem('token', JSON.stringify(token));
+//         this.tokenSubject.next(token);
+//         return token;
+//       }));
+//   }
+
+
+//   // Méthode pour s'authentifier avec Google
+//   signInWithGoogle(): Observable<User> {
+//     return this.http.get<User>(`${this.apiUrl}/api/auth/google`).pipe(
+//       map(user => {
+//         console.log('je suis present', user )
+//         localStorage.setItem('user', JSON.stringify(user));
+//         return user;
+//       })
+//     );
+//   }
+  
+//   // signInWithGoogle(): Observable<string> {
+//   //   return this.http.get<any>(`${this.apiUrl}/api/auth/google/callback`).pipe(
+//   //     map(response => response.token),
+//   //     catchError(error => {
+//   //       console.log(error);
+//   //       // Gérer l'erreur
+//   //       throw error;
+//   //     })
+//   //   );
+//   // }
+//     // login get  token on login admin
+//     signInAdmin(credentials): Observable<Token> {
+//        //debugger;
+//       console.log("url ========",this.apiUrl);
+  
+//       return this.http.post<Token>(`${this.apiUrl}/api/auth/admin`, credentials)
+//         .pipe(map(token => {
+//           // store jwt token in local storage 
+//           localStorage.setItem('token', JSON.stringify(token));
+//           this.tokenSubject.next(token);
+//           return token;
+//         }));
+//     }
+
+
+
+//   // iscription get  token on login 
+//   signUP(data): Observable<Token> {
+
+//     return this.http.post<Token>(`${this.apiUrl}/api/auth/signup`, data)
+//       .pipe(map(token => {
+//         // store jwt token in local storage 
+//         localStorage.setItem('token', JSON.stringify(token));
+//         this.tokenSubject.next(token);
+//         return token;
+//       }));
+//   }
+
+
+
+// // mot de passe oublie 
+// lostPassword(email): Observable<any> {
+//   return this.http.put<any>(`${this.apiUrl}/api/auth/forgot-password`, email)
+// }
+
+
+// // réinitialiser mot de passe  
+// resetPassword(data): Observable<any> {
+//   return this.http.put<any>(`${this.apiUrl}/api/auth/reset-password`, data)
+// }
+
+//   // isLoggedIn
+//   public isLoggedIn() {
+//     return localStorage.getItem('token') !== null;
+//   }
+
+//   getCurrentUser(): Observable<User> {
+//     return this.http.get<User>('/api/auth/user').pipe(
+//       tap((user) => {
+//         this.currentUserSubject.next(user);
+//       })
+//     );
+//   }
+
+//   //logout
+//   public logout() {
+//     // remove token from local storage 
+//     localStorage.removeItem('token');
+//     this.tokenSubject.next(null);
+//     // remove user from local storage 
+//     localStorage.removeItem('user');
+//     this.user_infoSubject.next(null);
+//     this.router.navigate(['/login']);
+//     setTimeout(() => {
+//       document.location.reload()
+//     },1000)
+//   }
+
+//    // get info user 
+//    getUserInfo(): Observable<User> {
+    
+//     let decodedToken : payloadToken = jwt_decode(this.tokenSubject.value.token); 
+//     return this.http.get<User>(`${this.apiUrl}/api/users/${decodedToken.userId}`)
+//       .pipe(map(user => {
+//         // store user info in local storage 
+//         localStorage.setItem('user', JSON.stringify(user));
+//         this.user_infoSubject.next(user);
+//         return user; 
+//       }));
+    
+//   }
+  
+
+//   openSnackBar(message: string) {
+//     this.snackBar.openFromComponent(AlertMessageComponent, {
+//       data: message,
+//       panelClass: ['blue-snackbar'],
+//       duration: 10000
+//     });
+//   }
 
 
-}
+// }

+ 20 - 0
angular-client/src/app/services/leaflet.service.ts

@@ -0,0 +1,20 @@
+// leaflet.service.ts
+import { Injectable, Inject, PLATFORM_ID } from '@angular/core';
+import { isPlatformBrowser } from '@angular/common';
+
+@Injectable({
+  providedIn: 'root'
+})
+export class LeafletService {
+  private L: any;
+
+  constructor(@Inject(PLATFORM_ID) private platformId: Object) {
+    if (isPlatformBrowser(this.platformId)) {
+      this.L = require('leaflet');
+    }
+  }
+
+  getLeaflet() {
+    return this.L;
+  }
+}

+ 33 - 0
angular-client/src/app/services/storage.service.ts

@@ -0,0 +1,33 @@
+import { Injectable, Inject, PLATFORM_ID } from '@angular/core';
+import { isPlatformBrowser } from '@angular/common';
+
+@Injectable({
+  providedIn: 'root'
+})
+export class StorageService {
+  private storage: Storage;
+
+  constructor(@Inject(PLATFORM_ID) private platformId: Object) {
+    this.storage = isPlatformBrowser(this.platformId) ? localStorage : {
+      getItem: (key: string) => null,
+      setItem: (key: string, value: string) => {},
+      removeItem: (key: string) => {},
+      length: 0,
+      clear: () => {},
+      key: (index: number) => null
+    };
+
+  }
+
+  getItem(key: string): string | null {
+    return this.storage.getItem(key);
+  }
+
+  setItem(key: string, value: string): void {
+    this.storage.setItem(key, value);
+  }
+
+  removeItem(key: string): void {
+    this.storage.removeItem(key);
+  }
+}

+ 3 - 3
express-server/lib/db.js

@@ -1,13 +1,13 @@
 const mongoose = require('mongoose');
-//const  config  = require('../config/config.json');
+const  config  = require('../config/config.json');
 //const { Ticket } = require('../models/ticket.model');
 //const { Restaurant} = require('../models/restaurant.model');
 // const { User } = require('../models/user.model');
  //const bcrypt = require('bcrypt');
 // const Role = require('../lib/role');
-//const db = config.url;
+const db = config.url;
 
-var db = 'mongodb://database_preprod:27017/mean-fatboar-db';
+//var db = 'mongodb://database_preprod:27017/mean-fatboar-db';
 //var mongoURI = 'mongodb://localhost:27017/my-db';
 //mongoose.set('useCreateIndex', true)
 mongoose.connect(db, {useNewUrlParser: true, useUnifiedTopology: true })