shift-build-2464
Nadim Salloum 2021-06-20 15:45:20 +03:00
parent 45cb165d20
commit 49becff008
12 changed files with 220 additions and 206 deletions

View File

@ -166,6 +166,7 @@ class ContractController extends Controller
'contract_id' => $contract->id, 'contract_id' => $contract->id,
]); ]);
if ($request->get('amount') && $request->get('type')) {
Payment::create( Payment::create(
$request->validate([ $request->validate([
'date' => ['required', 'date'], 'date' => ['required', 'date'],
@ -174,6 +175,7 @@ class ContractController extends Controller
'contract_id' => ['required', 'exists:App\Models\Contract,id'], 'contract_id' => ['required', 'exists:App\Models\Contract,id'],
]) ])
); );
}
session()->flash('flash.banner', 'Vertrag erstellt.'); session()->flash('flash.banner', 'Vertrag erstellt.');
return Redirect::route('contracts.show', $contract); return Redirect::route('contracts.show', $contract);

290
public/js/app.js vendored
View File

@ -18020,7 +18020,7 @@ __webpack_require__.r(__webpack_exports__);
}, },
computed: { computed: {
allClasses: function allClasses() { allClasses: function allClasses() {
var classes = 'justify-center inline-flex items-center px-4 py-2 border border-transparent rounded-md font-semibold text-xs text-white uppercase tracking-widest focus:outline-none focus:ring disabled:opacity-25 transition'; var classes = 'justify-center inline-flex items-center sm:px-4 sm:py-2 px-2 py-1 border border-transparent rounded-md font-semibold text-xs text-white uppercase tracking-widest focus:outline-none focus:ring disabled:opacity-25 transition';
classes += " bg-".concat(this.colour, "-800 hover:bg-").concat(this.colour, "-700 active:bg-").concat(this.colour, "-900 focus:border-").concat(this.colour, "-900 focus:ring-").concat(this.colour, "-300"); classes += " bg-".concat(this.colour, "-800 hover:bg-").concat(this.colour, "-700 active:bg-").concat(this.colour, "-900 focus:border-").concat(this.colour, "-900 focus:ring-").concat(this.colour, "-300");
return "".concat(classes, " ").concat(this["class"]); return "".concat(classes, " ").concat(this["class"]);
} }
@ -19610,6 +19610,11 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export */ }); /* harmony export */ });
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
props: ['href', 'active'], props: ['href', 'active'],
methods: {
toggleSidebar: function toggleSidebar() {
this.$store.dispatch('toggleSidebar');
}
},
computed: { computed: {
classes: function classes() { classes: function classes() {
return this.active ? 'w-full flex items-center text-indigo-100 h-10 pl-4 rounded-lg cursor-pointer transition' : 'w-full flex items-center hover:text-indigo-100 text-indigo-300 h-10 pl-4 rounded-lg cursor-pointer transition'; return this.active ? 'w-full flex items-center text-indigo-100 h-10 pl-4 rounded-lg cursor-pointer transition' : 'w-full flex items-center hover:text-indigo-100 text-indigo-300 h-10 pl-4 rounded-lg cursor-pointer transition';
@ -21427,12 +21432,11 @@ __webpack_require__.r(__webpack_exports__);
price: null, price: null,
notes: null, notes: null,
type: this.type, type: this.type,
insurance_type: '0', insurance_type: '1',
car_id: (_this$car$id = (_this$car = this.car) === null || _this$car === void 0 ? void 0 : _this$car.id) !== null && _this$car$id !== void 0 ? _this$car$id : null, car_id: (_this$car$id = (_this$car = this.car) === null || _this$car === void 0 ? void 0 : _this$car.id) !== null && _this$car$id !== void 0 ? _this$car$id : null,
contact_id: (_this$contact$id = (_this$contact = this.contact) === null || _this$contact === void 0 ? void 0 : _this$contact.id) !== null && _this$contact$id !== void 0 ? _this$contact$id : null, contact_id: (_this$contact$id = (_this$contact = this.contact) === null || _this$contact === void 0 ? void 0 : _this$contact.id) !== null && _this$contact$id !== void 0 ? _this$contact$id : null,
is_sell_contract: this.type === '0',
amount: null, amount: null,
payment_type: '0' payment_type: '1'
} }
}; };
}, },
@ -21497,8 +21501,7 @@ __webpack_require__.r(__webpack_exports__);
delivery_date: (0,vue__WEBPACK_IMPORTED_MODULE_2__.ref)(new Date(this.contract.delivery_date)), delivery_date: (0,vue__WEBPACK_IMPORTED_MODULE_2__.ref)(new Date(this.contract.delivery_date)),
price: this.contract.price, price: this.contract.price,
notes: this.contract.notes, notes: this.contract.notes,
insurance_type: this.contract.insurance_type, insurance_type: this.contract.insurance_type
is_sell_contract: this.contract.is_sell_contract
} }
}; };
} }
@ -22754,7 +22757,7 @@ var _hoisted_2 = {
"class": "font-bold" "class": "font-bold"
}; };
var _hoisted_3 = { var _hoisted_3 = {
"class": "grid grid-cols-2 xl:grid-cols-4 gap-0 w-full" "class": "grid grid-cols-2 sm:grid-cols-4 gap-0 w-full"
}; };
var _hoisted_4 = { var _hoisted_4 = {
key: 0, key: 0,
@ -22927,7 +22930,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
fn: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () { fn: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
return [$data.car.id ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)(_component_car_card, { return [$data.car.id ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)(_component_car_card, {
key: 0, key: 0,
"class": "col-span-3", "class": "xl:col-span-3 md:col-span-4 col-span-6",
car: $data.car, car: $data.car,
hideEmpty: "true" hideEmpty: "true"
}, null, 8 }, null, 8
@ -22938,11 +22941,13 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
name: "form", name: "form",
fn: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () { fn: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
return [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)("div", { return [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)("div", {
"class": "col-span-3" "class": "col-span-6"
}, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_jet_label, { }, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_jet_label, {
"for": "car", "for": "car",
value: "Auto" value: "Auto auswählen"
}), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_multiselect, { }), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)("div", {
"class": "grid grid-cols-12 gap-3 gap-y-6 mt-1"
}, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_multiselect, {
"allow-empty": false, "allow-empty": false,
onSelect: $options.onCarChange, onSelect: $options.onCarChange,
disabled: $data.createCar, disabled: $data.createCar,
@ -22953,30 +22958,30 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
label: "name", label: "name",
"track-by": "id", "track-by": "id",
options: $data.carsChoice, options: $data.carsChoice,
"class": "mt-1 block w-full", "class": "2xl:col-span-4 sm:col-span-6 col-span-12",
placeholder: "Auto auswählen" placeholder: "Auto auswählen"
}, null, 8 }, null, 8
/* PROPS */ /* PROPS */
, ["onSelect", "disabled", "modelValue", "options"])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)("div", { , ["onSelect", "disabled", "modelValue", "options"]), !$data.createCar ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)("div", {
"class": "col-span-6"
}, [$data.car.id ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)(_component_car_card, {
key: 0, key: 0,
"class": "mt-3 col-span-3", "class": "sm:col-span-6 col-span-12"
car: $data.car, }, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)("span", {
hideEmpty: "true" "class": "mr-2"
}, null, 8 }, "oder"), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)("button", {
/* PROPS */
, ["car"])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)("div", {
"class": "col-span-6"
}, " oder "), !$data.createCar ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)("div", {
key: 0,
"class": "col-span-6"
}, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)("button", {
onClick: _cache[2] || (_cache[2] = function () { onClick: _cache[2] || (_cache[2] = function () {
return $options.openCarForm && $options.openCarForm.apply($options, arguments); return $options.openCarForm && $options.openCarForm.apply($options, arguments);
}), }),
"class": "bg-indigo-800 hover:bg-indigo-700 active:bg-indigo-900 focus:border-indigo-900 focus:ring-indigo-300 justify-center inline-flex items-center px-4 py-2 border border-transparent rounded-md font-semibold text-xs text-white uppercase tracking-widest focus:outline-none focus:ring disabled:opacity-25 transition" "class": "bg-indigo-800 hover:bg-indigo-700 active:bg-indigo-900 focus:border-indigo-900 focus:ring-indigo-300 justify-center inline-flex items-center px-4 py-2 border border-transparent rounded-md font-semibold text-xs text-white uppercase tracking-widest focus:outline-none focus:ring disabled:opacity-25 transition"
}, " Neu erfassen ")])) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)("div", { }, " Neu erfassen ")])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)])]), $data.car.id ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)("div", {
key: 0,
"class": "col-span-6"
}, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_car_card, {
"class": "mt-3 xl:col-span-3 md:col-span-4 col-span-6",
car: $data.car,
hideEmpty: "true"
}, null, 8
/* PROPS */
, ["car"])])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), $data.createCar ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)("div", {
key: 1, key: 1,
"class": "col-span-6" "class": "col-span-6"
}, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)("p", { }, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)("p", {
@ -23005,7 +23010,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
})])])], 32 })])])], 32
/* HYDRATE_EVENTS */ /* HYDRATE_EVENTS */
)]))]; )])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)];
}) })
}]), 1032 }]), 1032
/* PROPS, DYNAMIC_SLOTS */ /* PROPS, DYNAMIC_SLOTS */
@ -23180,7 +23185,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
fn: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () { fn: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
return [$props.existing_contact.id ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)(_component_contact_card, { return [$props.existing_contact.id ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)(_component_contact_card, {
key: 0, key: 0,
"class": "col-span-3", "class": "xl:col-span-3 md:col-span-4 col-span-6",
contact: $data.contact contact: $data.contact
}, null, 8 }, null, 8
/* PROPS */ /* PROPS */
@ -23190,54 +23195,55 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
name: "form", name: "form",
fn: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () { fn: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
return [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)("div", { return [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)("div", {
"class": "col-span-3" "class": "col-span-6"
}, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_jet_label, { }, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_jet_label, {
"for": "contact", "for": "contact",
value: $options.contactType value: $options.contactType + ' auswählen'
}, null, 8 }, null, 8
/* PROPS */ /* PROPS */
, ["value"]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_multiselect, { , ["value"]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)("div", {
"class": "grid grid-cols-12 gap-3 gap-y-6 mt-1"
}, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_multiselect, {
"allow-empty": false,
onSelect: $options.onContactChange, onSelect: $options.onContactChange,
onRemove: _cache[1] || (_cache[1] = function ($event) {
return $data.contact = $options.emptyContact;
}),
disabled: $data.createContact, disabled: $data.createContact,
modelValue: $data.contact, modelValue: $data.contact,
"onUpdate:modelValue": _cache[2] || (_cache[2] = function ($event) { "onUpdate:modelValue": _cache[1] || (_cache[1] = function ($event) {
return $data.contact = $event; return $data.contact = $event;
}), }),
label: "title", label: "name",
"track-by": "id", "track-by": "id",
options: $data.contactsChoice, options: $data.contactsChoice,
"class": "mt-1 block w-full", "class": "2xl:col-span-4 sm:col-span-6 col-span-12",
placeholder: "Vertragspartner auswählen" placeholder: $options.contactType + 'wählen'
}, null, 8 }, null, 8
/* PROPS */ /* PROPS */
, ["onSelect", "disabled", "modelValue", "options"])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)("div", { , ["onSelect", "disabled", "modelValue", "options", "placeholder"]), !$data.createContact ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)("div", {
"class": "col-span-6"
}, [$data.contact.id ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)(_component_contact_card, {
key: 0, key: 0,
"class": "mt-3 col-span-3", "class": "sm:col-span-6 col-span-12"
contact: $data.contact }, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)("span", {
}, null, 8 "class": "mr-2"
/* PROPS */ }, "oder"), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)("button", {
, ["contact"])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)("div", { onClick: _cache[2] || (_cache[2] = function () {
"class": "col-span-6"
}, " oder "), !$data.createContact ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)("div", {
key: 0,
"class": "col-span-6"
}, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)("button", {
onClick: _cache[3] || (_cache[3] = function () {
return $options.openContactForm && $options.openContactForm.apply($options, arguments); return $options.openContactForm && $options.openContactForm.apply($options, arguments);
}), }),
"class": "bg-indigo-800 hover:bg-indigo-700 active:bg-indigo-900 focus:border-indigo-900 focus:ring-indigo-300 justify-center inline-flex items-center px-4 py-2 border border-transparent rounded-md font-semibold text-xs text-white uppercase tracking-widest focus:outline-none focus:ring disabled:opacity-25 transition" "class": "bg-indigo-800 hover:bg-indigo-700 active:bg-indigo-900 focus:border-indigo-900 focus:ring-indigo-300 justify-center inline-flex items-center px-4 py-2 border border-transparent rounded-md font-semibold text-xs text-white uppercase tracking-widest focus:outline-none focus:ring disabled:opacity-25 transition"
}, " Neu erfassen ")])) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)("div", { }, " Neu erfassen ")])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)])]), $data.contact.id ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)("div", {
key: 0,
"class": "col-span-6"
}, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_contact_card, {
"class": "mt-3 xl:col-span-3 md:col-span-4 col-span-6",
contact: $data.contact,
hideEmpty: "true"
}, null, 8
/* PROPS */
, ["contact"])])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), $data.createContact ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)("div", {
key: 1, key: 1,
"class": "col-span-6" "class": "col-span-6"
}, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)("p", { }, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)("p", {
"class": "w-full mb-1 font-bold" "class": "w-full mb-1 font-bold"
}, "Neuen Kontakt erfassen:"), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)("form", { }, "Neuen Kontakt erfassen:"), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)("form", {
onSubmit: _cache[4] || (_cache[4] = function () { onSubmit: _cache[3] || (_cache[3] = function () {
return $options.submitCreateContactForm && $options.submitCreateContactForm.apply($options, arguments); return $options.submitCreateContactForm && $options.submitCreateContactForm.apply($options, arguments);
}) })
}, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)("div", { }, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)("div", {
@ -23257,7 +23263,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
})])])], 32 })])])], 32
/* HYDRATE_EVENTS */ /* HYDRATE_EVENTS */
)]))]; )])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)];
}) })
}]), 1032 }]), 1032
/* PROPS, DYNAMIC_SLOTS */ /* PROPS, DYNAMIC_SLOTS */
@ -24042,13 +24048,13 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js"); /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
var _hoisted_1 = { var _hoisted_1 = {
"class": "grid grid-cols-12 gap-12 mb-8 max-w-5xl mx-auto" "class": "grid grid-cols-12 xl:gap-12 md:gap-6 sm:gap-4 gap-3 xl:mb-8 mb-3 max-w-5xl mx-auto"
}; };
var _hoisted_2 = { var _hoisted_2 = {
"class": "xl:col-span-9 col-span-12" "class": "xl:col-span-6 sm:col-span-8 col-span-12"
}; };
var _hoisted_3 = { var _hoisted_3 = {
"class": "xl:col-span-3 xl:col-end-13 col-span-12" "class": "xl:col-span-3 xl:col-end-13 sm:col-span-4 xs:col-span-4 col-span-12"
}; };
var _hoisted_4 = { var _hoisted_4 = {
"class": "w-full flex flex-col" "class": "w-full flex flex-col"
@ -24421,7 +24427,7 @@ var _hoisted_1 = {
}; };
var _hoisted_2 = { var _hoisted_2 = {
key: 0, key: 0,
"class": "font-semibold text-2xl font-medium text-indigo-900 leading-tight" "class": "font-semibold md:text-2xl sm:text-xl text-base font-medium text-indigo-900 leading-tight"
}; };
var _hoisted_3 = { var _hoisted_3 = {
key: 1, key: 1,
@ -24453,7 +24459,7 @@ var _hoisted_10 = {
}; };
var _hoisted_11 = { var _hoisted_11 = {
key: 2, key: 2,
"class": "2xl:px-5 lg:px-3 md:px-2 px-1 2xl:py-4 lg:py-3 md:py-2 py-1 flex items-center" "class": "2xl:px-5 lg:px-3 px-2 2xl:py-4 lg:py-3 py-2 flex items-center"
}; };
var _hoisted_12 = { var _hoisted_12 = {
key: 0, key: 0,
@ -24522,7 +24528,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
, ["href"])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), $props.data.total === undefined && $props.data.length > 0 || $props.data.total > 0 ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)("div", _hoisted_7, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)("table", _hoisted_8, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)("tr", _hoisted_9, [((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(true), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderList)($props.columns, function (col, index) { , ["href"])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), $props.data.total === undefined && $props.data.length > 0 || $props.data.total > 0 ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)("div", _hoisted_7, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)("table", _hoisted_8, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)("tr", _hoisted_9, [((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(true), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderList)($props.columns, function (col, index) {
return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)("th", { return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)("th", {
key: col.key, key: col.key,
"class": "2xl:px-5 lg:px-3 md:px-2 px-1 pt-4 pb-4", "class": "2xl:px-5 lg:px-3 px-2 2xl:py-4 lg:py-3 py-2",
colspan: [index == $props.columns.length - 1 ? 2 : 1] colspan: [index == $props.columns.length - 1 ? 2 : 1]
}, [col.sortable ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)("a", { }, [col.sortable ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)("a", {
key: 0, key: 0,
@ -24564,7 +24570,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
"class": "border-t xl:text-base lg:text-sm text-base" "class": "border-t xl:text-base lg:text-sm text-base"
}, [row.link ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)(_component_inertia_link, { }, [row.link ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)(_component_inertia_link, {
key: 0, key: 0,
"class": "2xl:px-5 lg:px-3 md:px-2 px-1 2xl:py-4 lg:py-3 md:py-2 py-1 flex items-center", "class": "2xl:px-5 lg:px-3 px-2 2xl:py-4 lg:py-3 py-2 flex items-center",
href: row.link href: row.link
}, { }, {
"default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () { "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
@ -24603,7 +24609,6 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
}, { }, {
"default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () { "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
return [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_unicon, { return [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_unicon, {
"class": "m-2",
height: "22", height: "22",
width: "22", width: "22",
name: "angle-right" name: "angle-right"
@ -25607,6 +25612,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
var _component_inertia_link = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("inertia-link"); var _component_inertia_link = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("inertia-link");
return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)(_component_inertia_link, { return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)(_component_inertia_link, {
onClick: _cache[1] || (_cache[1] = function ($event) {
return $options.toggleSidebar();
}),
href: $props.href, href: $props.href,
"class": $options.classes "class": $options.classes
}, { }, {
@ -29396,29 +29404,29 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js"); /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
var _hoisted_1 = { var _hoisted_1 = {
"class": "col-span-3 grid grid-cols-6 gap-3" "class": "xl:col-span-2 md:col-span-3 sm:col-span-4 col-span-6 grid grid-cols-6 gap-3"
}; };
var _hoisted_2 = { var _hoisted_2 = {
"class": "col-span-6 sm:col-span-4" "class": "col-span-6"
}; };
var _hoisted_3 = { var _hoisted_3 = {
"class": "col-span-6 sm:col-span-4" "class": "col-span-6"
}; };
var _hoisted_4 = { var _hoisted_4 = {
"class": "col-span-6 sm:col-span-4" key: 0,
"class": "col-span-6"
}; };
var _hoisted_5 = { var _hoisted_5 = {
"class": "col-span-6 sm:col-span-4" "class": "col-span-6"
}; };
var _hoisted_6 = { var _hoisted_6 = {
"class": "col-span-6 sm:col-span-4" "class": "col-span-6"
}; };
var _hoisted_7 = { var _hoisted_7 = {
key: 0, "class": "col-span-6"
"class": "col-span-6 sm:col-span-4"
}; };
var _hoisted_8 = { var _hoisted_8 = {
"class": "col-span-6 sm:col-span-4" "class": "col-span-6"
}; };
function render(_ctx, _cache, $props, $setup, $data, $options) { function render(_ctx, _cache, $props, $setup, $data, $options) {
var _component_jet_label = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("jet-label"); var _component_jet_label = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("jet-label");
@ -29483,76 +29491,11 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
"class": "mt-2" "class": "mt-2"
}, null, 8 }, null, 8
/* PROPS */ /* PROPS */
, ["message"])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)("div", _hoisted_4, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_jet_label, { , ["message"])]), $props.data.type === '1' ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)("div", _hoisted_4, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_jet_label, {
"for": "price",
value: $data.form.type === '0' ? 'Einkaufspreis' : 'Verkaufspreis'
}, null, 8
/* PROPS */
, ["value"]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_currency_input, {
modelValue: $data.form.price,
"onUpdate:modelValue": _cache[3] || (_cache[3] = function ($event) {
return $data.form.price = $event;
}),
options: $data.currencyOptions,
id: "price",
"class": "w-full mt-1 block border-gray-300 rounded-md shadow-sm",
ref: "price"
}, null, 8
/* PROPS */
, ["modelValue", "options"]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_jet_input_error, {
message: $data.form.errors.price,
"class": "mt-2"
}, null, 8
/* PROPS */
, ["message"])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)("div", _hoisted_5, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_jet_label, {
"for": "amount",
value: "Anzahlung"
}), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_currency_input, {
modelValue: $data.form.amount,
"onUpdate:modelValue": _cache[4] || (_cache[4] = function ($event) {
return $data.form.amount = $event;
}),
options: $data.currencyOptions,
id: "price",
"class": "w-full mt-1 block border-gray-300 rounded-md shadow-sm",
ref: "amount"
}, null, 8
/* PROPS */
, ["modelValue", "options"]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_jet_input_error, {
message: $data.form.errors.amount,
"class": "mt-2"
}, null, 8
/* PROPS */
, ["message"])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)("div", _hoisted_6, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_jet_label, {
"for": "payment_type",
value: "Einzahlungsart"
}), (0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)("select", {
"onUpdate:modelValue": _cache[5] || (_cache[5] = function ($event) {
return $data.form.payment_type = $event;
}),
"class": "mt-1 block w-full border-gray-300 rounded-md shadow-sm"
}, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)("option", {
value: "0",
selected: $data.form.payment_type == '0'
}, "Banküberweisung", 8
/* PROPS */
, ["selected"]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)("option", {
value: "1",
selected: $data.form.payment_type == '1'
}, "Barzahlung", 8
/* PROPS */
, ["selected"])], 512
/* NEED_PATCH */
), [[vue__WEBPACK_IMPORTED_MODULE_0__.vModelSelect, $data.form.payment_type]]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_jet_input_error, {
message: $data.form.errors.type,
"class": "mt-2"
}, null, 8
/* PROPS */
, ["message"])]), $data.form.is_sell_contract ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)("div", _hoisted_7, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_jet_label, {
"for": "insurance_type", "for": "insurance_type",
value: "Versicherung" value: "Versicherung"
}), (0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)("select", { }), (0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)("select", {
"onUpdate:modelValue": _cache[6] || (_cache[6] = function ($event) { "onUpdate:modelValue": _cache[3] || (_cache[3] = function ($event) {
return $data.form.insurance_type = $event; return $data.form.insurance_type = $event;
}), }),
"class": "mt-1 block w-full border-gray-300 rounded-md shadow-sm" "class": "mt-1 block w-full border-gray-300 rounded-md shadow-sm"
@ -29573,7 +29516,72 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
"class": "mt-2" "class": "mt-2"
}, null, 8 }, null, 8
/* PROPS */ /* PROPS */
, ["message"])])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)("div", _hoisted_8, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_jet_label, { , ["message"])])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)("div", _hoisted_5, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_jet_label, {
"for": "price",
value: $data.form.type === '0' ? 'Einkaufspreis' : 'Verkaufspreis'
}, null, 8
/* PROPS */
, ["value"]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_currency_input, {
modelValue: $data.form.price,
"onUpdate:modelValue": _cache[4] || (_cache[4] = function ($event) {
return $data.form.price = $event;
}),
options: $data.currencyOptions,
id: "price",
"class": "w-full mt-1 block border-gray-300 rounded-md shadow-sm",
ref: "price"
}, null, 8
/* PROPS */
, ["modelValue", "options"]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_jet_input_error, {
message: $data.form.errors.price,
"class": "mt-2"
}, null, 8
/* PROPS */
, ["message"])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)("div", _hoisted_6, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_jet_label, {
"for": "amount",
value: "Anzahlung"
}), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_currency_input, {
modelValue: $data.form.amount,
"onUpdate:modelValue": _cache[5] || (_cache[5] = function ($event) {
return $data.form.amount = $event;
}),
options: $data.currencyOptions,
id: "price",
"class": "w-full mt-1 block border-gray-300 rounded-md shadow-sm",
ref: "amount"
}, null, 8
/* PROPS */
, ["modelValue", "options"]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_jet_input_error, {
message: $data.form.errors.amount,
"class": "mt-2"
}, null, 8
/* PROPS */
, ["message"])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)("div", _hoisted_7, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_jet_label, {
"for": "payment_type",
value: "Einzahlungsart"
}), (0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)("select", {
"onUpdate:modelValue": _cache[6] || (_cache[6] = function ($event) {
return $data.form.payment_type = $event;
}),
"class": "mt-1 block w-full border-gray-300 rounded-md shadow-sm"
}, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)("option", {
value: "0",
selected: $data.form.payment_type == '0'
}, "Banküberweisung", 8
/* PROPS */
, ["selected"]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)("option", {
value: "1",
selected: $data.form.payment_type == '1'
}, "Barzahlung", 8
/* PROPS */
, ["selected"])], 512
/* NEED_PATCH */
), [[vue__WEBPACK_IMPORTED_MODULE_0__.vModelSelect, $data.form.payment_type]]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_jet_input_error, {
message: $data.form.errors.type,
"class": "mt-2"
}, null, 8
/* PROPS */
, ["message"])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)("div", _hoisted_8, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_jet_label, {
"for": "notes", "for": "notes",
value: "Bemerkungen" value: "Bemerkungen"
}), (0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)("textarea", { }), (0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)("textarea", {

View File

@ -14,7 +14,7 @@ export default {
}, },
computed: { computed: {
allClasses() { allClasses() {
let classes = 'justify-center inline-flex items-center px-4 py-2 border border-transparent rounded-md font-semibold text-xs text-white uppercase tracking-widest focus:outline-none focus:ring disabled:opacity-25 transition'; let classes = 'justify-center inline-flex items-center sm:px-4 sm:py-2 px-2 py-1 border border-transparent rounded-md font-semibold text-xs text-white uppercase tracking-widest focus:outline-none focus:ring disabled:opacity-25 transition';
classes += ` bg-${this.colour}-800 hover:bg-${this.colour}-700 active:bg-${this.colour}-900 focus:border-${this.colour}-900 focus:ring-${this.colour}-300`; classes += ` bg-${this.colour}-800 hover:bg-${this.colour}-700 active:bg-${this.colour}-900 focus:border-${this.colour}-900 focus:ring-${this.colour}-300`;
return `${classes} ${this.class}`; return `${classes} ${this.class}`;
}, },

View File

@ -3,7 +3,7 @@
<div v-if="!hideEmpty || car.name" class="font-bold"> <div v-if="!hideEmpty || car.name" class="font-bold">
{{ car.name ? car.name : '-' }} {{ car.name ? car.name : '-' }}
</div> </div>
<div class="grid grid-cols-2 xl:grid-cols-4 gap-0 w-full"> <div class="grid grid-cols-2 sm:grid-cols-4 gap-0 w-full">
<div v-if="!hideEmpty || car.stammnummer" class="col-span-2"> <div v-if="!hideEmpty || car.stammnummer" class="col-span-2">
Stammnummer Stammnummer
</div> </div>

View File

@ -7,25 +7,25 @@
{{ existing_car.id ? 'Ausgewähltes Auto' : 'Auto auswählen oder neu erfassen' }} {{ existing_car.id ? 'Ausgewähltes Auto' : 'Auto auswählen oder neu erfassen' }}
</template> </template>
<template v-if="existing_car.id" #form> <template v-if="existing_car.id" #form>
<car-card v-if="car.id" class="col-span-3" :car="car" hideEmpty="true" /> <car-card v-if="car.id" class="xl:col-span-3 md:col-span-4 col-span-6" :car="car" hideEmpty="true" />
</template> </template>
<template v-else #form> <template v-else #form>
<div class="col-span-3">
<jet-label for="car" value="Auto" />
<multiselect :allow-empty="false" @select="onCarChange" :disabled="createCar" v-model="car" label="name" track-by="id" :options="carsChoice" class="mt-1 block w-full" placeholder="Auto auswählen" />
</div>
<div class="col-span-6"> <div class="col-span-6">
<car-card v-if="car.id" class="mt-3 col-span-3" :car="car" hideEmpty="true" /> <jet-label for="car" value="Auto auswählen" />
</div> <div class="grid grid-cols-12 gap-3 gap-y-6 mt-1">
<div class="col-span-6"> <multiselect :allow-empty="false" @select="onCarChange" :disabled="createCar" v-model="car" label="name" track-by="id" :options="carsChoice" class="2xl:col-span-4 sm:col-span-6 col-span-12" placeholder="Auto auswählen" />
oder <div v-if="!createCar" class="sm:col-span-6 col-span-12">
</div> <span class="mr-2">oder</span>
<div v-if="!createCar" class="col-span-6">
<button @click="openCarForm" class="bg-indigo-800 hover:bg-indigo-700 active:bg-indigo-900 focus:border-indigo-900 focus:ring-indigo-300 justify-center inline-flex items-center px-4 py-2 border border-transparent rounded-md font-semibold text-xs text-white uppercase tracking-widest focus:outline-none focus:ring disabled:opacity-25 transition"> <button @click="openCarForm" class="bg-indigo-800 hover:bg-indigo-700 active:bg-indigo-900 focus:border-indigo-900 focus:ring-indigo-300 justify-center inline-flex items-center px-4 py-2 border border-transparent rounded-md font-semibold text-xs text-white uppercase tracking-widest focus:outline-none focus:ring disabled:opacity-25 transition">
Neu erfassen Neu erfassen
</button> </button>
</div> </div>
<div v-else class="col-span-6"> </div>
</div>
<div v-if="car.id" class="col-span-6">
<car-card class="mt-3 xl:col-span-3 md:col-span-4 col-span-6" :car="car" hideEmpty="true" />
</div>
<div v-if="createCar" class="col-span-6">
<p class="w-full mb-1 font-bold">Neues Auto erfassen:</p> <p class="w-full mb-1 font-bold">Neues Auto erfassen:</p>
<form @submit="submitCreateCarForm"> <form @submit="submitCreateCarForm">
<div class="grid grid-cols-6 gap-6"> <div class="grid grid-cols-6 gap-6">

View File

@ -7,25 +7,25 @@
{{ contactType }} auswählen oder neu erfassen {{ contactType }} auswählen oder neu erfassen
</template> </template>
<template v-if="existing_contact.id" #form> <template v-if="existing_contact.id" #form>
<contact-card v-if="existing_contact.id" class="col-span-3" :contact="contact" /> <contact-card v-if="existing_contact.id" class="xl:col-span-3 md:col-span-4 col-span-6" :contact="contact" />
</template> </template>
<template v-else #form> <template v-else #form>
<div class="col-span-3">
<jet-label for="contact" :value="contactType" />
<multiselect @select="onContactChange" @remove="contact = emptyContact" :disabled="createContact" v-model="contact" label="title" track-by="id" :options="contactsChoice" class="mt-1 block w-full" placeholder="Vertragspartner auswählen" />
</div>
<div class="col-span-6"> <div class="col-span-6">
<contact-card v-if="contact.id" class="mt-3 col-span-3" :contact="contact" /> <jet-label for="contact" :value="contactType + ' auswählen'" />
</div> <div class="grid grid-cols-12 gap-3 gap-y-6 mt-1">
<div class="col-span-6"> <multiselect :allow-empty="false" @select="onContactChange" :disabled="createContact" v-model="contact" label="name" track-by="id" :options="contactsChoice" class="2xl:col-span-4 sm:col-span-6 col-span-12" :placeholder="contactType + 'wählen'" />
oder <div v-if="!createContact" class="sm:col-span-6 col-span-12">
</div> <span class="mr-2">oder</span>
<div v-if="!createContact" class="col-span-6">
<button @click="openContactForm" class="bg-indigo-800 hover:bg-indigo-700 active:bg-indigo-900 focus:border-indigo-900 focus:ring-indigo-300 justify-center inline-flex items-center px-4 py-2 border border-transparent rounded-md font-semibold text-xs text-white uppercase tracking-widest focus:outline-none focus:ring disabled:opacity-25 transition"> <button @click="openContactForm" class="bg-indigo-800 hover:bg-indigo-700 active:bg-indigo-900 focus:border-indigo-900 focus:ring-indigo-300 justify-center inline-flex items-center px-4 py-2 border border-transparent rounded-md font-semibold text-xs text-white uppercase tracking-widest focus:outline-none focus:ring disabled:opacity-25 transition">
Neu erfassen Neu erfassen
</button> </button>
</div> </div>
<div v-else class="col-span-6"> </div>
</div>
<div v-if="contact.id" class="col-span-6">
<contact-card class="mt-3 xl:col-span-3 md:col-span-4 col-span-6" :contact="contact" hideEmpty="true" />
</div>
<div v-if="createContact" class="col-span-6">
<p class="w-full mb-1 font-bold">Neuen Kontakt erfassen:</p> <p class="w-full mb-1 font-bold">Neuen Kontakt erfassen:</p>
<form @submit="submitCreateContactForm"> <form @submit="submitCreateContactForm">
<div class="grid grid-cols-6 gap-6"> <div class="grid grid-cols-6 gap-6">

View File

@ -3,11 +3,11 @@
<template #header> <template #header>
<slot name="header"></slot> <slot name="header"></slot>
</template> </template>
<div class="grid grid-cols-12 gap-12 mb-8 max-w-5xl mx-auto"> <div class="grid grid-cols-12 xl:gap-12 md:gap-6 sm:gap-4 gap-3 xl:mb-8 mb-3 max-w-5xl mx-auto">
<div class="xl:col-span-9 col-span-12"> <div class="xl:col-span-6 sm:col-span-8 col-span-12">
<slot name="info"></slot> <slot name="info"></slot>
</div> </div>
<div class="xl:col-span-3 xl:col-end-13 col-span-12"> <div class="xl:col-span-3 xl:col-end-13 sm:col-span-4 xs:col-span-4 col-span-12">
<div class="w-full flex flex-col"> <div class="w-full flex flex-col">
<small-title title="Aktionen" class="mb-3" /> <small-title title="Aktionen" class="mb-3" />
<slot name="actions"></slot> <slot name="actions"></slot>

View File

@ -1,7 +1,7 @@
<template> <template>
<div> <div>
<span v-if="title" class="flex justify-between items-end mb-4"> <span v-if="title" class="flex justify-between items-end mb-4">
<p v-if="title" class="font-semibold text-2xl font-medium text-indigo-900 leading-tight">{{ title }}</p> <p v-if="title" class="font-semibold md:text-2xl sm:text-xl text-base font-medium text-indigo-900 leading-tight">{{ title }}</p>
<slot name="actions" class=""></slot> <slot name="actions" class=""></slot>
</span> </span>
<div v-if="form || print" class="my-4 flex justify-between items-center"> <div v-if="form || print" class="my-4 flex justify-between items-center">
@ -19,7 +19,7 @@
<div v-if="(data.total === undefined && data.length > 0) || data.total > 0" class="bg-white shadow rounded-md sm:rounded-lg overflow-x-auto"> <div v-if="(data.total === undefined && data.length > 0) || data.total > 0" class="bg-white shadow rounded-md sm:rounded-lg overflow-x-auto">
<table class="w-full whitespace-nowrap"> <table class="w-full whitespace-nowrap">
<tr class="text-left font-bold"> <tr class="text-left font-bold">
<th v-for="(col, index) in columns" :key="col.key" class="2xl:px-5 lg:px-3 md:px-2 px-1 pt-4 pb-4" :colspan="[index == (columns.length - 1) ? 2 : 1]"> <th v-for="(col, index) in columns" :key="col.key" class="2xl:px-5 lg:px-3 px-2 2xl:py-4 lg:py-3 py-2" :colspan="[index == (columns.length - 1) ? 2 : 1]">
<a v-if="col.sortable" href="#" @click="sortTable(col.key)" class="flex place-items-center"> <a v-if="col.sortable" href="#" @click="sortTable(col.key)" class="flex place-items-center">
{{ col.value }} {{ col.value }}
<unicon v-if="isActiveSort(col.key, 'asc')" fill="#4B5563" height="22" width="22" name="arrow-up"></unicon> <unicon v-if="isActiveSort(col.key, 'asc')" fill="#4B5563" height="22" width="22" name="arrow-up"></unicon>
@ -32,19 +32,19 @@
</tr> </tr>
<tr v-for="row in (this.data.data ? this.data.data : this.data)" :key="row.link" class="hover:bg-indigo-100 focus-within:bg-indigo-100"> <tr v-for="row in (this.data.data ? this.data.data : this.data)" :key="row.link" class="hover:bg-indigo-100 focus-within:bg-indigo-100">
<td v-for="col in columns" :key="col.key" class="border-t xl:text-base lg:text-sm text-base"> <td v-for="col in columns" :key="col.key" class="border-t xl:text-base lg:text-sm text-base">
<inertia-link v-if="row.link" class="2xl:px-5 lg:px-3 md:px-2 px-1 2xl:py-4 lg:py-3 md:py-2 py-1 flex items-center" :href="row.link"> <inertia-link v-if="row.link" class="2xl:px-5 lg:px-3 px-2 2xl:py-4 lg:py-3 py-2 flex items-center" :href="row.link">
{{ resolve(col.key, row) }} {{ resolve(col.key, row) }}
</inertia-link> </inertia-link>
<span v-else-if="col.key == 'delete'" class="p-3 cursor-pointer" @click="this.$emit('delete', row.id)"> <span v-else-if="col.key == 'delete'" class="p-3 cursor-pointer" @click="this.$emit('delete', row.id)">
<unicon fill="#f04040" hover-fill="red" height="24" width="24" name="trash-alt"></unicon> <unicon fill="#f04040" hover-fill="red" height="24" width="24" name="trash-alt"></unicon>
</span> </span>
<span v-else class="2xl:px-5 lg:px-3 md:px-2 px-1 2xl:py-4 lg:py-3 md:py-2 py-1 flex items-center"> <span v-else class="2xl:px-5 lg:px-3 px-2 2xl:py-4 lg:py-3 py-2 flex items-center">
{{ resolve(col.key, row) }} {{ resolve(col.key, row) }}
</span> </span>
</td> </td>
<td v-if="row.link && !hideArrow" class="border-t w-px"> <td v-if="row.link && !hideArrow" class="border-t w-px">
<inertia-link class="xl:py-4 py-2 flex items-center" :href="row.link" tabindex="-1"> <inertia-link class="xl:py-4 py-2 flex items-center" :href="row.link" tabindex="-1">
<unicon class="m-2" height="22" width="22" name="angle-right"></unicon> <unicon height="22" width="22" name="angle-right"></unicon>
</inertia-link> </inertia-link>
</td> </td>
</tr> </tr>

View File

@ -1,5 +1,5 @@
<template> <template>
<inertia-link :href="href" :class="classes"> <inertia-link @click="toggleSidebar()" :href="href" :class="classes">
<slot></slot> <slot></slot>
</inertia-link> </inertia-link>
</template> </template>
@ -8,6 +8,11 @@
export default { export default {
props: ['href', 'active'], props: ['href', 'active'],
methods: {
toggleSidebar() {
this.$store.dispatch('toggleSidebar');
},
},
computed: { computed: {
classes() { classes() {
return this.active return this.active

View File

@ -9,31 +9,39 @@
</template> </template>
<template #form> <template #form>
<div class="col-span-3 grid grid-cols-6 gap-3"> <div class="xl:col-span-2 md:col-span-3 sm:col-span-4 col-span-6 grid grid-cols-6 gap-3">
<div class="col-span-6 sm:col-span-4"> <div class="col-span-6">
<jet-label for="date" value="Datum" /> <jet-label for="date" value="Datum" />
<datepicker id="date" ref="date" v-model="form.date" inputFormat="dd.MM.yyyy" class="border-gray-300 rounded-md shadow-sm mt-1 block w-full" /> <datepicker id="date" ref="date" v-model="form.date" inputFormat="dd.MM.yyyy" class="border-gray-300 rounded-md shadow-sm mt-1 block w-full" />
<jet-input-error :message="form.errors.date" class="mt-2" /> <jet-input-error :message="form.errors.date" class="mt-2" />
</div> </div>
<div class="col-span-6 sm:col-span-4"> <div class="col-span-6">
<jet-label for="delivery_date" value="Lieferdatum" /> <jet-label for="delivery_date" value="Lieferdatum" />
<datepicker id="delivery_date" ref="delivery_date" v-model="form.delivery_date" inputFormat="dd.MM.yyyy" class="border-gray-300 rounded-md shadow-sm mt-1 block w-full" /> <datepicker id="delivery_date" ref="delivery_date" v-model="form.delivery_date" inputFormat="dd.MM.yyyy" class="border-gray-300 rounded-md shadow-sm mt-1 block w-full" />
<jet-input-error :message="form.errors.delivery_date" class="mt-2" /> <jet-input-error :message="form.errors.delivery_date" class="mt-2" />
</div> </div>
<div class="col-span-6 sm:col-span-4"> <div v-if="data.type === '1'" class="col-span-6">
<jet-label for="insurance_type" value="Versicherung" />
<select v-model="form.insurance_type" class="mt-1 block w-full border-gray-300 rounded-md shadow-sm">
<option v-for="(insurance, index) in insurance_types" :value="index" v-bind:key="index" :selected="form.insurance_type == index">{{ insurance }}</option>
</select>
<jet-input-error :message="form.errors.insurance_type" class="mt-2" />
</div>
<div class="col-span-6">
<jet-label for="price" :value="form.type === '0' ? 'Einkaufspreis' : 'Verkaufspreis'" /> <jet-label for="price" :value="form.type === '0' ? 'Einkaufspreis' : 'Verkaufspreis'" />
<currency-input v-model="form.price" :options="currencyOptions" id="price" class="w-full mt-1 block border-gray-300 rounded-md shadow-sm" ref="price"/> <currency-input v-model="form.price" :options="currencyOptions" id="price" class="w-full mt-1 block border-gray-300 rounded-md shadow-sm" ref="price"/>
<jet-input-error :message="form.errors.price" class="mt-2" /> <jet-input-error :message="form.errors.price" class="mt-2" />
</div> </div>
<div class="col-span-6 sm:col-span-4"> <div class="col-span-6">
<jet-label for="amount" value="Anzahlung" /> <jet-label for="amount" value="Anzahlung" />
<currency-input v-model="form.amount" :options="currencyOptions" id="price" class="w-full mt-1 block border-gray-300 rounded-md shadow-sm" ref="amount"/> <currency-input v-model="form.amount" :options="currencyOptions" id="price" class="w-full mt-1 block border-gray-300 rounded-md shadow-sm" ref="amount"/>
<jet-input-error :message="form.errors.amount" class="mt-2" /> <jet-input-error :message="form.errors.amount" class="mt-2" />
</div> </div>
<div class="col-span-6 sm:col-span-4"> <div class="col-span-6">
<jet-label for="payment_type" value="Einzahlungsart" /> <jet-label for="payment_type" value="Einzahlungsart" />
<select v-model="form.payment_type" class="mt-1 block w-full border-gray-300 rounded-md shadow-sm"> <select v-model="form.payment_type" class="mt-1 block w-full border-gray-300 rounded-md shadow-sm">
<option value="0" :selected="form.payment_type == '0'">Banküberweisung</option> <option value="0" :selected="form.payment_type == '0'">Banküberweisung</option>
@ -42,14 +50,7 @@
<jet-input-error :message="form.errors.type" class="mt-2" /> <jet-input-error :message="form.errors.type" class="mt-2" />
</div> </div>
<div v-if="form.is_sell_contract" class="col-span-6 sm:col-span-4"> <div class="col-span-6">
<jet-label for="insurance_type" value="Versicherung" />
<select v-model="form.insurance_type" class="mt-1 block w-full border-gray-300 rounded-md shadow-sm">
<option v-for="(insurance, index) in insurance_types" :value="index" v-bind:key="index" :selected="form.insurance_type == index">{{ insurance }}</option>
</select>
<jet-input-error :message="form.errors.insurance_type" class="mt-2" />
</div>
<div class="col-span-6 sm:col-span-4">
<jet-label for="notes" value="Bemerkungen" /> <jet-label for="notes" value="Bemerkungen" />
<textarea class="mt-1 block w-full border-gray-300 rounded-md shadow-sm" v-model="form.notes" ref="input"> <textarea class="mt-1 block w-full border-gray-300 rounded-md shadow-sm" v-model="form.notes" ref="input">
</textarea> </textarea>

View File

@ -64,12 +64,11 @@ export default {
price: null, price: null,
notes: null, notes: null,
type: this.type, type: this.type,
insurance_type: '0', insurance_type: '1',
car_id: this.car?.id ?? null, car_id: this.car?.id ?? null,
contact_id: this.contact?.id ?? null, contact_id: this.contact?.id ?? null,
is_sell_contract: this.type === '0',
amount: null, amount: null,
payment_type: '0', payment_type: '1',
}, },
}; };
}, },

View File

@ -51,7 +51,6 @@ export default {
price: this.contract.price, price: this.contract.price,
notes: this.contract.notes, notes: this.contract.notes,
insurance_type: this.contract.insurance_type, insurance_type: this.contract.insurance_type,
is_sell_contract: this.contract.is_sell_contract,
}, },
}; };
}, },