accrete 0.0.106__py3-none-any.whl → 0.0.107__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21,14 +21,25 @@
21
21
  <script src="{% static "js/alpine3.14.1.js" %}" defer type="text/javascript"></script>
22
22
  <script defer>
23
23
  document.addEventListener("setTenant", function(evt){
24
- document.body.setAttribute("data-tenant-id", evt.detail.value);
24
+ document.body.setAttribute('data-tenant-id', evt.detail.value);
25
25
  })
26
26
  document.addEventListener('htmx:configRequest', function (evt) {
27
27
  evt.detail.headers['X-TENANT-ID'] = getTenant();
28
28
  })
29
+ document.addEventListener('htmx:afterRequest', function(evt) {
30
+ const url = new URL(window.location);
31
+ url.searchParams.set('tenant_id', document.body.getAttribute('data-tenant-id'));
32
+ history.replaceState(null, '', url);
33
+ })
29
34
  function getTenant() {
30
35
  return document.body.getAttribute('data-tenant-id')
31
36
  }
37
+ window.addEventListener('DOMContentLoaded', (event) => {
38
+ const url = new URL(window.location);
39
+ if (!document.body.getAttribute('data-tenant-id') && url.searchParams.get('tenant_id')) {
40
+ document.body.setAttribute('data-tenant-id', url.searchParams.get('tenant_id'));
41
+ }
42
+ })
32
43
  </script>
33
44
  <title>{% block title %}{{ title }} | HRP{% endblock %}</title>
34
45
  {% endblock %}
@@ -44,7 +55,7 @@
44
55
  <i class="fa fa-outdent" x-show="showPanel"></i>
45
56
  </button>
46
57
  </div>
47
- <div class="navbar-item is-unselectable pl-0"
58
+ <div class="navbar-item is-unselectable"
48
59
  onclick="document.getElementById('tenant-quick-switch').classList.toggle('is-invisible')"
49
60
  >
50
61
  {{ request.tenant.name }}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: accrete
3
- Version: 0.0.106
3
+ Version: 0.0.107
4
4
  Summary: Django Shared Schema Multi Tenant
5
5
  Author-email: Benedikt Jilek <benedikt.jilek@pm.me>
6
6
  License: Copyright (c) 2023 Benedikt Jilek
@@ -303,7 +303,7 @@ accrete/contrib/ui/templates/django/forms/widgets/select.html,sha256=uSfDpOQox2m
303
303
  accrete/contrib/ui/templates/django/forms/widgets/text.html,sha256=MSmLlQc7PsPoDLVtTOOiWNprrsPriNr712yFxaHyDIo,47
304
304
  accrete/contrib/ui/templates/django/forms/widgets/textarea.html,sha256=c9BTedqb3IkXLyVYd0p9pR8DFnsXCNGoxVBWZTk_Fic,278
305
305
  accrete/contrib/ui/templates/ui/content_right.html,sha256=XUF1tYpSKfO9FleYtJ2QmWPmwdLYxLHXdBLRa-BrFUs,221
306
- accrete/contrib/ui/templates/ui/layout.html,sha256=v7J-hK1MYygiEATfE26ldjtiWksnGVsVFeEPJS-20cU,11683
306
+ accrete/contrib/ui/templates/ui/layout.html,sha256=Cdr-iPVjSPp7m3Sxx8SgjZ7Bhq3dfmRK9v8ocuOtf04,12336
307
307
  accrete/contrib/ui/templates/ui/list.html,sha256=mXsTQdGXJUQ4qe1_QIU2uCcy5KHSEnueJPA_cb1NY0M,2247
308
308
  accrete/contrib/ui/templates/ui/list_update.html,sha256=mLQTCgkKfVI5jrgei-Upc1u87iXL0Q63uLzXHPwMyeo,110
309
309
  accrete/contrib/ui/templates/ui/message.html,sha256=t3bZ5EE7IgQYJroCdLKFeUkZiNbgKkErVYQm6Y3IKpg,532
@@ -364,7 +364,7 @@ accrete/utils/forms.py,sha256=IvxbXNpSd4a-JBgsTJhs2GHe-DCRWX-xnVPRcoiCzbI,3104
364
364
  accrete/utils/log.py,sha256=BH0MBDweAjx30wGBO4F3sFhbgkSoEs7T1lLLjlYZNnA,407
365
365
  accrete/utils/models.py,sha256=2xTacvcpmDK_Bp4rAK7JdVLf8HU009LYNJ6eSpMgYZI,1014
366
366
  accrete/utils/views.py,sha256=AutijWetWGgjdO1PNc4gxCblT-i1fAfldNDFRbO9Sac,5012
367
- accrete-0.0.106.dist-info/METADATA,sha256=0LLsOH_aNzvlCHtFCpM-Fq07LlMy4epQkuNcYTVuRzI,4953
368
- accrete-0.0.106.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
369
- accrete-0.0.106.dist-info/licenses/LICENSE,sha256=_7laeMIHnsd3Y2vJEXDYXq_PEXxIcjgJsGt8UIKTRWc,1057
370
- accrete-0.0.106.dist-info/RECORD,,
367
+ accrete-0.0.107.dist-info/METADATA,sha256=c05XlclvLsaT8W2tPA25Ogg55eql5dMjCXu_ryNcdNc,4953
368
+ accrete-0.0.107.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
369
+ accrete-0.0.107.dist-info/licenses/LICENSE,sha256=_7laeMIHnsd3Y2vJEXDYXq_PEXxIcjgJsGt8UIKTRWc,1057
370
+ accrete-0.0.107.dist-info/RECORD,,