Changed notify duration
This commit is contained in:
@@ -240,8 +240,15 @@ class WarehouseShippingNoteController extends TTCrud {
|
||||
$hoursEntries = json_decode($shippingNote->hoursEntries, true);
|
||||
foreach ($hoursEntries as $hoursEntry) {
|
||||
// die(json_encode($hoursEntry));
|
||||
$articleTitle = "Arbeitsstunden";
|
||||
if (isset($hoursEntry['priceType']) && $hoursEntry['priceType'] == 50) {
|
||||
$articleTitle = "Arbeitsstunden (50% Zuschlag)";
|
||||
} elseif (isset($hoursEntry['priceType']) && $hoursEntry['priceType'] == 100) {
|
||||
$articleTitle = "Arbeitsstunden (100% Zuschlag)";
|
||||
}
|
||||
|
||||
$positions[] = [
|
||||
'articleTitle' => "Arbeitsstunden",
|
||||
'articleTitle' => $articleTitle,
|
||||
'articleDescription' => "Datum: ". date("d.m.Y", strtotime($hoursEntry['date'])) . " | Mitarbeiter: " . UserModel::getOne($hoursEntry['userId'])->name,
|
||||
'articleUnit' => 'Std.',
|
||||
'amount' => $hoursEntry['hourCount'],
|
||||
|
||||
@@ -36,10 +36,19 @@
|
||||
grid-gap: 10px;
|
||||
}
|
||||
|
||||
.warehouse-shipping-note-modal-positions-entry-actions, .warehouse-shipping-note-modal-hours-entry-actions {
|
||||
.warehouse-shipping-note-modal-positions-entry-actions {
|
||||
grid-column: 2;
|
||||
}
|
||||
|
||||
.warehouse-shipping-note-modal-hours-entry-actions {
|
||||
grid-column: 1 / span 2;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.modal .table.table-striped.table-sm button{
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.signModal > div {
|
||||
margin: 0;
|
||||
width: 100vw;
|
||||
|
||||
@@ -47,6 +47,7 @@ Vue.component('warehouse-shipping-note-modal-hours-entry', {
|
||||
hourCount: '',
|
||||
kilometerCount: '',
|
||||
hourlyPrice: '',
|
||||
priceType: 'normal',
|
||||
}
|
||||
},
|
||||
//language=Vue
|
||||
@@ -55,6 +56,7 @@ Vue.component('warehouse-shipping-note-modal-hours-entry', {
|
||||
<tt-autocomplete v-model="userId" :api-url="userApiUrl" label="Mitarbeiter" sm/>
|
||||
<tt-input v-model="date" label="Datum" type="date" sm/>
|
||||
<tt-input v-model="hourCount" label="Stunden" sm/>
|
||||
<tt-select v-model="priceType" label="Stundenart" sm :options="[{text: 'Normal', value: 'normal'}, {text: '+50%', value: '50'}, {text: '+100%', value: '100'}]"/>
|
||||
<tt-autocomplete v-model="carId" :api-url="carApiUrl" label="Fahrzeug" sm/>
|
||||
<tt-input v-model="hourlyPrice" label="Stundenlohn" type="number" sm v-if="showHourlyPrice"/>
|
||||
<tt-input :disabled="carId === ''" v-model="kilometerCount" label="Kilometer" sm/>
|
||||
@@ -74,6 +76,7 @@ Vue.component('warehouse-shipping-note-modal-hours-entry', {
|
||||
userId: this.userId,
|
||||
date: this.date,
|
||||
hourCount: this.hourCount,
|
||||
priceType: this.priceType,
|
||||
hourlyPrice: this.hourlyPrice || null,
|
||||
carId: this.carId ? this.carId : null,
|
||||
kilometerCount: this.carId ? this.kilometerCount : null
|
||||
@@ -103,7 +106,7 @@ Vue.component('warehouse-shipping-note-modal-hours-entry', {
|
||||
if (!this.userId || this.carId) return;
|
||||
const response = await axios.get(window.TT_CONFIG["BASE_PATH"] + '/WarehouseShippingNote/timerecordingCarForUser?userId=' + this.userId);
|
||||
if (response.data.status === 'USER_NO_CAR') {
|
||||
this.window.notify('info', 'Kein zugewiesenes Fahrzeug gefunden');
|
||||
// this.window.notify('info', 'Kein zugewiesenes Fahrzeug gefunden');
|
||||
this.carId = '';
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
// @formatter:on
|
||||
|
||||
const notyf = new Notyf({
|
||||
duration: 10000, position: {
|
||||
duration: 6000, position: {
|
||||
x: 'right', y: 'bottom',
|
||||
}, ripple: true, dismissible: true, fontSize: '32px',
|
||||
types: [{
|
||||
|
||||
@@ -44,14 +44,18 @@ Vue.component('tt-modal', {
|
||||
this.$emit('submit')
|
||||
}
|
||||
}
|
||||
}, //language=Vue
|
||||
},
|
||||
data() {
|
||||
return {window: window, isMobile: navigator.userAgent.match(/(iPad)|(iPhone)|(iPod)|(android)|(webOS)/i) !== null}
|
||||
},
|
||||
//language=Vue
|
||||
template: `
|
||||
<div class="modal show d-block"
|
||||
role="dialog"
|
||||
tabindex="-1"
|
||||
style="background: rgba(0, 0, 0, 0.5);"
|
||||
ref="modal"
|
||||
@mousedown="$emit('update:show', false)"
|
||||
@mousedown="!isMobile ? $emit('update:show', false) : null"
|
||||
@keydown.esc="$emit('update:show', false)"
|
||||
v-if="show">
|
||||
<div class="modal-dialog modal-lg modal-dialog-scrollable" role="document" @mousedown.stop>
|
||||
|
||||
Reference in New Issue
Block a user