Skip to content

Commit 8328b87

Browse files
committed
chore: added better description what and what not gets exported and improrted
1 parent 69f3e60 commit 8328b87

3 files changed

Lines changed: 55 additions & 2 deletions

File tree

internal/assets/dist/index.css

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7091,6 +7091,13 @@
70917091
.gap-10 {
70927092
gap: calc(var(--spacing) * 10);
70937093
}
7094+
.space-y-0\.5 {
7095+
:where(& > :not(:last-child)) {
7096+
--tw-space-y-reverse: 0;
7097+
margin-block-start: calc(calc(var(--spacing) * 0.5) * var(--tw-space-y-reverse));
7098+
margin-block-end: calc(calc(var(--spacing) * 0.5) * calc(1 - var(--tw-space-y-reverse)));
7099+
}
7100+
}
70947101
.space-y-3 {
70957102
:where(& > :not(:last-child)) {
70967103
--tw-space-y-reverse: 0;
@@ -8272,6 +8279,9 @@
82728279
.text-center {
82738280
text-align: center;
82748281
}
8282+
.text-left {
8283+
text-align: left;
8284+
}
82758285
.text-right {
82768286
text-align: right;
82778287
}
@@ -8953,6 +8963,12 @@
89538963
color: color-mix(in oklab, var(--color-base-content) 60%, transparent);
89548964
}
89558965
}
8966+
.text-base-content\/70 {
8967+
color: var(--color-base-content);
8968+
@supports (color: color-mix(in lab, red, red)) {
8969+
color: color-mix(in oklab, var(--color-base-content) 70%, transparent);
8970+
}
8971+
}
89568972
.text-blue-800 {
89578973
color: var(--color-blue-800);
89588974
}

internal/templates/pages/equipment/import.tmpl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,17 @@
1111
</p>
1212
</div>
1313

14+
<div role="alert" class="alert text-sm">
15+
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>
16+
<div>
17+
<p class="font-medium underline">Limitations</p>
18+
<ul class="mt-1 list-disc list-inside space-y-0.5 text-base-content">
19+
<li>Images cannot be imported and must be added manually after import</li>
20+
<li>The Content tab of serialized equipment cannot be imported</li>
21+
</ul>
22+
</div>
23+
</div>
24+
1425
<form method="post" action="/orgs/{{ .Data.OrgID }}/equipment/import" enctype="multipart/form-data" class="flex flex-col gap-4">
1526
<fieldset class="fieldset">
1627
<legend class="fieldset-legend">CSV file</legend>

internal/templates/pages/equipment/index.tmpl

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@
2828
</a>
2929
</li>
3030
<li>
31-
<a href="/orgs/{{ .Data.OrgID }}/equipment/export">
31+
<button data-modal-target="export-dialog" class="w-full">
3232
<span class="w-4 h-4">{{ template "export-icon" . }}</span>
3333
Export CSV
34-
</a>
34+
</button>
3535
</li>
3636
</ul>
3737
</div>
@@ -138,5 +138,31 @@
138138
</div>
139139
{{ end }}
140140
</div>
141+
142+
<dialog id="export-dialog" class="modal">
143+
<div class="modal-box">
144+
<h3 class="text-xl font-bold">Export Equipment CSV</h3>
145+
<div role="alert" class="alert text-sm mt-4">
146+
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>
147+
<div>
148+
<p class="font-medium">Not included in the export</p>
149+
<ul class="mt-1 list-disc list-inside space-y-0.5 text-base-content/70">
150+
<li>Images</li>
151+
<li>The Content tab of serialized equipment</li>
152+
</ul>
153+
</div>
154+
</div>
155+
<div class="modal-action">
156+
<form method="dialog">
157+
<button class="btn btn-ghost">Cancel</button>
158+
</form>
159+
<a href="/orgs/{{ .Data.OrgID }}/equipment/export" class="btn btn-primary">Download CSV</a>
160+
</div>
161+
</div>
162+
<form method="dialog" class="modal-backdrop">
163+
<button>close</button>
164+
</form>
165+
</dialog>
166+
141167
{{ template "photo-viewer-dialog" . }}
142168
{{ end }}

0 commit comments

Comments
 (0)