Compare commits
No commits in common. "8c820ab24d917237b2c237d06a4158171b81f265" and "1630bce7950be3d3579e20186f4a989610f6aa49" have entirely different histories.
8c820ab24d
...
1630bce795
22
bin/run
22
bin/run
|
@ -1,22 +0,0 @@
|
||||||
#!/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,9 +5,20 @@
|
||||||
<span v-show="required" class="text-red-800"> *</span>
|
<span v-show="required" class="text-red-800"> *</span>
|
||||||
</span>
|
</span>
|
||||||
<div class="real-field-wrap size-sm" :class="sizes[size].field">
|
<div class="real-field-wrap size-sm" :class="sizes[size].field">
|
||||||
<input :name="name" :type="type" :value="transformedValue" :disabled="disabled" :placeholder="placeholder"
|
<input
|
||||||
:min="min" :max="max" @keypress="$emit('keypress', $event)" @input="onInput" @change="onChange"
|
:name="name"
|
||||||
@focus="onFocus" @blur="onBlur" />
|
: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-if="hint" class="info-wrap">
|
||||||
<div v-tooltip="hint">
|
<div v-tooltip="hint">
|
||||||
<ui-sprite src="info-button" class="info-button"></ui-sprite>
|
<ui-sprite src="info-button" class="info-button"></ui-sprite>
|
||||||
|
@ -22,36 +33,129 @@ import wNumb from 'wnumb';
|
||||||
|
|
||||||
var numb = {
|
var numb = {
|
||||||
natural: wNumb({
|
natural: wNumb({
|
||||||
|
mark: ',',
|
||||||
|
thousand: '.',
|
||||||
|
decimals: 0,
|
||||||
|
decoder(a) {
|
||||||
|
return a * 100;
|
||||||
|
},
|
||||||
|
encoder(a) {
|
||||||
|
return a / 100;
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
naturalRaw: wNumb({
|
||||||
mark: '',
|
mark: '',
|
||||||
thousand: '',
|
thousand: '',
|
||||||
decimals: 0,
|
decimals: 0,
|
||||||
decoder: (a) => a * 100,
|
decoder(a) {
|
||||||
encoder: (a) => a / 100,
|
return a * 100;
|
||||||
|
},
|
||||||
|
encoder(a) {
|
||||||
|
return a / 100;
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
naturalDetailRaw: wNumb({
|
||||||
|
mark: '',
|
||||||
|
thousand: '',
|
||||||
|
decimals: 0,
|
||||||
|
decoder(a) {
|
||||||
|
return a * 10000;
|
||||||
|
},
|
||||||
|
encoder(a) {
|
||||||
|
return a / 10000;
|
||||||
|
},
|
||||||
}),
|
}),
|
||||||
area: wNumb({
|
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: ',',
|
mark: ',',
|
||||||
thousand: '',
|
thousand: '',
|
||||||
decimals: 2,
|
decimals: 2,
|
||||||
decoder: (a) => a * 100,
|
decoder(a) {
|
||||||
encoder: (a) => a / 100,
|
return a * 100;
|
||||||
|
},
|
||||||
|
encoder(a) {
|
||||||
|
return a / 100;
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
fourDecimalRaw: wNumb({
|
||||||
|
mark: ',',
|
||||||
|
thousand: '',
|
||||||
|
decimals: 4,
|
||||||
|
decoder(a) {
|
||||||
|
return a * 10000;
|
||||||
|
},
|
||||||
|
encoder(a) {
|
||||||
|
return a / 10000;
|
||||||
|
},
|
||||||
}),
|
}),
|
||||||
};
|
};
|
||||||
|
|
||||||
var transformers = {
|
var transformers = {
|
||||||
none: {
|
none: {
|
||||||
display: {
|
display: {
|
||||||
to: (v) => v,
|
to(v) {
|
||||||
from: (v) => v,
|
return v;
|
||||||
|
},
|
||||||
|
from(v) {
|
||||||
|
return v;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
edit: {
|
edit: {
|
||||||
to: (v) => v,
|
to(v) {
|
||||||
from: (v) => 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);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
area: {
|
area: {
|
||||||
display: {
|
display: {
|
||||||
to: (v) => (v === null ? '' : numb.area.to(v)),
|
to(v) {
|
||||||
from: (v) => (v === '' ? null : numb.area.from(v)),
|
return v === null ? '' : numb.area.to(v);
|
||||||
|
},
|
||||||
|
from(v) {
|
||||||
|
return v === '' ? null : numb.area.from(v);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
edit: {
|
edit: {
|
||||||
to(v) {
|
to(v) {
|
||||||
|
@ -59,19 +163,81 @@ var transformers = {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
if (Math.round(v / 100) * 100 === v) {
|
if (Math.round(v / 100) * 100 === v) {
|
||||||
return numb.natural.to(v);
|
return numb.naturalRaw.to(v);
|
||||||
}
|
}
|
||||||
return numb.area.to(v);
|
return numb.twoDecimalRaw.to(v);
|
||||||
},
|
},
|
||||||
from(v) {
|
from(v) {
|
||||||
if (v === '') {
|
if (v === '') {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if (v.indexOf(',') === -1) {
|
if (v.indexOf(',') === -1) {
|
||||||
return numb.natural.from(v);
|
return numb.naturalRaw.from(v);
|
||||||
}
|
}
|
||||||
|
|
||||||
return numb.area.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);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -2,13 +2,9 @@ import {ref, inject, onBeforeUnmount} from 'vue';
|
||||||
import {router} from '@inertiajs/vue3';
|
import {router} from '@inertiajs/vue3';
|
||||||
import useQueueEvents from './useQueueEvents.js';
|
import useQueueEvents from './useQueueEvents.js';
|
||||||
|
|
||||||
export function useApiIndex(firstUrl, siteName = null) {
|
export function useApiIndex(firstUrl, siteName) {
|
||||||
const axios = inject('axios');
|
const axios = inject('axios');
|
||||||
|
const {startListener, stopListener} = useQueueEvents(siteName, () => reload());
|
||||||
if (siteName !== null) {
|
|
||||||
var {startListener, stopListener} = useQueueEvents(siteName, () => reload());
|
|
||||||
}
|
|
||||||
|
|
||||||
const single = ref(null);
|
const single = ref(null);
|
||||||
|
|
||||||
const url = ref(firstUrl);
|
const url = ref(firstUrl);
|
||||||
|
@ -82,10 +78,8 @@ export function useApiIndex(firstUrl, siteName = null) {
|
||||||
url.value = newUrl;
|
url.value = newUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (siteName !== null) {
|
startListener();
|
||||||
startListener();
|
onBeforeUnmount(() => stopListener());
|
||||||
onBeforeUnmount(() => stopListener());
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
data: inner.data,
|
data: inner.data,
|
||||||
|
|
|
@ -113,7 +113,7 @@
|
||||||
<div class="flex space-x-2">
|
<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="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="Erinnerung anschauen" :href="invoice.links.rememberpdf" class="btn-info" icon="document" blank></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="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>
|
<ui-action-button tooltip="Löschen" class="btn-danger" icon="trash" @click.prevent="deleting = invoice"></ui-action-button>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
|
Loading…
Reference in New Issue