Compare commits
4 Commits
1630bce795
...
8c820ab24d
Author | SHA1 | Date |
---|---|---|
|
8c820ab24d | |
|
d26463d43c | |
|
4fda17d2c6 | |
|
094a84c745 |
|
@ -0,0 +1,22 @@
|
|||
#!/bin/bash
|
||||
|
||||
tmux new-session -d -s test
|
||||
tmux send-keys -t test "a serve" Enter
|
||||
|
||||
tmux new-window -t test
|
||||
tmux send-keys -t test "SS start docker && duu meilisearch" Enter
|
||||
|
||||
tmux new-window -t test
|
||||
tmux send-keys -t test "SS start docker && duu socketi" Enter
|
||||
|
||||
tmux new-window -t test
|
||||
tmux send-keys -t test "nrh" Enter
|
||||
|
||||
tmux new-window -t test
|
||||
tmux send-keys -t test "ggwdk && cd plugins/silva/adrema/assets/vendor/adrema-form && nrd" Enter
|
||||
|
||||
tmux new-window -t test
|
||||
tmux send-keys -t test "cd tests/Fileshare && docker compose up" Enter
|
||||
|
||||
tmux attach-session -t test
|
||||
|
|
@ -5,20 +5,9 @@
|
|||
<span v-show="required" class="text-red-800"> *</span>
|
||||
</span>
|
||||
<div class="real-field-wrap size-sm" :class="sizes[size].field">
|
||||
<input
|
||||
:name="name"
|
||||
:type="type"
|
||||
:value="transformedValue"
|
||||
:disabled="disabled"
|
||||
:placeholder="placeholder"
|
||||
:min="min"
|
||||
:max="max"
|
||||
@keypress="$emit('keypress', $event)"
|
||||
@input="onInput"
|
||||
@change="onChange"
|
||||
@focus="onFocus"
|
||||
@blur="onBlur"
|
||||
/>
|
||||
<input :name="name" :type="type" :value="transformedValue" :disabled="disabled" :placeholder="placeholder"
|
||||
:min="min" :max="max" @keypress="$emit('keypress', $event)" @input="onInput" @change="onChange"
|
||||
@focus="onFocus" @blur="onBlur" />
|
||||
<div v-if="hint" class="info-wrap">
|
||||
<div v-tooltip="hint">
|
||||
<ui-sprite src="info-button" class="info-button"></ui-sprite>
|
||||
|
@ -33,129 +22,36 @@ import wNumb from 'wnumb';
|
|||
|
||||
var numb = {
|
||||
natural: wNumb({
|
||||
mark: ',',
|
||||
thousand: '.',
|
||||
decimals: 0,
|
||||
decoder(a) {
|
||||
return a * 100;
|
||||
},
|
||||
encoder(a) {
|
||||
return a / 100;
|
||||
},
|
||||
}),
|
||||
naturalRaw: wNumb({
|
||||
mark: '',
|
||||
thousand: '',
|
||||
decimals: 0,
|
||||
decoder(a) {
|
||||
return a * 100;
|
||||
},
|
||||
encoder(a) {
|
||||
return a / 100;
|
||||
},
|
||||
}),
|
||||
naturalDetailRaw: wNumb({
|
||||
mark: '',
|
||||
thousand: '',
|
||||
decimals: 0,
|
||||
decoder(a) {
|
||||
return a * 10000;
|
||||
},
|
||||
encoder(a) {
|
||||
return a / 10000;
|
||||
},
|
||||
decoder: (a) => a * 100,
|
||||
encoder: (a) => a / 100,
|
||||
}),
|
||||
area: wNumb({
|
||||
mark: ',',
|
||||
thousand: '.',
|
||||
decimals: 2,
|
||||
decoder(a) {
|
||||
return a * 100;
|
||||
},
|
||||
encoder(a) {
|
||||
return a / 100;
|
||||
},
|
||||
}),
|
||||
areaDetail: wNumb({
|
||||
mark: ',',
|
||||
thousand: '.',
|
||||
decimals: 4,
|
||||
decoder(a) {
|
||||
return a * 10000;
|
||||
},
|
||||
encoder(a) {
|
||||
return a / 10000;
|
||||
},
|
||||
}),
|
||||
twoDecimalRaw: wNumb({
|
||||
mark: ',',
|
||||
thousand: '',
|
||||
decimals: 2,
|
||||
decoder(a) {
|
||||
return a * 100;
|
||||
},
|
||||
encoder(a) {
|
||||
return a / 100;
|
||||
},
|
||||
}),
|
||||
fourDecimalRaw: wNumb({
|
||||
mark: ',',
|
||||
thousand: '',
|
||||
decimals: 4,
|
||||
decoder(a) {
|
||||
return a * 10000;
|
||||
},
|
||||
encoder(a) {
|
||||
return a / 10000;
|
||||
},
|
||||
decoder: (a) => a * 100,
|
||||
encoder: (a) => a / 100,
|
||||
}),
|
||||
};
|
||||
|
||||
var transformers = {
|
||||
none: {
|
||||
display: {
|
||||
to(v) {
|
||||
return v;
|
||||
},
|
||||
from(v) {
|
||||
return v;
|
||||
},
|
||||
to: (v) => v,
|
||||
from: (v) => v,
|
||||
},
|
||||
edit: {
|
||||
to(v) {
|
||||
return v;
|
||||
},
|
||||
from(v) {
|
||||
return v;
|
||||
},
|
||||
},
|
||||
},
|
||||
natural: {
|
||||
display: {
|
||||
to(v) {
|
||||
return isNaN(parseInt(v)) ? '' : numb.natural.to(v);
|
||||
},
|
||||
from(v) {
|
||||
return v === '' ? null : numb.natural.from(v);
|
||||
},
|
||||
},
|
||||
edit: {
|
||||
to(v) {
|
||||
return isNaN(parseInt(v)) ? '' : numb.naturalRaw.to(v);
|
||||
},
|
||||
from(v) {
|
||||
return v === '' ? null : numb.naturalRaw.from(v);
|
||||
},
|
||||
to: (v) => v,
|
||||
from: (v) => v,
|
||||
},
|
||||
},
|
||||
area: {
|
||||
display: {
|
||||
to(v) {
|
||||
return v === null ? '' : numb.area.to(v);
|
||||
},
|
||||
from(v) {
|
||||
return v === '' ? null : numb.area.from(v);
|
||||
},
|
||||
to: (v) => (v === null ? '' : numb.area.to(v)),
|
||||
from: (v) => (v === '' ? null : numb.area.from(v)),
|
||||
},
|
||||
edit: {
|
||||
to(v) {
|
||||
|
@ -163,81 +59,19 @@ var transformers = {
|
|||
return '';
|
||||
}
|
||||
if (Math.round(v / 100) * 100 === v) {
|
||||
return numb.naturalRaw.to(v);
|
||||
return numb.natural.to(v);
|
||||
}
|
||||
return numb.twoDecimalRaw.to(v);
|
||||
return numb.area.to(v);
|
||||
},
|
||||
from(v) {
|
||||
if (v === '') {
|
||||
return null;
|
||||
}
|
||||
if (v.indexOf(',') === -1) {
|
||||
return numb.naturalRaw.from(v);
|
||||
return numb.natural.from(v);
|
||||
}
|
||||
|
||||
return numb.twoDecimalRaw.from(v);
|
||||
},
|
||||
},
|
||||
},
|
||||
currency: {
|
||||
display: {
|
||||
to(v) {
|
||||
return v === null ? '' : numb.area.to(v);
|
||||
},
|
||||
from(v) {
|
||||
return v === '' ? null : numb.area.from(v);
|
||||
},
|
||||
},
|
||||
edit: {
|
||||
to(v) {
|
||||
if (v === null) {
|
||||
return '';
|
||||
}
|
||||
if (Math.round(v / 100) * 100 === v) {
|
||||
return numb.naturalRaw.to(v);
|
||||
}
|
||||
return numb.twoDecimalRaw.to(v);
|
||||
},
|
||||
from(v) {
|
||||
if (v === '') {
|
||||
return null;
|
||||
}
|
||||
if (v.indexOf(',') === -1) {
|
||||
return numb.naturalRaw.from(v);
|
||||
}
|
||||
|
||||
return numb.twoDecimalRaw.from(v);
|
||||
},
|
||||
},
|
||||
},
|
||||
currencyDetail: {
|
||||
display: {
|
||||
to(v) {
|
||||
return v === null ? '' : numb.areaDetail.to(v);
|
||||
},
|
||||
from(v) {
|
||||
return v === '' ? null : numb.areaDetail.from(v);
|
||||
},
|
||||
},
|
||||
edit: {
|
||||
to(v) {
|
||||
if (v === null) {
|
||||
return '';
|
||||
}
|
||||
if (Math.round(v / 10000) * 10000 === v) {
|
||||
return numb.naturalDetailRaw.to(v);
|
||||
}
|
||||
return numb.fourDecimalRaw.to(v);
|
||||
},
|
||||
from(v) {
|
||||
if (v === '') {
|
||||
return null;
|
||||
}
|
||||
if (v.indexOf(',') === -1) {
|
||||
return numb.naturalDetailRaw.from(v);
|
||||
}
|
||||
|
||||
return numb.fourDecimalRaw.from(v);
|
||||
return numb.area.from(v);
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
@ -2,9 +2,13 @@ import {ref, inject, onBeforeUnmount} from 'vue';
|
|||
import {router} from '@inertiajs/vue3';
|
||||
import useQueueEvents from './useQueueEvents.js';
|
||||
|
||||
export function useApiIndex(firstUrl, siteName) {
|
||||
export function useApiIndex(firstUrl, siteName = null) {
|
||||
const axios = inject('axios');
|
||||
const {startListener, stopListener} = useQueueEvents(siteName, () => reload());
|
||||
|
||||
if (siteName !== null) {
|
||||
var {startListener, stopListener} = useQueueEvents(siteName, () => reload());
|
||||
}
|
||||
|
||||
const single = ref(null);
|
||||
|
||||
const url = ref(firstUrl);
|
||||
|
@ -78,8 +82,10 @@ export function useApiIndex(firstUrl, siteName) {
|
|||
url.value = newUrl;
|
||||
}
|
||||
|
||||
if (siteName !== null) {
|
||||
startListener();
|
||||
onBeforeUnmount(() => stopListener());
|
||||
}
|
||||
|
||||
return {
|
||||
data: inner.data,
|
||||
|
|
|
@ -113,7 +113,7 @@
|
|||
<div class="flex space-x-2">
|
||||
<ui-action-button tooltip="Anschauen" :href="invoice.links.pdf" class="btn-info" icon="eye" blank></ui-action-button>
|
||||
<ui-action-button tooltip="Erinnerung anschauen" :href="invoice.links.rememberpdf" class="btn-info" icon="document" blank></ui-action-button>
|
||||
<ui-action-button tooltip="Bearbeiten" class="btn-warning" icon="pencil" @click.prevent="edit(invoice)"></ui-action-button>
|
||||
<ui-action-button :data-cy="`edit-button-${invoice.id}`" tooltip="Bearbeiten" class="btn-warning" icon="pencil" @click.prevent="edit(invoice)"></ui-action-button>
|
||||
<ui-action-button tooltip="Löschen" class="btn-danger" icon="trash" @click.prevent="deleting = invoice"></ui-action-button>
|
||||
</div>
|
||||
</td>
|
||||
|
|
Loading…
Reference in New Issue