Skip to content

Commit

Permalink
Add <tbody> and <tr> where needed
Browse files Browse the repository at this point in the history
  • Loading branch information
BenjaminCharmes committed Nov 13, 2024
1 parent 4111abc commit bec0d59
Show file tree
Hide file tree
Showing 3 changed files with 110 additions and 104 deletions.
166 changes: 84 additions & 82 deletions webapp/src/components/BatchCreateItemModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -77,95 +77,97 @@
</tr>
</thead>
<tbody>
<td>
<input
v-model="itemTemplate.item_id"
class="form-control"
:placeholder="generateIDsAutomatically ? null : 'ex_{#}'"
:disabled="generateIDsAutomatically"
@input="applyIdTemplate"
/>
<div class="form-check mt-1 ml-1">
<tr>
<td>
<input
id="automatic-batch-id-label"
v-model="generateIDsAutomatically"
type="checkbox"
class="form-check-input clickable"
@input="setIDsNull"
/>
<label
id="automatic-id-label"
class="form-check-label clickable"
for="automatic-batch-id-label"
>
auto IDs
</label>
</div>
</td>
<td>
<input
v-model="itemTemplate.name"
class="form-control"
placeholder="Example name {#}"
@input="applyNameTemplate"
/>
</td>
<td>
<input
v-model="itemTemplate.date"
class="form-control"
type="datetime-local"
:min="epochStart"
:max="oneYearOn"
@input="applyDateTemplate"
/>
</td>
<td>
<ItemSelect
v-model="itemTemplate.copyFrom"
:formatted-item-name-max-length="8"
@update:model-value="applyCopyFromTemplate"
/>
</td>
<td>
<div v-if="item_type == 'samples'">
<ItemSelect
v-model="itemTemplate.components"
multiple
:formatted-item-name-max-length="8"
taggable
@update:model-value="applyComponentsTemplate"
v-model="itemTemplate.item_id"
class="form-control"
:placeholder="generateIDsAutomatically ? null : 'ex_{#}'"
:disabled="generateIDsAutomatically"
@input="applyIdTemplate"
/>
</div>
<div v-if="item_type == 'cells'">
<ItemSelect
v-model="itemTemplate.positiveElectrode"
multiple
:formatted-item-name-max-length="8"
taggable
placeholder="positive electrode"
@update:model-value="applyPositiveElectrodeTemplate"
<div class="form-check mt-1 ml-1">
<input
id="automatic-batch-id-label"
v-model="generateIDsAutomatically"
type="checkbox"
class="form-check-input clickable"
@input="setIDsNull"
/>
<label
id="automatic-id-label"
class="form-check-label clickable"
for="automatic-batch-id-label"
>
auto IDs
</label>
</div>
</td>
<td>
<input
v-model="itemTemplate.name"
class="form-control"
placeholder="Example name {#}"
@input="applyNameTemplate"
/>
<ItemSelect
v-model="itemTemplate.electrolyte"
multiple
:formatted-item-name-max-length="8"
class="pt-1"
taggable
placeholder="electrolyte"
@update:model-value="applyElectrolyteTemplate"
</td>
<td>
<input
v-model="itemTemplate.date"
class="form-control"
type="datetime-local"
:min="epochStart"
:max="oneYearOn"
@input="applyDateTemplate"
/>
</td>
<td>
<ItemSelect
v-model="itemTemplate.negativeElectrode"
multiple
v-model="itemTemplate.copyFrom"
:formatted-item-name-max-length="8"
class="pt-1"
taggable
placeholder="negative electrode"
@update:model-value="applyNegativeElectrodeTemplate"
@update:model-value="applyCopyFromTemplate"
/>
</div>
</td>
</td>
<td>
<div v-if="item_type == 'samples'">
<ItemSelect
v-model="itemTemplate.components"
multiple
:formatted-item-name-max-length="8"
taggable
@update:model-value="applyComponentsTemplate"
/>
</div>
<div v-if="item_type == 'cells'">
<ItemSelect
v-model="itemTemplate.positiveElectrode"
multiple
:formatted-item-name-max-length="8"
taggable
placeholder="positive electrode"
@update:model-value="applyPositiveElectrodeTemplate"
/>
<ItemSelect
v-model="itemTemplate.electrolyte"
multiple
:formatted-item-name-max-length="8"
class="pt-1"
taggable
placeholder="electrolyte"
@update:model-value="applyElectrolyteTemplate"
/>
<ItemSelect
v-model="itemTemplate.negativeElectrode"
multiple
:formatted-item-name-max-length="8"
class="pt-1"
taggable
placeholder="negative electrode"
@update:model-value="applyNegativeElectrodeTemplate"
/>
</div>
</td>
</tr>
</tbody>
</table>

Expand Down
22 changes: 12 additions & 10 deletions webapp/src/components/StatisticsTable.vue
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
<template>
<div v-if="counts" class="mx-auto">
<table>
<tr>
<td :style="{ color: itemTypes['users'].navbarColor }">{{ counts["users"] }}</td>
<td :style="{ color: itemTypes['samples'].navbarColor }">{{ counts["samples"] }}</td>
<td :style="{ color: itemTypes['cells'].navbarColor }">{{ counts["cells"] }}</td>
</tr>
<tr>
<th>Active Users</th>
<th>Samples</th>
<th>Cells</th>
</tr>
<tbody>
<tr>
<td :style="{ color: itemTypes['users'].navbarColor }">{{ counts["users"] }}</td>
<td :style="{ color: itemTypes['samples'].navbarColor }">{{ counts["samples"] }}</td>
<td :style="{ color: itemTypes['cells'].navbarColor }">{{ counts["cells"] }}</td>
</tr>
<tr>
<th>Active Users</th>
<th>Samples</th>
<th>Cells</th>
</tr>
</tbody>
</table>
</div>
</template>
Expand Down
26 changes: 14 additions & 12 deletions webapp/src/views/About.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,20 @@
<h5>Deployment info:</h5>
<div class="p-3">
<table>
<tr>
<td>API version</td>
<td>
<code>{{ apiInfo?.server_version ?? "unknown" }}</code>
</td>
</tr>
<tr>
<td>App version</td>
<td>
<code>{{ appVersion }}</code>
</td>
</tr>
<tbody>
<tr>
<td>API version</td>
<td>
<code>{{ apiInfo?.server_version ?? "unknown" }}</code>
</td>
</tr>
<tr>
<td>App version</td>
<td>
<code>{{ appVersion }}</code>
</td>
</tr>
</tbody>
</table>
</div>

Expand Down

0 comments on commit bec0d59

Please sign in to comment.