shift-build-2464
Nadim Salloum 2021-06-15 22:58:13 +03:00
parent fd74b2d8cb
commit 879eb46832
97 changed files with 5092 additions and 2741 deletions

19
.eslintrc.json Normal file
View File

@ -0,0 +1,19 @@
{
"env": {
"browser": true,
"es2021": true
},
"extends": [
"plugin:vue/essential",
"airbnb-base"
],
"parserOptions": {
"ecmaVersion": 12,
"sourceType": "module"
},
"plugins": [
"vue"
],
"rules": {
}
}

2331
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -7,7 +7,8 @@
"watch-poll": "mix watch -- --watch-options-poll=1000",
"hot": "mix watch --hot",
"prod": "npm run production",
"production": "mix --production"
"production": "mix --production",
"eslint": "./node_modules/.bin/eslint resources/js/ --ext .js,.vue --fix"
},
"devDependencies": {
"@inertiajs/inertia": "^0.8.4",
@ -17,13 +18,13 @@
"@tailwindcss/typography": "^0.3.0",
"@types/lodash": "^4.14.168",
"@vue/compiler-sfc": "^3.0.5",
"axios": "^0.21",
"eslint": "^7.28.0",
"eslint-plugin-vue": "^7.11.1",
"laravel-mix": "^6.0.6",
"lodash": "^4.17.21",
"postcss": "^8.1.14",
"postcss-import": "^12.0.1",
"tailwindcss": "^2.0.1",
"vue": "^3.0.5",
"vue-loader": "^16.1.2"
},
"dependencies": {
@ -31,6 +32,9 @@
"vue-multiselect": "^3.0.0-alpha.2",
"vue-unicons": "^3.2.1",
"vue3-datepicker": "^0.2.4",
"vuex": "^4.0.0"
"vuex": "^4.0.0",
"axios": "^0.21",
"lodash": "^4.17.21",
"vue": "^3.0.5"
}
}

169
public/js/app.js vendored
View File

@ -17913,9 +17913,9 @@ __webpack_require__.r(__webpack_exports__);
},
computed: {
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 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';
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 classes + " " + this["class"];
return "".concat(classes, " ").concat(this["class"]);
}
}
});
@ -17966,9 +17966,9 @@ __webpack_require__.r(__webpack_exports__);
},
computed: {
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 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';
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 classes + " " + this["class"];
return "".concat(classes, " ").concat(this["class"]);
}
}
});
@ -17998,7 +17998,7 @@ __webpack_require__.r(__webpack_exports__);
data: function data() {
return {
meta: {
'contact': 'Verkäufer'
contact: 'Verkäufer'
}
};
}
@ -18077,7 +18077,7 @@ __webpack_require__.r(__webpack_exports__);
},
computed: {
contractClasses: function contractClasses() {
return "col-span-12 h-full relative sm:col-span-" + (this.contract.car ? '4' : '6');
return "col-span-12 h-full relative sm:col-span-".concat(this.contract.car ? '4' : '6');
}
},
data: function data() {
@ -18191,9 +18191,9 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
var STATUS_INITIAL = 0,
STATUS_SAVING = 1,
STATUS_FAILED = 2;
var STATUS_INITIAL = 0;
var STATUS_SAVING = 1;
var STATUS_FAILED = 2;
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
props: {
id: Number,
@ -18547,7 +18547,7 @@ __webpack_require__.r(__webpack_exports__);
data: function data() {
return {
meta: {
'contact': 'Käufer'
contact: 'Käufer'
}
};
}
@ -18670,8 +18670,8 @@ __webpack_require__.r(__webpack_exports__);
this.sort.by = col;
this.$inertia.get(this.data.path, {
'sortby': this.sort.by,
'direction': this.sort.direction
sortby: this.sort.by,
direction: this.sort.direction
}, {
preserveState: true
});
@ -18817,7 +18817,7 @@ __webpack_require__.r(__webpack_exports__);
return this.checked;
},
set: function set(val) {
this.$emit("update:checked", val);
this.$emit('update:checked', val);
}
}
}
@ -19068,17 +19068,19 @@ __webpack_require__.r(__webpack_exports__);
computed: {
widthClass: function widthClass() {
return {
'48': 'w-48'
48: 'w-48'
}[this.width.toString()];
},
alignmentClasses: function alignmentClasses() {
if (this.align === 'left') {
return 'origin-top-left left-0';
} else if (this.align === 'right') {
return 'origin-top-right right-0';
} else {
return 'origin-top';
}
if (this.align === 'right') {
return 'origin-top-right right-0';
}
return 'origin-top';
}
}
});
@ -19131,7 +19133,7 @@ __webpack_require__.r(__webpack_exports__);
return !!this.$slots.actions;
},
classnames: function classnames() {
var classnames = !this.emptyBg ? 'px-4 py-5 bg-white sm:p-6 shadow ' : "";
var classnames = !this.emptyBg ? 'px-4 py-5 bg-white sm:p-6 shadow ' : '';
classnames += this.hasActions ? 'sm:rounded-tl-md sm:rounded-tr-md' : 'sm:rounded-md';
return classnames;
}
@ -19263,10 +19265,10 @@ __webpack_require__.r(__webpack_exports__);
computed: {
maxWidthClass: function maxWidthClass() {
return {
'sm': 'sm:max-w-sm',
'md': 'sm:max-w-md',
'lg': 'sm:max-w-lg',
'xl': 'sm:max-w-xl',
sm: 'sm:max-w-sm',
md: 'sm:max-w-md',
lg: 'sm:max-w-lg',
xl: 'sm:max-w-xl',
'2xl': 'sm:max-w-2xl'
}[this.maxWidth];
}
@ -19405,7 +19407,7 @@ __webpack_require__.r(__webpack_exports__);
methods: {
switchToTeam: function switchToTeam(team) {
this.$inertia.put(route('current-team.update'), {
'team_id': team.id
team_id: team.id
}, {
preserveState: false
});
@ -19581,15 +19583,15 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _ApiTokenManager__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ApiTokenManager */ "./resources/js/Pages/API/ApiTokenManager.vue");
/* harmony import */ var _Layouts_AppLayout__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/Layouts/AppLayout */ "./resources/js/Layouts/AppLayout.vue");
/* harmony import */ var _Layouts_AppLayout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/Layouts/AppLayout */ "./resources/js/Layouts/AppLayout.vue");
/* harmony import */ var _ApiTokenManager__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ApiTokenManager */ "./resources/js/Pages/API/ApiTokenManager.vue");
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
props: ['tokens', 'availablePermissions', 'defaultPermissions'],
components: {
ApiTokenManager: _ApiTokenManager__WEBPACK_IMPORTED_MODULE_0__.default,
AppLayout: _Layouts_AppLayout__WEBPACK_IMPORTED_MODULE_1__.default
ApiTokenManager: _ApiTokenManager__WEBPACK_IMPORTED_MODULE_1__.default,
AppLayout: _Layouts_AppLayout__WEBPACK_IMPORTED_MODULE_0__.default
}
});
@ -20211,8 +20213,8 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export */ });
/* harmony import */ var _Layouts_Layout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/Layouts/Layout */ "./resources/js/Layouts/Layout.vue");
/* harmony import */ var _Components_BreadCrumb_vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/Components/BreadCrumb.vue */ "./resources/js/Components/BreadCrumb.vue");
/* harmony import */ var _Components_CarForm_vue__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Components/CarForm.vue */ "./resources/js/Pages/Cars/Components/CarForm.vue");
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
/* harmony import */ var _Components_CarForm_vue__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Components/CarForm.vue */ "./resources/js/Pages/Cars/Components/CarForm.vue");
@ -20221,7 +20223,7 @@ __webpack_require__.r(__webpack_exports__);
components: {
Layout: _Layouts_Layout__WEBPACK_IMPORTED_MODULE_0__.default,
BreadCrumb: _Components_BreadCrumb_vue__WEBPACK_IMPORTED_MODULE_1__.default,
CarForm: _Components_CarForm_vue__WEBPACK_IMPORTED_MODULE_2__.default
CarForm: _Components_CarForm_vue__WEBPACK_IMPORTED_MODULE_3__.default
},
props: {
brands: Array
@ -20241,8 +20243,8 @@ __webpack_require__.r(__webpack_exports__);
vin: null,
colour: null,
car_model_id: null,
initial_date: (0,vue__WEBPACK_IMPORTED_MODULE_3__.ref)(new Date()),
last_check_date: (0,vue__WEBPACK_IMPORTED_MODULE_3__.ref)(new Date()),
initial_date: (0,vue__WEBPACK_IMPORTED_MODULE_2__.ref)(new Date()),
last_check_date: (0,vue__WEBPACK_IMPORTED_MODULE_2__.ref)(new Date()),
kilometers: null,
known_damage: null,
notes: null
@ -20274,8 +20276,8 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export */ });
/* harmony import */ var _Layouts_Layout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/Layouts/Layout */ "./resources/js/Layouts/Layout.vue");
/* harmony import */ var _Components_BreadCrumb_vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/Components/BreadCrumb.vue */ "./resources/js/Components/BreadCrumb.vue");
/* harmony import */ var _Components_CarForm_vue__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Components/CarForm.vue */ "./resources/js/Pages/Cars/Components/CarForm.vue");
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
/* harmony import */ var _Components_CarForm_vue__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Components/CarForm.vue */ "./resources/js/Pages/Cars/Components/CarForm.vue");
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
@ -20286,7 +20288,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
components: {
BreadCrumb: _Components_BreadCrumb_vue__WEBPACK_IMPORTED_MODULE_1__.default,
Layout: _Layouts_Layout__WEBPACK_IMPORTED_MODULE_0__.default,
CarForm: _Components_CarForm_vue__WEBPACK_IMPORTED_MODULE_2__.default
CarForm: _Components_CarForm_vue__WEBPACK_IMPORTED_MODULE_3__.default
},
props: {
car: Object,
@ -20300,7 +20302,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
out += this.brand.name;
if (this.car_model.name) {
out += ' ' + this.car_model.name;
out += " ".concat(this.car_model.name);
}
}
@ -20311,7 +20313,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
return {
currentRoute: 'cars.edit',
meta: {
form_name: 'EditCar' + this.car.id,
form_name: "EditCar".concat(this.car.id),
route: this.route('cars.update', this.car.id),
method: 'put',
button_text: 'Änderungen speichern',
@ -20323,11 +20325,11 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
id: this.car.id,
stammnummer: this.car.stammnummer,
vin: this.car.vin,
initial_date: (0,vue__WEBPACK_IMPORTED_MODULE_3__.ref)(new Date(this.car.initial_date)),
initial_date: (0,vue__WEBPACK_IMPORTED_MODULE_2__.ref)(new Date(this.car.initial_date)),
colour: this.car.colour,
notes: this.car.notes,
car_model_id: this.car.car_model.id,
last_check_date: (0,vue__WEBPACK_IMPORTED_MODULE_3__.ref)(new Date(this.car.last_check_date)),
last_check_date: (0,vue__WEBPACK_IMPORTED_MODULE_2__.ref)(new Date(this.car.last_check_date)),
kilometers: this.car.kilometers,
known_damage: this.car.known_damage
}, "notes", this.car.notes)
@ -20648,8 +20650,8 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var _Jetstream_Button__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/Jetstream/Button */ "./resources/js/Jetstream/Button.vue");
/* harmony import */ var _Jetstream_ActionMessage__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/Jetstream/ActionMessage */ "./resources/js/Jetstream/ActionMessage.vue");
/* harmony import */ var _Jetstream_FormSection__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/Jetstream/FormSection */ "./resources/js/Jetstream/FormSection.vue");
/* harmony import */ var _ContactFormFields__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./ContactFormFields */ "./resources/js/Pages/Contacts/Components/ContactFormFields.vue");
/* harmony import */ var _inertiajs_inertia_vue3__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @inertiajs/inertia-vue3 */ "./node_modules/@inertiajs/inertia-vue3/dist/index.js");
/* harmony import */ var _inertiajs_inertia_vue3__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @inertiajs/inertia-vue3 */ "./node_modules/@inertiajs/inertia-vue3/dist/index.js");
/* harmony import */ var _ContactFormFields__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./ContactFormFields */ "./resources/js/Pages/Contacts/Components/ContactFormFields.vue");
@ -20660,7 +20662,7 @@ __webpack_require__.r(__webpack_exports__);
JetButton: _Jetstream_Button__WEBPACK_IMPORTED_MODULE_0__.default,
JetFormSection: _Jetstream_FormSection__WEBPACK_IMPORTED_MODULE_2__.default,
JetActionMessage: _Jetstream_ActionMessage__WEBPACK_IMPORTED_MODULE_1__.default,
ContactFormFields: _ContactFormFields__WEBPACK_IMPORTED_MODULE_3__.default
ContactFormFields: _ContactFormFields__WEBPACK_IMPORTED_MODULE_4__.default
},
props: {
data: Object,
@ -20668,7 +20670,7 @@ __webpack_require__.r(__webpack_exports__);
},
data: function data() {
return {
form: (0,_inertiajs_inertia_vue3__WEBPACK_IMPORTED_MODULE_4__.useForm)(this.meta.form_name, this.data)
form: (0,_inertiajs_inertia_vue3__WEBPACK_IMPORTED_MODULE_3__.useForm)(this.meta.form_name, this.data)
};
},
methods: {
@ -20790,7 +20792,7 @@ __webpack_require__.r(__webpack_exports__);
data: function data() {
return {
meta: {
form_name: 'EditContact' + this.contact.id,
form_name: "EditContact".concat(this.contact.id),
route: this.route('contacts.update', this.contact.id),
method: 'put',
button_text: 'Änderungen speichern',
@ -21057,11 +21059,11 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export */ });
/* harmony import */ var _Layouts_Layout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/Layouts/Layout */ "./resources/js/Layouts/Layout.vue");
/* harmony import */ var _Components_BreadCrumb_vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/Components/BreadCrumb.vue */ "./resources/js/Components/BreadCrumb.vue");
/* harmony import */ var _Components_ContractForm_vue__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Components/ContractForm.vue */ "./resources/js/Pages/Contracts/Components/ContractForm.vue");
/* harmony import */ var _Components_CarCard_vue__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/Components/CarCard.vue */ "./resources/js/Components/CarCard.vue");
/* harmony import */ var _Components_ContactCard_vue__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @/Components/ContactCard.vue */ "./resources/js/Components/ContactCard.vue");
/* harmony import */ var _Jetstream_FormSection__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/Jetstream/FormSection */ "./resources/js/Jetstream/FormSection.vue");
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
/* harmony import */ var _Components_CarCard_vue__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/Components/CarCard.vue */ "./resources/js/Components/CarCard.vue");
/* harmony import */ var _Components_ContactCard_vue__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/Components/ContactCard.vue */ "./resources/js/Components/ContactCard.vue");
/* harmony import */ var _Jetstream_FormSection__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @/Jetstream/FormSection */ "./resources/js/Jetstream/FormSection.vue");
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
/* harmony import */ var _Components_ContractForm_vue__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Components/ContractForm.vue */ "./resources/js/Pages/Contracts/Components/ContractForm.vue");
@ -21073,10 +21075,10 @@ __webpack_require__.r(__webpack_exports__);
components: {
Layout: _Layouts_Layout__WEBPACK_IMPORTED_MODULE_0__.default,
BreadCrumb: _Components_BreadCrumb_vue__WEBPACK_IMPORTED_MODULE_1__.default,
ContractForm: _Components_ContractForm_vue__WEBPACK_IMPORTED_MODULE_2__.default,
CarCard: _Components_CarCard_vue__WEBPACK_IMPORTED_MODULE_3__.default,
ContactCard: _Components_ContactCard_vue__WEBPACK_IMPORTED_MODULE_4__.default,
JetFormSection: _Jetstream_FormSection__WEBPACK_IMPORTED_MODULE_5__.default
ContractForm: _Components_ContractForm_vue__WEBPACK_IMPORTED_MODULE_6__.default,
CarCard: _Components_CarCard_vue__WEBPACK_IMPORTED_MODULE_2__.default,
ContactCard: _Components_ContactCard_vue__WEBPACK_IMPORTED_MODULE_3__.default,
JetFormSection: _Jetstream_FormSection__WEBPACK_IMPORTED_MODULE_4__.default
},
props: {
car: Object,
@ -21096,25 +21098,25 @@ __webpack_require__.r(__webpack_exports__);
},
data: {
id: null,
date: (0,vue__WEBPACK_IMPORTED_MODULE_6__.ref)(new Date()),
date: (0,vue__WEBPACK_IMPORTED_MODULE_5__.ref)(new Date()),
price: null,
type: this.type,
insurance_type: '0',
car_id: this.car.id,
contact_id: this.contact.id,
is_sell_contract: this.type == "SellContract"
is_sell_contract: this.type == 'SellContract'
}
};
},
computed: {
contractType: function contractType() {
return this.isSellContract ? "Verkaufsvertrag" : "Ankaufsvertrag";
return this.isSellContract ? 'Verkaufsvertrag' : 'Ankaufsvertrag';
},
contactType: function contactType() {
return this.isSellContract ? "Käufer" : "Verkäufer";
return this.isSellContract ? 'Käufer' : 'Verkäufer';
},
isSellContract: function isSellContract() {
return this.type == "SellContract";
return this.type == 'SellContract';
}
}
});
@ -21192,13 +21194,13 @@ __webpack_require__.r(__webpack_exports__);
},
computed: {
contractType: function contractType() {
return this.isSellContract ? "Verkaufsvertrag" : "Ankaufsvertrag";
return this.isSellContract ? 'Verkaufsvertrag' : 'Ankaufsvertrag';
},
contactType: function contactType() {
return this.isSellContract ? "Käufer" : "Verkäufer";
return this.isSellContract ? 'Käufer' : 'Verkäufer';
},
isSellContract: function isSellContract() {
return this.type == "SellContract";
return this.type == 'SellContract';
},
emptyContact: function emptyContact() {
return {
@ -21335,13 +21337,13 @@ __webpack_require__.r(__webpack_exports__);
},
computed: {
contractType: function contractType() {
return this.isSellContract ? "Verkaufsvertrag" : "Ankaufsvertrag";
return this.isSellContract ? 'Verkaufsvertrag' : 'Ankaufsvertrag';
},
contactType: function contactType() {
return this.isSellContract ? "Käufer" : "Verkäufer";
return this.isSellContract ? 'Käufer' : 'Verkäufer';
},
isSellContract: function isSellContract() {
return this.type == "SellContract";
return this.type == 'SellContract';
},
emptyCar: function emptyCar() {
return {
@ -21410,8 +21412,8 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export */ });
/* harmony import */ var _Layouts_Layout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/Layouts/Layout */ "./resources/js/Layouts/Layout.vue");
/* harmony import */ var _Components_BreadCrumb_vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/Components/BreadCrumb.vue */ "./resources/js/Components/BreadCrumb.vue");
/* harmony import */ var _Components_ContractForm_vue__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Components/ContractForm.vue */ "./resources/js/Pages/Contracts/Components/ContractForm.vue");
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
/* harmony import */ var _Components_ContractForm_vue__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Components/ContractForm.vue */ "./resources/js/Pages/Contracts/Components/ContractForm.vue");
@ -21420,7 +21422,7 @@ __webpack_require__.r(__webpack_exports__);
components: {
BreadCrumb: _Components_BreadCrumb_vue__WEBPACK_IMPORTED_MODULE_1__.default,
Layout: _Layouts_Layout__WEBPACK_IMPORTED_MODULE_0__.default,
ContractForm: _Components_ContractForm_vue__WEBPACK_IMPORTED_MODULE_2__.default
ContractForm: _Components_ContractForm_vue__WEBPACK_IMPORTED_MODULE_3__.default
},
props: {
contract: Object,
@ -21430,14 +21432,14 @@ __webpack_require__.r(__webpack_exports__);
return {
currentRoute: 'contracts.edit',
meta: {
form_name: 'EditContract' + this.contract.id,
form_name: "EditContract".concat(this.contract.id),
route: this.route('contracts.update', this.contract.id),
method: 'put',
button_text: 'Änderungen speichern',
on_success: 'Änderungen gespeichert'
},
data: {
date: (0,vue__WEBPACK_IMPORTED_MODULE_3__.ref)(new Date(this.contract.date)),
date: (0,vue__WEBPACK_IMPORTED_MODULE_2__.ref)(new Date(this.contract.date)),
price: this.contract.price,
insurance_type: this.contract.insurance_type,
is_sell_contract: this.contract.is_sell_contract
@ -21768,8 +21770,8 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _Layouts_Layout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/Layouts/Layout */ "./resources/js/Layouts/Layout.vue");
/* harmony import */ var _DeleteUserForm__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./DeleteUserForm */ "./resources/js/Pages/Profile/DeleteUserForm.vue");
/* harmony import */ var _Jetstream_SectionBorder__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/Jetstream/SectionBorder */ "./resources/js/Jetstream/SectionBorder.vue");
/* harmony import */ var _Jetstream_SectionBorder__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/Jetstream/SectionBorder */ "./resources/js/Jetstream/SectionBorder.vue");
/* harmony import */ var _DeleteUserForm__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./DeleteUserForm */ "./resources/js/Pages/Profile/DeleteUserForm.vue");
/* harmony import */ var _LogoutOtherBrowserSessionsForm__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./LogoutOtherBrowserSessionsForm */ "./resources/js/Pages/Profile/LogoutOtherBrowserSessionsForm.vue");
/* harmony import */ var _TwoFactorAuthenticationForm__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./TwoFactorAuthenticationForm */ "./resources/js/Pages/Profile/TwoFactorAuthenticationForm.vue");
/* harmony import */ var _UpdatePasswordForm__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./UpdatePasswordForm */ "./resources/js/Pages/Profile/UpdatePasswordForm.vue");
@ -21785,8 +21787,8 @@ __webpack_require__.r(__webpack_exports__);
props: ['sessions'],
components: {
Layout: _Layouts_Layout__WEBPACK_IMPORTED_MODULE_0__.default,
DeleteUserForm: _DeleteUserForm__WEBPACK_IMPORTED_MODULE_1__.default,
JetSectionBorder: _Jetstream_SectionBorder__WEBPACK_IMPORTED_MODULE_2__.default,
DeleteUserForm: _DeleteUserForm__WEBPACK_IMPORTED_MODULE_2__.default,
JetSectionBorder: _Jetstream_SectionBorder__WEBPACK_IMPORTED_MODULE_1__.default,
LogoutOtherBrowserSessionsForm: _LogoutOtherBrowserSessionsForm__WEBPACK_IMPORTED_MODULE_3__.default,
TwoFactorAuthenticationForm: _TwoFactorAuthenticationForm__WEBPACK_IMPORTED_MODULE_4__.default,
UpdatePasswordForm: _UpdatePasswordForm__WEBPACK_IMPORTED_MODULE_5__.default,
@ -22220,10 +22222,10 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _TeamMemberManager__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./TeamMemberManager */ "./resources/js/Pages/Teams/TeamMemberManager.vue");
/* harmony import */ var _Layouts_AppLayout__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/Layouts/AppLayout */ "./resources/js/Layouts/AppLayout.vue");
/* harmony import */ var _DeleteTeamForm__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./DeleteTeamForm */ "./resources/js/Pages/Teams/DeleteTeamForm.vue");
/* harmony import */ var _Jetstream_SectionBorder__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/Jetstream/SectionBorder */ "./resources/js/Jetstream/SectionBorder.vue");
/* harmony import */ var _Layouts_AppLayout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/Layouts/AppLayout */ "./resources/js/Layouts/AppLayout.vue");
/* harmony import */ var _Jetstream_SectionBorder__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/Jetstream/SectionBorder */ "./resources/js/Jetstream/SectionBorder.vue");
/* harmony import */ var _TeamMemberManager__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./TeamMemberManager */ "./resources/js/Pages/Teams/TeamMemberManager.vue");
/* harmony import */ var _DeleteTeamForm__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./DeleteTeamForm */ "./resources/js/Pages/Teams/DeleteTeamForm.vue");
/* harmony import */ var _UpdateTeamNameForm__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./UpdateTeamNameForm */ "./resources/js/Pages/Teams/UpdateTeamNameForm.vue");
@ -22233,10 +22235,10 @@ __webpack_require__.r(__webpack_exports__);
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
props: ['team', 'availableRoles', 'permissions'],
components: {
AppLayout: _Layouts_AppLayout__WEBPACK_IMPORTED_MODULE_1__.default,
DeleteTeamForm: _DeleteTeamForm__WEBPACK_IMPORTED_MODULE_2__.default,
JetSectionBorder: _Jetstream_SectionBorder__WEBPACK_IMPORTED_MODULE_3__.default,
TeamMemberManager: _TeamMemberManager__WEBPACK_IMPORTED_MODULE_0__.default,
AppLayout: _Layouts_AppLayout__WEBPACK_IMPORTED_MODULE_0__.default,
DeleteTeamForm: _DeleteTeamForm__WEBPACK_IMPORTED_MODULE_3__.default,
JetSectionBorder: _Jetstream_SectionBorder__WEBPACK_IMPORTED_MODULE_1__.default,
TeamMemberManager: _TeamMemberManager__WEBPACK_IMPORTED_MODULE_2__.default,
UpdateTeamNameForm: _UpdateTeamNameForm__WEBPACK_IMPORTED_MODULE_4__.default
}
});
@ -32572,7 +32574,7 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var vue_unicons__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! vue-unicons */ "./node_modules/vue-unicons/dist/vue-unicons.es.js");
/* harmony import */ var vuex__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! vuex */ "./node_modules/vuex/dist/vuex.esm-bundler.js");
/* harmony import */ var vue_unicons_dist_icons__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! vue-unicons/dist/icons */ "./node_modules/vue-unicons/dist/icons.js");
__webpack_require__(/*! ./bootstrap */ "./resources/js/bootstrap.js"); // Import modules...
// Import modules...
@ -32580,6 +32582,7 @@ __webpack_require__(/*! ./bootstrap */ "./resources/js/bootstrap.js"); // Import
__webpack_require__(/*! ./bootstrap */ "./resources/js/bootstrap.js");
vue_unicons__WEBPACK_IMPORTED_MODULE_3__.default.add([vue_unicons_dist_icons__WEBPACK_IMPORTED_MODULE_4__.uniChart, vue_unicons_dist_icons__WEBPACK_IMPORTED_MODULE_4__.uniFileAlt, vue_unicons_dist_icons__WEBPACK_IMPORTED_MODULE_4__.uniPalette, vue_unicons_dist_icons__WEBPACK_IMPORTED_MODULE_4__.uniCalendarAlt, vue_unicons_dist_icons__WEBPACK_IMPORTED_MODULE_4__.uniPlusCircle, vue_unicons_dist_icons__WEBPACK_IMPORTED_MODULE_4__.uniMeh, vue_unicons_dist_icons__WEBPACK_IMPORTED_MODULE_4__.uniUsersAlt, vue_unicons_dist_icons__WEBPACK_IMPORTED_MODULE_4__.uniCarSideview, vue_unicons_dist_icons__WEBPACK_IMPORTED_MODULE_4__.uniDashboard, vue_unicons_dist_icons__WEBPACK_IMPORTED_MODULE_4__.uniSearch, vue_unicons_dist_icons__WEBPACK_IMPORTED_MODULE_4__.uniFilter, vue_unicons_dist_icons__WEBPACK_IMPORTED_MODULE_4__.uniFilterSlash, vue_unicons_dist_icons__WEBPACK_IMPORTED_MODULE_4__.uniTrashAlt, vue_unicons_dist_icons__WEBPACK_IMPORTED_MODULE_4__.uniPen, vue_unicons_dist_icons__WEBPACK_IMPORTED_MODULE_4__.uniExclamationTriangle, vue_unicons_dist_icons__WEBPACK_IMPORTED_MODULE_4__.uniMapMarker, vue_unicons_dist_icons__WEBPACK_IMPORTED_MODULE_4__.uniPhone, vue_unicons_dist_icons__WEBPACK_IMPORTED_MODULE_4__.uniEnvelope, vue_unicons_dist_icons__WEBPACK_IMPORTED_MODULE_4__.uniFileDownload, vue_unicons_dist_icons__WEBPACK_IMPORTED_MODULE_4__.uniArrowDown, vue_unicons_dist_icons__WEBPACK_IMPORTED_MODULE_4__.uniArrowUp, vue_unicons_dist_icons__WEBPACK_IMPORTED_MODULE_4__.uniArrowRight, vue_unicons_dist_icons__WEBPACK_IMPORTED_MODULE_4__.uniAngleRight, vue_unicons_dist_icons__WEBPACK_IMPORTED_MODULE_4__.uniAngleUp, vue_unicons_dist_icons__WEBPACK_IMPORTED_MODULE_4__.uniAngleDown, vue_unicons_dist_icons__WEBPACK_IMPORTED_MODULE_4__.uniAngleLeft, vue_unicons_dist_icons__WEBPACK_IMPORTED_MODULE_4__.uniFileUploadAlt]); // Create a new store instance.

View File

@ -10,5 +10,5 @@ export default {
href: String,
text: String,
},
}
};
</script>

View File

@ -10,9 +10,9 @@ import StandardButton from './StandardButton.vue';
export default {
components: { StandardButton },
props: {
class: String,
href: String,
},
}
props: {
class: String,
href: String,
},
};
</script>

View File

@ -10,9 +10,9 @@ import StandardButton from './StandardButton.vue';
export default {
components: { StandardButton },
props: {
class: String,
href: String,
},
}
props: {
class: String,
href: String,
},
};
</script>

View File

@ -7,21 +7,21 @@
<script>
export default {
props: {
class: String,
href: String,
props: {
class: String,
href: String,
},
data() {
return {
colour: 'indigo',
};
},
computed: {
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';
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}`;
},
data() {
return {
colour: 'indigo',
}
},
computed: {
allClasses: function () {
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"
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;
}
},
}
},
};
</script>

View File

@ -10,9 +10,9 @@ import StandardButton from './StandardButton.vue';
export default {
components: { StandardButton },
props: {
class: String,
href: String,
},
}
props: {
class: String,
href: String,
},
};
</script>

View File

@ -7,18 +7,18 @@
<script>
export default {
props: {
class: String,
href: String,
colour: String
},
computed: {
allClasses: function () {
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"
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;
}
props: {
class: String,
href: String,
colour: String,
},
computed: {
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';
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}`;
},
},
}
};
</script>

View File

@ -3,21 +3,21 @@
</template>
<script>
import ContractCard from '@/Components/ContractCard.vue'
import ContractCard from '@/Components/ContractCard.vue';
export default {
components: {
ContractCard,
},
props: {
contract: Object,
},
data() {
return {
meta: {
'contact': 'Verkäufer',
},
}
},
}
components: {
ContractCard,
},
props: {
contract: Object,
},
data() {
return {
meta: {
contact: 'Verkäufer',
},
};
},
};
</script>

View File

@ -61,9 +61,9 @@
<script>
export default ({
props: {
car: Object,
hideEmpty: String,
},
})
props: {
car: Object,
hideEmpty: String,
},
});
</script>

View File

@ -40,8 +40,8 @@
<script>
export default ({
props: {
contact: Object,
},
})
props: {
contact: Object,
},
});
</script>

View File

@ -55,36 +55,36 @@
</template>
<script>
import SimpleTable from '@/Components/SimpleTable.vue'
import ContactCard from '@/Components/ContactCard.vue'
import CarCard from '@/Components/CarCard.vue'
import PrintButton from './Buttons/PrintButton.vue'
import SimpleTable from '@/Components/SimpleTable.vue';
import ContactCard from '@/Components/ContactCard.vue';
import CarCard from '@/Components/CarCard.vue';
import PrintButton from './Buttons/PrintButton.vue';
export default {
components: {
SimpleTable,
ContactCard,
CarCard,
PrintButton,
components: {
SimpleTable,
ContactCard,
CarCard,
PrintButton,
},
props: {
contract: Object,
meta: Object,
},
computed: {
contractClasses() {
return `col-span-12 h-full relative sm:col-span-${this.contract.car ? '4' : '6'}`;
},
props: {
contract: Object,
meta: Object,
},
computed: {
contractClasses() {
return "col-span-12 h-full relative sm:col-span-" + (this.contract.car ? '4' : '6');
},
},
data() {
return {
sellContractsColumns: [
{key: 'buyer', value: 'Käufer'},
{key: 'date', value: 'Verkaufsdatum'},
{key: 'price', value: 'Verkaufspreis'},
{key: 'insurance_type', value: 'Versicherungstyp'},
],
}
},
}
},
data() {
return {
sellContractsColumns: [
{ key: 'buyer', value: 'Käufer' },
{ key: 'date', value: 'Verkaufsdatum' },
{ key: 'price', value: 'Verkaufspreis' },
{ key: 'insurance_type', value: 'Versicherungstyp' },
],
};
},
};
</script>

View File

@ -3,18 +3,18 @@
</template>
<script>
import useCurrencyInput from 'vue-currency-input'
import useCurrencyInput from 'vue-currency-input';
export default {
name: 'CurrencyInput',
props: {
modelValue: Number,
options: Object
options: Object,
},
setup (props) {
const { formattedValue, inputRef } = useCurrencyInput(props.options)
setup(props) {
const { formattedValue, inputRef } = useCurrencyInput(props.options);
return { inputRef, formattedValue }
}
}
return { inputRef, formattedValue };
},
};
</script>

View File

@ -13,10 +13,10 @@
<script>
export default {
props: {
title: String,
number: Number,
link: String,
},
}
props: {
title: String,
number: Number,
link: String,
},
};
</script>

View File

@ -15,14 +15,14 @@
<script>
export default {
props: {
document: Object,
props: {
document: Object,
},
methods: {
deleteDocument(e) {
e.preventDefault();
this.$emit('delete', this.document.id);
},
methods: {
deleteDocument(e) {
e.preventDefault();
this.$emit('delete', this.document.id);
},
},
}
},
};
</script>

View File

@ -18,69 +18,70 @@
<script>
const STATUS_INITIAL = 0, STATUS_SAVING = 1, STATUS_FAILED = 2;
const STATUS_INITIAL = 0; const STATUS_SAVING = 1; const
STATUS_FAILED = 2;
export default {
props: {
id: Number,
documents: Object,
props: {
id: Number,
documents: Object,
},
data() {
return {
uploadError: null,
currentStatus: null,
uploadFieldName: 'document',
};
},
computed: {
isInitial() {
return this.currentStatus === STATUS_INITIAL;
},
data() {
return {
uploadError: null,
currentStatus: null,
uploadFieldName: 'document',
}
isSaving() {
return this.currentStatus === STATUS_SAVING;
},
computed: {
isInitial() {
return this.currentStatus === STATUS_INITIAL;
},
isSaving() {
return this.currentStatus === STATUS_SAVING;
},
isFailed() {
return this.currentStatus === STATUS_FAILED;
},
isFailed() {
return this.currentStatus === STATUS_FAILED;
},
methods: {
reset() {
// reset form to initial state
this.currentStatus = STATUS_INITIAL;
this.uploadError = null;
},
save(formData) {
// upload data to the server
this.currentStatus = STATUS_SAVING;
axios.post(this.route('documents.store', this.id), formData)
.then(response => {
this.documents.push(response.data);
this.reset();
})
.catch(err => {
this.uploadError = err.response;
this.currentStatus = STATUS_FAILED;
});
},
filesChange(fieldName, fileList) {
// handle file changes
const formData = new FormData();
},
methods: {
reset() {
// reset form to initial state
this.currentStatus = STATUS_INITIAL;
this.uploadError = null;
},
save(formData) {
// upload data to the server
this.currentStatus = STATUS_SAVING;
axios.post(this.route('documents.store', this.id), formData)
.then((response) => {
this.documents.push(response.data);
this.reset();
})
.catch((err) => {
this.uploadError = err.response;
this.currentStatus = STATUS_FAILED;
});
},
filesChange(fieldName, fileList) {
// handle file changes
const formData = new FormData();
if (!fileList.length) return;
if (!fileList.length) return;
// append the files to FormData
Array
.from(Array(fileList.length).keys())
.map(x => {
formData.append(fieldName, fileList[x], fileList[x].name);
});
// append the files to FormData
Array
.from(Array(fileList.length).keys())
.map((x) => {
formData.append(fieldName, fileList[x], fileList[x].name);
});
// save it
this.save(formData);
},
// save it
this.save(formData);
},
mounted() {
this.reset();
},
}
},
mounted() {
this.reset();
},
};
</script>

View File

@ -9,36 +9,36 @@
</template>
<script>
import { useForm } from '@inertiajs/inertia-vue3'
import DocumentItem from '@/Components/Documents/Item.vue'
import DocumentUpload from '@/Components/Documents/Upload.vue'
import { useForm } from '@inertiajs/inertia-vue3';
import DocumentItem from '@/Components/Documents/Item.vue';
import DocumentUpload from '@/Components/Documents/Upload.vue';
export default {
components: {
DocumentItem,
DocumentUpload,
},
props: {
initial_documents: Object,
id: Number,
show_upload: Boolean,
},
data() {
return {
documents: this.initial_documents,
}
},
methods: {
deleteDocument(documentId) {
let form = useForm(`deleteDocument${documentId}`, {id: documentId});
form.delete(route('documents.destroy', this.id), {
preserveScroll: true,
onSuccess: () => {
form.reset();
this.documents = this.initial_documents;
}
});
components: {
DocumentItem,
DocumentUpload,
},
props: {
initial_documents: Object,
id: Number,
show_upload: Boolean,
},
data() {
return {
documents: this.initial_documents,
};
},
methods: {
deleteDocument(documentId) {
const form = useForm(`deleteDocument${documentId}`, { id: documentId });
form.delete(route('documents.destroy', this.id), {
preserveScroll: true,
onSuccess: () => {
form.reset();
this.documents = this.initial_documents;
},
}
}
});
},
},
};
</script>

View File

@ -32,7 +32,7 @@ export default {
data() {
return {
show: false,
}
};
},
watch: {
show(show) {
@ -43,19 +43,19 @@ export default {
modifiers: {
preventOverflow: { boundariesElement: this.boundary },
},
})
})
});
});
} else if (this.popper) {
setTimeout(() => this.popper.destroy(), 100)
setTimeout(() => this.popper.destroy(), 100);
}
},
},
mounted() {
document.addEventListener('keydown', e => {
document.addEventListener('keydown', (e) => {
if (e.keyCode === 27) {
this.show = false
this.show = false;
}
})
});
},
}
};
</script>

View File

@ -59,30 +59,31 @@
</template>
<script>
import JetDropdown from '@/Jetstream/Dropdown'
import JetDropdownLink from '@/Jetstream/DropdownLink'
import { mapState } from 'vuex'
export default {
components: {
JetDropdown,
JetDropdownLink,
},
import JetDropdown from '@/Jetstream/Dropdown';
import JetDropdownLink from '@/Jetstream/DropdownLink';
import { mapState } from 'vuex';
computed: {
...mapState(['sideBarOpen'])
export default {
components: {
JetDropdown,
JetDropdownLink,
},
computed: {
...mapState(['sideBarOpen']),
},
data() {
return {
dropDownOpen: false,
};
},
methods: {
toggleSidebar() {
this.$store.dispatch('toggleSidebar');
},
data() {
return {
dropDownOpen: false
}
logout() {
this.$inertia.post(route('logout'));
},
methods: {
toggleSidebar() {
this.$store.dispatch('toggleSidebar')
},
logout() {
this.$inertia.post(route('logout'));
},
}
}
},
};
</script>

View File

@ -14,5 +14,5 @@ export default {
props: {
links: Array,
},
}
};
</script>

View File

@ -38,57 +38,57 @@
</template>
<script>
import JetButton from '@/Jetstream/Button'
import JetLabel from '@/Jetstream/Label.vue'
import JetInput from '@/Jetstream/Input.vue'
import JetInputError from '@/Jetstream/InputError'
import Datepicker from 'vue3-datepicker'
import { useForm } from '@inertiajs/inertia-vue3'
import { ref } from 'vue'
import DialogModal from '@/Jetstream/DialogModal.vue'
import CurrencyInput from '@/Components/CurrencyInput'
import JetButton from '@/Jetstream/Button';
import JetLabel from '@/Jetstream/Label.vue';
import JetInput from '@/Jetstream/Input.vue';
import JetInputError from '@/Jetstream/InputError';
import Datepicker from 'vue3-datepicker';
import { useForm } from '@inertiajs/inertia-vue3';
import { ref } from 'vue';
import DialogModal from '@/Jetstream/DialogModal.vue';
import CurrencyInput from '@/Components/CurrencyInput';
export default {
components: {
JetButton,
JetLabel,
JetInput,
JetInputError,
DialogModal,
Datepicker,
CurrencyInput,
},
props: {
id: Number,
showModal: Boolean,
},
data() {
return {
form: useForm('CreatePayment', {
id: null,
date: ref(new Date()),
amount: null,
type: '1',
contract_id: this.id,
}),
currencyOptions: {
currency: 'CHF',
locale: 'de-CH',
exportValueAsInteger: true,
hideGroupingSeparatorOnFocus: false,
},
}
},
methods: {
submitForm() {
this.form.post(this.route('payments.store', this.id), {
preserveScroll: true,
onSuccess: () => {
this.$emit('close');
form.reset();
},
});
components: {
JetButton,
JetLabel,
JetInput,
JetInputError,
DialogModal,
Datepicker,
CurrencyInput,
},
props: {
id: Number,
showModal: Boolean,
},
data() {
return {
form: useForm('CreatePayment', {
id: null,
date: ref(new Date()),
amount: null,
type: '1',
contract_id: this.id,
}),
currencyOptions: {
currency: 'CHF',
locale: 'de-CH',
exportValueAsInteger: true,
hideGroupingSeparatorOnFocus: false,
},
};
},
methods: {
submitForm() {
this.form.post(this.route('payments.store', this.id), {
preserveScroll: true,
onSuccess: () => {
this.$emit('close');
form.reset();
},
});
},
}
},
};
</script>

View File

@ -14,45 +14,45 @@
</template>
<script>
import SimpleTable from '@/Components/SimpleTable.vue'
import PaymentCreateModal from '@/Components/Payments/CreateModal.vue'
import StandardButton from '@/Components/Buttons/StandardButton.vue'
import { useForm } from '@inertiajs/inertia-vue3'
import SimpleTable from '@/Components/SimpleTable.vue';
import PaymentCreateModal from '@/Components/Payments/CreateModal.vue';
import StandardButton from '@/Components/Buttons/StandardButton.vue';
import { useForm } from '@inertiajs/inertia-vue3';
export default {
components: {
SimpleTable,
PaymentCreateModal,
StandardButton,
components: {
SimpleTable,
PaymentCreateModal,
StandardButton,
},
props: {
payments: Object,
contract: Object,
show_upload: Boolean,
},
data() {
return {
showModal: false,
columns: [
{ key: 'date', value: 'Datum', sortable: false },
{ key: 'amount', value: 'Betrag', sortable: false },
{ key: 'type', value: 'Bezahlart', sortable: false },
{ key: 'delete', value: '', sortable: false },
],
};
},
methods: {
openModal(e) {
e.preventDefault();
this.showModal = true;
},
props: {
payments: Object,
contract: Object,
show_upload: Boolean,
deletePayment(id) {
const form = useForm(`deletePayment${id}`, { id });
form.delete(route('payments.destroy', this.contract.id), {
preserveScroll: true,
onSuccess: () => form.reset(),
});
},
data() {
return {
showModal: false,
columns: [
{key: 'date', value: 'Datum', sortable: false},
{key: 'amount', value: 'Betrag', sortable: false},
{key: 'type', value: 'Bezahlart', sortable: false},
{key: 'delete', value: '', sortable: false},
],
}
},
methods: {
openModal(e) {
e.preventDefault();
this.showModal = true;
},
deletePayment(id) {
let form = useForm(`deletePayment${id}`, {id: id});
form.delete(route('payments.destroy', this.contract.id), {
preserveScroll: true,
onSuccess: () => form.reset(),
});
},
},
}
},
};
</script>

View File

@ -17,5 +17,5 @@ export default {
default: 300,
},
},
}
};
</script>

View File

@ -3,21 +3,21 @@
</template>
<script>
import ContractCard from '@/Components/ContractCard.vue'
import ContractCard from '@/Components/ContractCard.vue';
export default {
components: {
ContractCard,
},
props: {
contract: Object,
},
data() {
return {
meta: {
'contact': 'Käufer',
},
}
},
}
components: {
ContractCard,
},
props: {
contract: Object,
},
data() {
return {
meta: {
contact: 'Käufer',
},
};
},
};
</script>

View File

@ -20,11 +20,11 @@
</template>
<script>
import Layout from '@/Layouts/Layout'
import Layout from '@/Layouts/Layout';
export default {
components: {
Layout,
},
}
components: {
Layout,
},
};
</script>

View File

@ -63,15 +63,15 @@
</template>
<script>
import { mapState } from 'vuex'
import JetNavLink from '@/Jetstream/NavLink'
import { mapState } from 'vuex';
import JetNavLink from '@/Jetstream/NavLink';
export default {
components: {
JetNavLink,
},
computed: {
...mapState(['sideBarOpen'])
}
}
components: {
JetNavLink,
},
computed: {
...mapState(['sideBarOpen']),
},
};
</script>

View File

@ -66,66 +66,64 @@
</template>
<script>
import Paginator from "@/Components/Paginator"
import StandardButton from "@/Components/Buttons/StandardButton.vue"
import { pickBy, throttle, mapValues } from 'lodash'
import Paginator from '@/Components/Paginator';
import StandardButton from '@/Components/Buttons/StandardButton.vue';
import { pickBy, throttle, mapValues } from 'lodash';
export default {
components: {
Paginator,
StandardButton,
components: {
Paginator,
StandardButton,
},
props: {
data: Object,
columns: Array,
title: String,
currentRoute: String,
defaultSort: Object,
filters: Object,
print: Boolean,
hideArrow: Boolean,
},
data() {
return {
form: this.filters,
sort: this.defaultSort,
};
},
watch: {
form: {
deep: true,
handler: throttle(function () {
this.refreshTable();
}, 300),
},
props: {
data: Object,
columns: Array,
title: String,
currentRoute: String,
defaultSort: Object,
filters: Object,
print: Boolean,
hideArrow: Boolean,
},
methods: {
resolve(path, obj) {
return path.split('.').reduce((prev, curr) => (prev ? prev[curr] : null), obj || self);
},
data() {
return {
form: this.filters,
sort: this.defaultSort,
}
sortTable(col) {
event.preventDefault();
if (this.sort.by == col) {
this.sort.direction = this.sort.direction == 'asc' ? 'desc' : 'asc';
} else {
this.sort.direction = 'asc';
}
this.sort.by = col;
this.$inertia.get(this.data.path, { sortby: this.sort.by, direction: this.sort.direction }, { preserveState: true });
},
watch: {
form: {
deep: true,
handler: throttle(function() {
this.refreshTable();
}, 300),
},
reset() {
this.form = mapValues(this.form, () => null);
},
methods: {
resolve(path, obj) {
return path.split('.').reduce(function(prev, curr) {
return prev ? prev[curr] : null
}, obj || self)
},
sortTable(col) {
event.preventDefault();
if (this.sort.by == col) {
this.sort.direction = this.sort.direction == 'asc' ? 'desc' : 'asc';
} else {
this.sort.direction = 'asc';
}
this.sort.by = col;
this.$inertia.get(this.data.path, {'sortby': this.sort.by, 'direction': this.sort.direction}, { preserveState: true })
},
reset() {
this.form = mapValues(this.form, () => null)
},
refreshTable() {
if (this.currentRoute) {
this.$inertia.get(this.route(this.currentRoute), pickBy(this.form), { preserveState: true })
}
},
isActiveSort(col, dir) {
return col == this.sort.by && dir == this.sort.direction;
},
refreshTable() {
if (this.currentRoute) {
this.$inertia.get(this.route(this.currentRoute), pickBy(this.form), { preserveState: true });
}
},
}
isActiveSort(col, dir) {
return col == this.sort.by && dir == this.sort.direction;
},
},
};
</script>

View File

@ -9,7 +9,7 @@
</template>
<script>
export default {
props: ['on'],
}
export default {
props: ['on'],
};
</script>

View File

@ -14,11 +14,11 @@
</template>
<script>
import JetSectionTitle from './SectionTitle'
import JetSectionTitle from './SectionTitle';
export default {
components: {
JetSectionTitle,
}
}
export default {
components: {
JetSectionTitle,
},
};
</script>

View File

@ -38,21 +38,21 @@
</template>
<script>
export default {
data() {
return {
show: true,
}
},
export default {
data() {
return {
show: true,
};
},
computed: {
style() {
return this.$page.props.jetstream.flash?.bannerStyle || 'success'
},
computed: {
style() {
return this.$page.props.jetstream.flash?.bannerStyle || 'success';
},
message() {
return this.$page.props.jetstream.flash?.banner || ''
},
}
}
message() {
return this.$page.props.jetstream.flash?.banner || '';
},
},
};
</script>

View File

@ -5,12 +5,12 @@
</template>
<script>
export default {
props: {
type: {
type: String,
default: 'submit',
},
}
}
export default {
props: {
type: {
type: String,
default: 'submit',
},
},
};
</script>

View File

@ -5,28 +5,28 @@
<script>
export default {
emits: ['update:checked'],
emits: ['update:checked'],
props: {
checked: {
type: [Array, Boolean],
default: false,
},
value: {
default: null,
},
props: {
checked: {
type: [Array, Boolean],
default: false,
},
computed: {
proxyChecked: {
get() {
return this.checked;
},
set(val) {
this.$emit("update:checked", val);
},
},
value: {
default: null,
},
}
},
computed: {
proxyChecked: {
get() {
return this.checked;
},
set(val) {
this.$emit('update:checked', val);
},
},
},
};
</script>

View File

@ -28,31 +28,31 @@
</template>
<script>
import Modal from './Modal'
import Modal from './Modal';
export default {
emits: ['close'],
export default {
emits: ['close'],
components: {
Modal,
},
components: {
Modal,
},
props: {
show: {
default: false
},
maxWidth: {
default: '2xl'
},
closeable: {
default: true
},
},
props: {
show: {
default: false,
},
maxWidth: {
default: '2xl',
},
closeable: {
default: true,
},
},
methods: {
close() {
this.$emit('close')
},
}
}
methods: {
close() {
this.$emit('close');
},
},
};
</script>

View File

@ -36,79 +36,79 @@
</template>
<script>
import JetButton from './Button'
import JetDialogModal from './DialogModal'
import JetInput from './Input'
import JetInputError from './InputError'
import JetSecondaryButton from './SecondaryButton'
import JetButton from './Button';
import JetDialogModal from './DialogModal';
import JetInput from './Input';
import JetInputError from './InputError';
import JetSecondaryButton from './SecondaryButton';
export default {
emits: ['confirmed'],
export default {
emits: ['confirmed'],
props: {
title: {
default: 'Confirm Password',
},
content: {
default: 'For your security, please confirm your password to continue.',
},
button: {
default: 'Confirm',
}
},
props: {
title: {
default: 'Confirm Password',
},
content: {
default: 'For your security, please confirm your password to continue.',
},
button: {
default: 'Confirm',
},
},
components: {
JetButton,
JetDialogModal,
JetInput,
JetInputError,
JetSecondaryButton,
},
components: {
JetButton,
JetDialogModal,
JetInput,
JetInputError,
JetSecondaryButton,
},
data() {
return {
confirmingPassword: false,
form: {
password: '',
error: '',
},
}
},
data() {
return {
confirmingPassword: false,
form: {
password: '',
error: '',
},
};
},
methods: {
startConfirmingPassword() {
axios.get(route('password.confirmation')).then(response => {
if (response.data.confirmed) {
this.$emit('confirmed');
} else {
this.confirmingPassword = true;
methods: {
startConfirmingPassword() {
axios.get(route('password.confirmation')).then((response) => {
if (response.data.confirmed) {
this.$emit('confirmed');
} else {
this.confirmingPassword = true;
setTimeout(() => this.$refs.password.focus(), 250)
}
})
},
confirmPassword() {
this.form.processing = true;
axios.post(route('password.confirm'), {
password: this.form.password,
}).then(() => {
this.form.processing = false;
this.closeModal()
this.$nextTick(() => this.$emit('confirmed'));
}).catch(error => {
this.form.processing = false;
this.form.error = error.response.data.errors.password[0];
this.$refs.password.focus()
});
},
closeModal() {
this.confirmingPassword = false
this.form.password = '';
this.form.error = '';
},
setTimeout(() => this.$refs.password.focus(), 250);
}
}
});
},
confirmPassword() {
this.form.processing = true;
axios.post(route('password.confirm'), {
password: this.form.password,
}).then(() => {
this.form.processing = false;
this.closeModal();
this.$nextTick(() => this.$emit('confirmed'));
}).catch((error) => {
this.form.processing = false;
this.form.error = error.response.data.errors.password[0];
this.$refs.password.focus();
});
},
closeModal() {
this.confirmingPassword = false;
this.form.password = '';
this.form.error = '';
},
},
};
</script>

View File

@ -5,12 +5,12 @@
</template>
<script>
export default {
props: {
type: {
type: String,
default: 'button',
},
}
}
export default {
props: {
type: {
type: String,
default: 'button',
},
},
};
</script>

View File

@ -20,31 +20,31 @@
</template>
<script>
import Modal from './Modal'
import Modal from './Modal';
export default {
emits: ['close'],
export default {
emits: ['close'],
components: {
Modal,
},
components: {
Modal,
},
props: {
show: {
default: false
},
maxWidth: {
default: '2xl'
},
closeable: {
default: true
},
},
props: {
show: {
default: false,
},
maxWidth: {
default: '2xl',
},
closeable: {
default: true,
},
},
methods: {
close() {
this.$emit('close')
},
}
}
methods: {
close() {
this.$emit('close');
},
},
};
</script>

View File

@ -29,54 +29,53 @@
</template>
<script>
import { onMounted, onUnmounted, ref } from "vue";
import { onMounted, onUnmounted, ref } from 'vue';
export default {
props: {
align: {
default: 'right'
},
width: {
default: '48'
},
contentClasses: {
default: () => ['py-1', 'bg-white']
}
props: {
align: {
default: 'right',
},
width: {
default: '48',
},
contentClasses: {
default: () => ['py-1', 'bg-white'],
},
},
setup() {
const open = ref(false);
const closeOnEscape = (e) => {
if (open.value && e.keyCode === 27) {
open.value = false;
}
};
onMounted(() => document.addEventListener('keydown', closeOnEscape));
onUnmounted(() => document.removeEventListener('keydown', closeOnEscape));
return {
open,
};
},
computed: {
widthClass() {
return {
48: 'w-48',
}[this.width.toString()];
},
setup() {
let open = ref(false)
const closeOnEscape = (e) => {
if (open.value && e.keyCode === 27) {
open.value = false
}
}
onMounted(() => document.addEventListener('keydown', closeOnEscape))
onUnmounted(() => document.removeEventListener('keydown', closeOnEscape))
return {
open,
}
alignmentClasses() {
if (this.align === 'left') {
return 'origin-top-left left-0';
} if (this.align === 'right') {
return 'origin-top-right right-0';
}
return 'origin-top';
},
computed: {
widthClass() {
return {
'48': 'w-48',
}[this.width.toString()]
},
alignmentClasses() {
if (this.align === 'left') {
return 'origin-top-left left-0'
} else if (this.align === 'right') {
return 'origin-top-right right-0'
} else {
return 'origin-top'
}
},
}
}
},
};
</script>

View File

@ -15,7 +15,7 @@
</template>
<script>
export default {
props: ['href', 'as']
}
export default {
props: ['href', 'as'],
};
</script>

View File

@ -22,31 +22,31 @@
</template>
<script>
import JetSectionTitle from './SectionTitle'
import JetSectionTitle from './SectionTitle';
export default {
emits: ['submitted'],
export default {
emits: ['submitted'],
props: {
emptyBg: {
type: Boolean,
default: false,
},
},
props: {
emptyBg: {
type: Boolean,
default: false,
},
},
components: {
JetSectionTitle,
},
components: {
JetSectionTitle,
},
computed: {
hasActions() {
return !! this.$slots.actions
},
classnames() {
let classnames = !this.emptyBg ? 'px-4 py-5 bg-white sm:p-6 shadow ' :"";
classnames += this.hasActions ? 'sm:rounded-tl-md sm:rounded-tr-md' : 'sm:rounded-md';
return classnames;
},
}
}
computed: {
hasActions() {
return !!this.$slots.actions;
},
classnames() {
let classnames = !this.emptyBg ? 'px-4 py-5 bg-white sm:p-6 shadow ' : '';
classnames += this.hasActions ? 'sm:rounded-tl-md sm:rounded-tr-md' : 'sm:rounded-md';
return classnames;
},
},
};
</script>

View File

@ -3,16 +3,15 @@
</template>
<script>
export default {
props: ['modelValue'],
export default {
props: ['modelValue'],
emits: ['update:modelValue'],
emits: ['update:modelValue'],
methods: {
focus() {
this.$refs.input.focus()
}
}
}
methods: {
focus() {
this.$refs.input.focus();
},
},
};
</script>

View File

@ -7,7 +7,7 @@
</template>
<script>
export default {
props: ['message']
}
export default {
props: ['message'],
};
</script>

View File

@ -6,7 +6,7 @@
</template>
<script>
export default {
props: ['value']
}
export default {
props: ['value'],
};
</script>

View File

@ -29,67 +29,67 @@
</template>
<script>
import { onMounted, onUnmounted } from "vue";
import { onMounted, onUnmounted } from 'vue';
export default {
emits: ['close'],
emits: ['close'],
props: {
show: {
default: false
},
maxWidth: {
default: '2xl'
},
closeable: {
default: true
},
},
props: {
show: {
default: false,
},
maxWidth: {
default: '2xl',
},
closeable: {
default: true,
},
},
watch: {
show: {
immediate: true,
handler: (show) => {
if (show) {
document.body.style.overflow = 'hidden'
} else {
document.body.style.overflow = null
}
}
}
},
setup(props, {emit}) {
const close = () => {
if (props.closeable) {
emit('close')
}
}
const closeOnEscape = (e) => {
if (e.key === 'Escape' && props.show) {
close()
}
}
onMounted(() => document.addEventListener('keydown', closeOnEscape))
onUnmounted(() => document.removeEventListener('keydown', closeOnEscape))
return {
close,
}
},
computed: {
maxWidthClass() {
return {
'sm': 'sm:max-w-sm',
'md': 'sm:max-w-md',
'lg': 'sm:max-w-lg',
'xl': 'sm:max-w-xl',
'2xl': 'sm:max-w-2xl',
}[this.maxWidth]
}
watch: {
show: {
immediate: true,
handler: (show) => {
if (show) {
document.body.style.overflow = 'hidden';
} else {
document.body.style.overflow = null;
}
}
},
},
},
setup(props, { emit }) {
const close = () => {
if (props.closeable) {
emit('close');
}
};
const closeOnEscape = (e) => {
if (e.key === 'Escape' && props.show) {
close();
}
};
onMounted(() => document.addEventListener('keydown', closeOnEscape));
onUnmounted(() => document.removeEventListener('keydown', closeOnEscape));
return {
close,
};
},
computed: {
maxWidthClass() {
return {
sm: 'sm:max-w-sm',
md: 'sm:max-w-md',
lg: 'sm:max-w-lg',
xl: 'sm:max-w-xl',
'2xl': 'sm:max-w-2xl',
}[this.maxWidth];
},
},
};
</script>

View File

@ -5,15 +5,15 @@
</template>
<script>
export default {
props: ['href', 'active'],
export default {
props: ['href', 'active'],
computed: {
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'
}
}
}
computed: {
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';
},
},
};
</script>

View File

@ -11,15 +11,15 @@
</template>
<script>
export default {
props: ['active', 'href', 'as'],
export default {
props: ['active', 'href', 'as'],
computed: {
classes() {
return this.active
? 'block pl-3 pr-4 py-2 border-l-4 border-indigo-400 text-base font-medium text-indigo-700 bg-indigo-50 focus:outline-none focus:text-indigo-800 focus:bg-indigo-100 focus:border-indigo-700 transition'
: 'block pl-3 pr-4 py-2 border-l-4 border-transparent text-base font-medium text-gray-600 hover:text-gray-800 hover:bg-gray-50 hover:border-gray-300 focus:outline-none focus:text-gray-800 focus:bg-gray-50 focus:border-gray-300 transition'
}
}
}
computed: {
classes() {
return this.active
? 'block pl-3 pr-4 py-2 border-l-4 border-indigo-400 text-base font-medium text-indigo-700 bg-indigo-50 focus:outline-none focus:text-indigo-800 focus:bg-indigo-100 focus:border-indigo-700 transition'
: 'block pl-3 pr-4 py-2 border-l-4 border-transparent text-base font-medium text-gray-600 hover:text-gray-800 hover:bg-gray-50 hover:border-gray-300 focus:outline-none focus:text-gray-800 focus:bg-gray-50 focus:border-gray-300 transition';
},
},
};
</script>

View File

@ -5,12 +5,12 @@
</template>
<script>
export default {
props: {
type: {
type: String,
default: 'button',
},
}
}
export default {
props: {
type: {
type: String,
default: 'button',
},
},
};
</script>

View File

@ -9,15 +9,15 @@
</template>
<script>
export default {
computed: {
errors() {
return this.$page.props.errors
},
export default {
computed: {
errors() {
return this.$page.props.errors;
},
hasErrors() {
return Object.keys(this.errors).length > 0;
},
}
}
hasErrors() {
return Object.keys(this.errors).length > 0;
},
},
};
</script>

View File

@ -242,41 +242,41 @@
</template>
<script>
import JetApplicationMark from '@/Jetstream/ApplicationMark'
import JetBanner from '@/Jetstream/Banner'
import JetDropdown from '@/Jetstream/Dropdown'
import JetDropdownLink from '@/Jetstream/DropdownLink'
import JetNavLink from '@/Jetstream/NavLink'
import JetResponsiveNavLink from '@/Jetstream/ResponsiveNavLink'
import JetApplicationMark from '@/Jetstream/ApplicationMark';
import JetBanner from '@/Jetstream/Banner';
import JetDropdown from '@/Jetstream/Dropdown';
import JetDropdownLink from '@/Jetstream/DropdownLink';
import JetNavLink from '@/Jetstream/NavLink';
import JetResponsiveNavLink from '@/Jetstream/ResponsiveNavLink';
export default {
components: {
JetApplicationMark,
JetBanner,
JetDropdown,
JetDropdownLink,
JetNavLink,
JetResponsiveNavLink,
},
export default {
components: {
JetApplicationMark,
JetBanner,
JetDropdown,
JetDropdownLink,
JetNavLink,
JetResponsiveNavLink,
},
data() {
return {
showingNavigationDropdown: false,
}
},
data() {
return {
showingNavigationDropdown: false,
};
},
methods: {
switchToTeam(team) {
this.$inertia.put(route('current-team.update'), {
'team_id': team.id
}, {
preserveState: false
})
},
methods: {
switchToTeam(team) {
this.$inertia.put(route('current-team.update'), {
team_id: team.id,
}, {
preserveState: false,
});
},
logout() {
this.$inertia.post(route('logout'));
},
}
}
logout() {
this.$inertia.post(route('logout'));
},
},
};
</script>

View File

@ -20,19 +20,19 @@
</template>
<script>
import { mapState } from 'vuex'
import Sidebar from "@/Components/Sidebar"
import Navbar from "@/Components/Navbar"
import JetBanner from '@/Jetstream/Banner'
import { mapState } from 'vuex';
import Sidebar from '@/Components/Sidebar';
import Navbar from '@/Components/Navbar';
import JetBanner from '@/Jetstream/Banner';
export default {
computed: {
...mapState(['sideBarOpen'])
...mapState(['sideBarOpen']),
},
components: {
Sidebar,
Navbar,
JetBanner,
}
}
},
};
</script>

View File

@ -164,98 +164,98 @@
</template>
<script>
import JetActionMessage from '@/Jetstream/ActionMessage'
import JetActionSection from '@/Jetstream/ActionSection'
import JetButton from '@/Jetstream/Button'
import JetConfirmationModal from '@/Jetstream/ConfirmationModal'
import JetDangerButton from '@/Jetstream/DangerButton'
import JetDialogModal from '@/Jetstream/DialogModal'
import JetFormSection from '@/Jetstream/FormSection'
import JetInput from '@/Jetstream/Input'
import JetCheckbox from '@/Jetstream/Checkbox'
import JetInputError from '@/Jetstream/InputError'
import JetLabel from '@/Jetstream/Label'
import JetSecondaryButton from '@/Jetstream/SecondaryButton'
import JetSectionBorder from '@/Jetstream/SectionBorder'
import JetActionMessage from '@/Jetstream/ActionMessage';
import JetActionSection from '@/Jetstream/ActionSection';
import JetButton from '@/Jetstream/Button';
import JetConfirmationModal from '@/Jetstream/ConfirmationModal';
import JetDangerButton from '@/Jetstream/DangerButton';
import JetDialogModal from '@/Jetstream/DialogModal';
import JetFormSection from '@/Jetstream/FormSection';
import JetInput from '@/Jetstream/Input';
import JetCheckbox from '@/Jetstream/Checkbox';
import JetInputError from '@/Jetstream/InputError';
import JetLabel from '@/Jetstream/Label';
import JetSecondaryButton from '@/Jetstream/SecondaryButton';
import JetSectionBorder from '@/Jetstream/SectionBorder';
export default {
components: {
JetActionMessage,
JetActionSection,
JetButton,
JetConfirmationModal,
JetDangerButton,
JetDialogModal,
JetFormSection,
JetInput,
JetCheckbox,
JetInputError,
JetLabel,
JetSecondaryButton,
JetSectionBorder,
export default {
components: {
JetActionMessage,
JetActionSection,
JetButton,
JetConfirmationModal,
JetDangerButton,
JetDialogModal,
JetFormSection,
JetInput,
JetCheckbox,
JetInputError,
JetLabel,
JetSecondaryButton,
JetSectionBorder,
},
props: [
'tokens',
'availablePermissions',
'defaultPermissions',
],
data() {
return {
createApiTokenForm: this.$inertia.form({
name: '',
permissions: this.defaultPermissions,
}),
updateApiTokenForm: this.$inertia.form({
permissions: [],
}),
deleteApiTokenForm: this.$inertia.form(),
displayingToken: false,
managingPermissionsFor: null,
apiTokenBeingDeleted: null,
};
},
methods: {
createApiToken() {
this.createApiTokenForm.post(route('api-tokens.store'), {
preserveScroll: true,
onSuccess: () => {
this.displayingToken = true;
this.createApiTokenForm.reset();
},
});
},
props: [
'tokens',
'availablePermissions',
'defaultPermissions',
],
manageApiTokenPermissions(token) {
this.updateApiTokenForm.permissions = token.abilities;
data() {
return {
createApiTokenForm: this.$inertia.form({
name: '',
permissions: this.defaultPermissions,
}),
this.managingPermissionsFor = token;
},
updateApiTokenForm: this.$inertia.form({
permissions: []
}),
updateApiToken() {
this.updateApiTokenForm.put(route('api-tokens.update', this.managingPermissionsFor), {
preserveScroll: true,
preserveState: true,
onSuccess: () => (this.managingPermissionsFor = null),
});
},
deleteApiTokenForm: this.$inertia.form(),
confirmApiTokenDeletion(token) {
this.apiTokenBeingDeleted = token;
},
displayingToken: false,
managingPermissionsFor: null,
apiTokenBeingDeleted: null,
}
},
methods: {
createApiToken() {
this.createApiTokenForm.post(route('api-tokens.store'), {
preserveScroll: true,
onSuccess: () => {
this.displayingToken = true
this.createApiTokenForm.reset()
}
})
},
manageApiTokenPermissions(token) {
this.updateApiTokenForm.permissions = token.abilities
this.managingPermissionsFor = token
},
updateApiToken() {
this.updateApiTokenForm.put(route('api-tokens.update', this.managingPermissionsFor), {
preserveScroll: true,
preserveState: true,
onSuccess: () => (this.managingPermissionsFor = null),
})
},
confirmApiTokenDeletion(token) {
this.apiTokenBeingDeleted = token
},
deleteApiToken() {
this.deleteApiTokenForm.delete(route('api-tokens.destroy', this.apiTokenBeingDeleted), {
preserveScroll: true,
preserveState: true,
onSuccess: () => (this.apiTokenBeingDeleted = null),
})
},
},
}
deleteApiToken() {
this.deleteApiTokenForm.delete(route('api-tokens.destroy', this.apiTokenBeingDeleted), {
preserveScroll: true,
preserveState: true,
onSuccess: () => (this.apiTokenBeingDeleted = null),
});
},
},
};
</script>

View File

@ -17,19 +17,19 @@
</template>
<script>
import ApiTokenManager from './ApiTokenManager'
import AppLayout from '@/Layouts/AppLayout'
import AppLayout from '@/Layouts/AppLayout';
import ApiTokenManager from './ApiTokenManager';
export default {
props: [
'tokens',
'availablePermissions',
'defaultPermissions',
],
export default {
props: [
'tokens',
'availablePermissions',
'defaultPermissions',
],
components: {
ApiTokenManager,
AppLayout,
},
}
components: {
ApiTokenManager,
AppLayout,
},
};
</script>

View File

@ -26,37 +26,37 @@
</template>
<script>
import JetAuthenticationCard from '@/Jetstream/AuthenticationCard'
import JetAuthenticationCardLogo from '@/Jetstream/AuthenticationCardLogo'
import JetButton from '@/Jetstream/Button'
import JetInput from '@/Jetstream/Input'
import JetLabel from '@/Jetstream/Label'
import JetValidationErrors from '@/Jetstream/ValidationErrors'
import JetAuthenticationCard from '@/Jetstream/AuthenticationCard';
import JetAuthenticationCardLogo from '@/Jetstream/AuthenticationCardLogo';
import JetButton from '@/Jetstream/Button';
import JetInput from '@/Jetstream/Input';
import JetLabel from '@/Jetstream/Label';
import JetValidationErrors from '@/Jetstream/ValidationErrors';
export default {
components: {
JetAuthenticationCard,
JetAuthenticationCardLogo,
JetButton,
JetInput,
JetLabel,
JetValidationErrors
},
export default {
components: {
JetAuthenticationCard,
JetAuthenticationCardLogo,
JetButton,
JetInput,
JetLabel,
JetValidationErrors,
},
data() {
return {
form: this.$inertia.form({
password: '',
})
}
},
data() {
return {
form: this.$inertia.form({
password: '',
}),
};
},
methods: {
submit() {
this.form.post(this.route('password.confirm'), {
onFinish: () => this.form.reset(),
})
}
}
}
methods: {
submit() {
this.form.post(this.route('password.confirm'), {
onFinish: () => this.form.reset(),
});
},
},
};
</script>

View File

@ -30,39 +30,39 @@
</template>
<script>
import JetAuthenticationCard from '@/Jetstream/AuthenticationCard'
import JetAuthenticationCardLogo from '@/Jetstream/AuthenticationCardLogo'
import JetButton from '@/Jetstream/Button'
import JetInput from '@/Jetstream/Input'
import JetLabel from '@/Jetstream/Label'
import JetValidationErrors from '@/Jetstream/ValidationErrors'
import JetAuthenticationCard from '@/Jetstream/AuthenticationCard';
import JetAuthenticationCardLogo from '@/Jetstream/AuthenticationCardLogo';
import JetButton from '@/Jetstream/Button';
import JetInput from '@/Jetstream/Input';
import JetLabel from '@/Jetstream/Label';
import JetValidationErrors from '@/Jetstream/ValidationErrors';
export default {
components: {
JetAuthenticationCard,
JetAuthenticationCardLogo,
JetButton,
JetInput,
JetLabel,
JetValidationErrors
},
export default {
components: {
JetAuthenticationCard,
JetAuthenticationCardLogo,
JetButton,
JetInput,
JetLabel,
JetValidationErrors,
},
props: {
status: String
},
props: {
status: String,
},
data() {
return {
form: this.$inertia.form({
email: ''
})
}
},
data() {
return {
form: this.$inertia.form({
email: '',
}),
};
},
methods: {
submit() {
this.form.post(this.route('password.email'))
}
}
}
methods: {
submit() {
this.form.post(this.route('password.email'));
},
},
};
</script>

View File

@ -42,51 +42,51 @@
</template>
<script>
import JetAuthenticationCard from '@/Jetstream/AuthenticationCard'
import JetAuthenticationCardLogo from '@/Jetstream/AuthenticationCardLogo'
import JetButton from '@/Jetstream/Button'
import JetInput from '@/Jetstream/Input'
import JetCheckbox from '@/Jetstream/Checkbox'
import JetLabel from '@/Jetstream/Label'
import JetValidationErrors from '@/Jetstream/ValidationErrors'
import JetAuthenticationCard from '@/Jetstream/AuthenticationCard';
import JetAuthenticationCardLogo from '@/Jetstream/AuthenticationCardLogo';
import JetButton from '@/Jetstream/Button';
import JetInput from '@/Jetstream/Input';
import JetCheckbox from '@/Jetstream/Checkbox';
import JetLabel from '@/Jetstream/Label';
import JetValidationErrors from '@/Jetstream/ValidationErrors';
export default {
components: {
JetAuthenticationCard,
JetAuthenticationCardLogo,
JetButton,
JetInput,
JetCheckbox,
JetLabel,
JetValidationErrors
},
export default {
components: {
JetAuthenticationCard,
JetAuthenticationCardLogo,
JetButton,
JetInput,
JetCheckbox,
JetLabel,
JetValidationErrors,
},
props: {
canResetPassword: Boolean,
status: String
},
props: {
canResetPassword: Boolean,
status: String,
},
data() {
return {
form: this.$inertia.form({
email: '',
password: '',
remember: false
})
}
},
data() {
return {
form: this.$inertia.form({
email: '',
password: '',
remember: false,
}),
};
},
methods: {
submit() {
this.form
.transform(data => ({
... data,
remember: this.form.remember ? 'on' : ''
}))
.post(this.route('login'), {
onFinish: () => this.form.reset('password'),
})
}
}
}
methods: {
submit() {
this.form
.transform((data) => ({
...data,
remember: this.form.remember ? 'on' : '',
}))
.post(this.route('login'), {
onFinish: () => this.form.reset('password'),
});
},
},
};
</script>

View File

@ -53,43 +53,43 @@
</template>
<script>
import JetAuthenticationCard from '@/Jetstream/AuthenticationCard'
import JetAuthenticationCardLogo from '@/Jetstream/AuthenticationCardLogo'
import JetButton from '@/Jetstream/Button'
import JetInput from '@/Jetstream/Input'
import JetCheckbox from "@/Jetstream/Checkbox";
import JetLabel from '@/Jetstream/Label'
import JetValidationErrors from '@/Jetstream/ValidationErrors'
import JetAuthenticationCard from '@/Jetstream/AuthenticationCard';
import JetAuthenticationCardLogo from '@/Jetstream/AuthenticationCardLogo';
import JetButton from '@/Jetstream/Button';
import JetInput from '@/Jetstream/Input';
import JetCheckbox from '@/Jetstream/Checkbox';
import JetLabel from '@/Jetstream/Label';
import JetValidationErrors from '@/Jetstream/ValidationErrors';
export default {
components: {
JetAuthenticationCard,
JetAuthenticationCardLogo,
JetButton,
JetInput,
JetCheckbox,
JetLabel,
JetValidationErrors
},
export default {
components: {
JetAuthenticationCard,
JetAuthenticationCardLogo,
JetButton,
JetInput,
JetCheckbox,
JetLabel,
JetValidationErrors,
},
data() {
return {
form: this.$inertia.form({
name: '',
email: '',
password: '',
password_confirmation: '',
terms: false,
})
}
},
data() {
return {
form: this.$inertia.form({
name: '',
email: '',
password: '',
password_confirmation: '',
terms: false,
}),
};
},
methods: {
submit() {
this.form.post(this.route('register'), {
onFinish: () => this.form.reset('password', 'password_confirmation'),
})
}
}
}
methods: {
submit() {
this.form.post(this.route('register'), {
onFinish: () => this.form.reset('password', 'password_confirmation'),
});
},
},
};
</script>

View File

@ -32,45 +32,45 @@
</template>
<script>
import JetAuthenticationCard from '@/Jetstream/AuthenticationCard'
import JetAuthenticationCardLogo from '@/Jetstream/AuthenticationCardLogo'
import JetButton from '@/Jetstream/Button'
import JetInput from '@/Jetstream/Input'
import JetLabel from '@/Jetstream/Label'
import JetValidationErrors from '@/Jetstream/ValidationErrors'
import JetAuthenticationCard from '@/Jetstream/AuthenticationCard';
import JetAuthenticationCardLogo from '@/Jetstream/AuthenticationCardLogo';
import JetButton from '@/Jetstream/Button';
import JetInput from '@/Jetstream/Input';
import JetLabel from '@/Jetstream/Label';
import JetValidationErrors from '@/Jetstream/ValidationErrors';
export default {
components: {
JetAuthenticationCard,
JetAuthenticationCardLogo,
JetButton,
JetInput,
JetLabel,
JetValidationErrors
},
export default {
components: {
JetAuthenticationCard,
JetAuthenticationCardLogo,
JetButton,
JetInput,
JetLabel,
JetValidationErrors,
},
props: {
email: String,
token: String,
},
props: {
email: String,
token: String,
},
data() {
return {
form: this.$inertia.form({
token: this.token,
email: this.email,
password: '',
password_confirmation: '',
})
}
},
data() {
return {
form: this.$inertia.form({
token: this.token,
email: this.email,
password: '',
password_confirmation: '',
}),
};
},
methods: {
submit() {
this.form.post(this.route('password.update'), {
onFinish: () => this.form.reset('password', 'password_confirmation'),
})
}
}
}
methods: {
submit() {
this.form.post(this.route('password.update'), {
onFinish: () => this.form.reset('password', 'password_confirmation'),
});
},
},
};
</script>

View File

@ -47,51 +47,51 @@
</template>
<script>
import JetAuthenticationCard from '@/Jetstream/AuthenticationCard'
import JetAuthenticationCardLogo from '@/Jetstream/AuthenticationCardLogo'
import JetButton from '@/Jetstream/Button'
import JetInput from '@/Jetstream/Input'
import JetLabel from '@/Jetstream/Label'
import JetValidationErrors from '@/Jetstream/ValidationErrors'
import JetAuthenticationCard from '@/Jetstream/AuthenticationCard';
import JetAuthenticationCardLogo from '@/Jetstream/AuthenticationCardLogo';
import JetButton from '@/Jetstream/Button';
import JetInput from '@/Jetstream/Input';
import JetLabel from '@/Jetstream/Label';
import JetValidationErrors from '@/Jetstream/ValidationErrors';
export default {
components: {
JetAuthenticationCard,
JetAuthenticationCardLogo,
JetButton,
JetInput,
JetLabel,
JetValidationErrors,
},
export default {
components: {
JetAuthenticationCard,
JetAuthenticationCardLogo,
JetButton,
JetInput,
JetLabel,
JetValidationErrors,
},
data() {
return {
recovery: false,
form: this.$inertia.form({
code: '',
recovery_code: '',
})
}
},
data() {
return {
recovery: false,
form: this.$inertia.form({
code: '',
recovery_code: '',
}),
};
},
methods: {
toggleRecovery() {
this.recovery ^= true
methods: {
toggleRecovery() {
this.recovery ^= true;
this.$nextTick(() => {
if (this.recovery) {
this.$refs.recovery_code.focus()
this.form.code = '';
} else {
this.$refs.code.focus()
this.form.recovery_code = ''
}
})
},
submit() {
this.form.post(this.route('two-factor.login'))
}
this.$nextTick(() => {
if (this.recovery) {
this.$refs.recovery_code.focus();
this.form.code = '';
} else {
this.$refs.code.focus();
this.form.recovery_code = '';
}
}
});
},
submit() {
this.form.post(this.route('two-factor.login'));
},
},
};
</script>

View File

@ -25,37 +25,37 @@
</template>
<script>
import JetAuthenticationCard from '@/Jetstream/AuthenticationCard'
import JetAuthenticationCardLogo from '@/Jetstream/AuthenticationCardLogo'
import JetButton from '@/Jetstream/Button'
import JetAuthenticationCard from '@/Jetstream/AuthenticationCard';
import JetAuthenticationCardLogo from '@/Jetstream/AuthenticationCardLogo';
import JetButton from '@/Jetstream/Button';
export default {
components: {
JetAuthenticationCard,
JetAuthenticationCardLogo,
JetButton,
},
export default {
components: {
JetAuthenticationCard,
JetAuthenticationCardLogo,
JetButton,
},
props: {
status: String
},
props: {
status: String,
},
data() {
return {
form: this.$inertia.form()
}
},
data() {
return {
form: this.$inertia.form(),
};
},
methods: {
submit() {
this.form.post(this.route('verification.send'))
},
},
methods: {
submit() {
this.form.post(this.route('verification.send'));
},
},
computed: {
verificationLinkSent() {
return this.status === 'verification-link-sent';
}
}
}
computed: {
verificationLinkSent() {
return this.status === 'verification-link-sent';
},
},
};
</script>

View File

@ -27,35 +27,35 @@
</template>
<script>
import JetButton from '@/Jetstream/Button'
import JetActionMessage from '@/Jetstream/ActionMessage'
import JetFormSection from '@/Jetstream/FormSection'
import CarFormFields from '@/Pages/Cars/Components/CarFormFields.vue'
import { useForm } from '@inertiajs/inertia-vue3'
import JetButton from '@/Jetstream/Button';
import JetActionMessage from '@/Jetstream/ActionMessage';
import JetFormSection from '@/Jetstream/FormSection';
import CarFormFields from '@/Pages/Cars/Components/CarFormFields.vue';
import { useForm } from '@inertiajs/inertia-vue3';
export default {
components: {
JetButton,
JetFormSection,
JetActionMessage,
CarFormFields,
components: {
JetButton,
JetFormSection,
JetActionMessage,
CarFormFields,
},
props: {
data: Object,
brands: Array,
meta: Object,
brand: Object,
car_model: Object,
},
data() {
return {
form: useForm(this.meta.form_name, this.data),
};
},
methods: {
submitForm() {
this.form.submit(this.meta.method, this.meta.route);
},
props: {
data: Object,
brands: Array,
meta: Object,
brand: Object,
car_model: Object,
},
data() {
return {
form: useForm(this.meta.form_name, this.data),
}
},
methods: {
submitForm() {
this.form.submit(this.meta.method, this.meta.route);
},
}
}
},
};
</script>

View File

@ -81,110 +81,110 @@
</template>
<script>
import JetLabel from '@/Jetstream/Label.vue'
import JetInput from '@/Jetstream/Input.vue'
import JetActionMessage from '@/Jetstream/ActionMessage'
import JetInputError from '@/Jetstream/InputError'
import Multiselect from 'vue-multiselect'
import Datepicker from 'vue3-datepicker'
import CurrencyInput from '@/Components/CurrencyInput'
import JetLabel from '@/Jetstream/Label.vue';
import JetInput from '@/Jetstream/Input.vue';
import JetActionMessage from '@/Jetstream/ActionMessage';
import JetInputError from '@/Jetstream/InputError';
import Multiselect from 'vue-multiselect';
import Datepicker from 'vue3-datepicker';
import CurrencyInput from '@/Components/CurrencyInput';
export default {
components: {
JetLabel,
JetInput,
JetInputError,
JetActionMessage,
Multiselect,
Datepicker,
CurrencyInput,
components: {
JetLabel,
JetInput,
JetInputError,
JetActionMessage,
Multiselect,
Datepicker,
CurrencyInput,
},
props: {
form: Object,
brands: Array,
brand: Object,
car_model: Object,
},
data() {
return {
brandSearch: null,
modelSearch: null,
carModels: [],
brandSelection: this.brand,
car_modelSelection: this.car_model,
currencyOptions: {
currency: 'CHF',
locale: 'de-CH',
exportValueAsInteger: true,
hideGroupingSeparatorOnFocus: false,
precision: 0,
currencyDisplay: 'hidden',
},
};
},
methods: {
updateBrand(brand) {
if (brand) {
this.brand.id = brand.id;
this.brand.name = brand.name;
this.brand.models = brand.models;
} else {
this.brand.id = null;
this.brand.name = null;
this.brand.models = [];
}
this.updateCarModelsList(brand);
},
props: {
form: Object,
brands: Array,
brand: Object,
car_model: Object,
updateCarModel(car_model) {
if (car_model) {
this.car_model.id = car_model.id;
this.car_model.name = car_model.name;
this.form.car_model_id = car_model.id;
} else {
this.car_model.id = null;
this.car_model.name = null;
this.form.car_model_id = null;
}
},
data() {
return {
brandSearch: null,
modelSearch: null,
carModels: [],
brandSelection: this.brand,
car_modelSelection: this.car_model,
currencyOptions: {
currency: 'CHF',
locale: 'de-CH',
exportValueAsInteger: true,
hideGroupingSeparatorOnFocus: false,
precision: 0,
currencyDisplay: 'hidden',
},
}
updateCarModelsList(brand) {
this.carModels = brand.models ?? [];
this.car_modelSelection = null;
this.updateCarModel(null);
},
methods: {
updateBrand(brand) {
if (brand) {
this.brand.id = brand.id;
this.brand.name = brand.name;
this.brand.models = brand.models;
} else {
this.brand.id = null;
this.brand.name = null;
this.brand.models = [];
}
this.updateCarModelsList(brand);
},
updateCarModel(car_model) {
if (car_model) {
this.car_model.id = car_model.id;
this.car_model.name = car_model.name;
this.form.car_model_id = car_model.id;
} else {
this.car_model.id = null;
this.car_model.name = null;
this.form.car_model_id = null;
}
},
updateCarModelsList(brand) {
this.carModels = brand.models ?? [];
this.car_modelSelection = null;
this.updateCarModel(null);
},
updateBrandSearch(searchQuery, id) {
this.brandSearch = searchQuery
},
addBrand() {
axios.post(this.route('brands.store'), {
name: this.brandSearch,
}).then((response) => {
this.brandSelection = response.data;
this.brands.push(this.brandSelection);
this.updateBrand(this.brandSelection);
});
},
updateCarModelSearch(searchQuery, id) {
this.modelSearch = searchQuery
},
addCarModel() {
axios.post(this.route('models.store'), {
name: this.modelSearch,
brand_id: this.brand.id,
}).then((response) => {
this.car_modelSelection = response.data;
this.carModels.push(this.car_modelSelection);
this.updateCarModel(this.car_modelSelection);
});
},
updateBrandSearch(searchQuery, id) {
this.brandSearch = searchQuery;
},
mounted: function () {
this.$nextTick(function () {
this.brandSelection = this.brands.find(x => x.id === this.brand.id);
if (this.brandSelection) {
this.carModels = this.brandSelection.models ?? [];
}
})
addBrand() {
axios.post(this.route('brands.store'), {
name: this.brandSearch,
}).then((response) => {
this.brandSelection = response.data;
this.brands.push(this.brandSelection);
this.updateBrand(this.brandSelection);
});
},
}
updateCarModelSearch(searchQuery, id) {
this.modelSearch = searchQuery;
},
addCarModel() {
axios.post(this.route('models.store'), {
name: this.modelSearch,
brand_id: this.brand.id,
}).then((response) => {
this.car_modelSelection = response.data;
this.carModels.push(this.car_modelSelection);
this.updateCarModel(this.car_modelSelection);
});
},
},
mounted() {
this.$nextTick(function () {
this.brandSelection = this.brands.find((x) => x.id === this.brand.id);
if (this.brandSelection) {
this.carModels = this.brandSelection.models ?? [];
}
});
},
};
</script>
<style src="vue-multiselect/dist/vue-multiselect.css"></style>

View File

@ -17,44 +17,44 @@
</template>
<script>
import Layout from '@/Layouts/Layout'
import BreadCrumb from '@/Components/BreadCrumb.vue'
import CarForm from './Components/CarForm.vue'
import { ref } from 'vue'
import Layout from '@/Layouts/Layout';
import BreadCrumb from '@/Components/BreadCrumb.vue';
import { ref } from 'vue';
import CarForm from './Components/CarForm.vue';
export default {
components: {
Layout,
BreadCrumb,
CarForm,
},
props: {
brands: Array,
},
data() {
return {
meta: {
form_name: 'CreateCar',
route: this.route('cars.store'),
method: 'post',
button_text: 'Auto speichern',
on_success: 'Auto gespeichert',
},
data: {
id: null,
stammnummer: null,
vin: null,
colour: null,
car_model_id: null,
initial_date: ref(new Date()),
last_check_date: ref(new Date()),
kilometers: null,
known_damage: null,
notes: null,
},
brand: {id: null, name: null},
car_model: {id: null, name: null},
}
},
}
components: {
Layout,
BreadCrumb,
CarForm,
},
props: {
brands: Array,
},
data() {
return {
meta: {
form_name: 'CreateCar',
route: this.route('cars.store'),
method: 'post',
button_text: 'Auto speichern',
on_success: 'Auto gespeichert',
},
data: {
id: null,
stammnummer: null,
vin: null,
colour: null,
car_model_id: null,
initial_date: ref(new Date()),
last_check_date: ref(new Date()),
kilometers: null,
known_damage: null,
notes: null,
},
brand: { id: null, name: null },
car_model: { id: null, name: null },
};
},
};
</script>

View File

@ -19,59 +19,59 @@
</template>
<script>
import Layout from '@/Layouts/Layout'
import BreadCrumb from '@/Components/BreadCrumb.vue'
import CarForm from './Components/CarForm.vue'
import { ref } from 'vue'
import Layout from '@/Layouts/Layout';
import BreadCrumb from '@/Components/BreadCrumb.vue';
import { ref } from 'vue';
import CarForm from './Components/CarForm.vue';
export default {
components: {
BreadCrumb,
Layout,
CarForm,
},
props: {
car: Object,
brands: Array,
},
computed: {
name: function () {
let out = '';
if (this.brand.name) {
out += this.brand.name;
if (this.car_model.name) {
out += ' ' + this.car_model.name;
}
}
return out;
},
},
data() {
return {
currentRoute: 'cars.edit',
meta: {
form_name: 'EditCar' + this.car.id,
route: this.route('cars.update', this.car.id),
method: 'put',
button_text: 'Änderungen speichern',
on_success: 'Änderungen gespeichert',
},
brand: this.car.brand,
car_model: this.car.car_model,
data: {
id: this.car.id,
stammnummer: this.car.stammnummer,
vin: this.car.vin,
initial_date: ref(new Date(this.car.initial_date)),
colour: this.car.colour,
notes: this.car.notes,
car_model_id: this.car.car_model.id,
last_check_date: ref(new Date(this.car.last_check_date)),
kilometers: this.car.kilometers,
known_damage: this.car.known_damage,
notes: this.car.notes,
},
components: {
BreadCrumb,
Layout,
CarForm,
},
props: {
car: Object,
brands: Array,
},
computed: {
name() {
let out = '';
if (this.brand.name) {
out += this.brand.name;
if (this.car_model.name) {
out += ` ${this.car_model.name}`;
}
}
return out;
},
}
},
data() {
return {
currentRoute: 'cars.edit',
meta: {
form_name: `EditCar${this.car.id}`,
route: this.route('cars.update', this.car.id),
method: 'put',
button_text: 'Änderungen speichern',
on_success: 'Änderungen gespeichert',
},
brand: this.car.brand,
car_model: this.car.car_model,
data: {
id: this.car.id,
stammnummer: this.car.stammnummer,
vin: this.car.vin,
initial_date: ref(new Date(this.car.initial_date)),
colour: this.car.colour,
notes: this.car.notes,
car_model_id: this.car.car_model.id,
last_check_date: ref(new Date(this.car.last_check_date)),
kilometers: this.car.kilometers,
known_damage: this.car.known_damage,
notes: this.car.notes,
},
};
},
};
</script>

View File

@ -13,34 +13,34 @@
</template>
<script>
import Layout from '@/Layouts/Layout'
import BreadCrumb from '@/Components/BreadCrumb.vue'
import SimpleTable from '@/Components/SimpleTable.vue'
import Layout from '@/Layouts/Layout';
import BreadCrumb from '@/Components/BreadCrumb.vue';
import SimpleTable from '@/Components/SimpleTable.vue';
export default {
components: {
BreadCrumb,
Layout,
SimpleTable,
},
props: {
filters: Object,
sort: Object,
cars: Object,
},
data() {
return {
currentRoute: 'cars',
columns: [
{key: 'name', value: 'Name', sortable: true},
{key: 'stammnummer', value: 'Stammummer', sortable: true},
{key: 'buy_contract.date', value: 'Einkaufsdatum', sortable: true},
{key: 'buy_contract.price', value: 'Einkaufspreis', sortable: true},
{key: 'sell_contract.date', value: 'Verkaufssdatum', sortable: true},
{key: 'sell_contract.price', value: 'Verkaufspreis', sortable: true},
{key: 'profit', value: 'Profit', sortable: true},
],
}
},
}
components: {
BreadCrumb,
Layout,
SimpleTable,
},
props: {
filters: Object,
sort: Object,
cars: Object,
},
data() {
return {
currentRoute: 'cars',
columns: [
{ key: 'name', value: 'Name', sortable: true },
{ key: 'stammnummer', value: 'Stammummer', sortable: true },
{ key: 'buy_contract.date', value: 'Einkaufsdatum', sortable: true },
{ key: 'buy_contract.price', value: 'Einkaufspreis', sortable: true },
{ key: 'sell_contract.date', value: 'Verkaufssdatum', sortable: true },
{ key: 'sell_contract.price', value: 'Verkaufspreis', sortable: true },
{ key: 'profit', value: 'Profit', sortable: true },
],
};
},
};
</script>

View File

@ -51,33 +51,33 @@
</template>
<script>
import ShowPage from '@/Components/ShowPage.vue'
import BreadCrumb from '@/Components/BreadCrumb.vue'
import CarCard from '@/Components/CarCard.vue'
import BuyContractCard from '@/Components/BuyContractCard.vue'
import SellContractCard from '@/Components/SellContractCard.vue'
import EditButton from '@/Components/Buttons/EditButton.vue'
import DeleteButton from '@/Components/Buttons/DeleteButton.vue'
import RestoreButton from '@/Components/Buttons/RestoreButton.vue'
import ShowPage from '@/Components/ShowPage.vue';
import BreadCrumb from '@/Components/BreadCrumb.vue';
import CarCard from '@/Components/CarCard.vue';
import BuyContractCard from '@/Components/BuyContractCard.vue';
import SellContractCard from '@/Components/SellContractCard.vue';
import EditButton from '@/Components/Buttons/EditButton.vue';
import DeleteButton from '@/Components/Buttons/DeleteButton.vue';
import RestoreButton from '@/Components/Buttons/RestoreButton.vue';
export default {
components: {
ShowPage,
BreadCrumb,
CarCard,
BuyContractCard,
SellContractCard,
EditButton,
DeleteButton,
RestoreButton,
},
props: {
car: Object,
},
data() {
return {
currentRoute: 'cars.show',
}
},
}
components: {
ShowPage,
BreadCrumb,
CarCard,
BuyContractCard,
SellContractCard,
EditButton,
DeleteButton,
RestoreButton,
},
props: {
car: Object,
},
data() {
return {
currentRoute: 'cars.show',
};
},
};
</script>

View File

@ -13,34 +13,34 @@
</template>
<script>
import Layout from '@/Layouts/Layout'
import BreadCrumb from '@/Components/BreadCrumb.vue'
import SimpleTable from '@/Components/SimpleTable.vue'
import Layout from '@/Layouts/Layout';
import BreadCrumb from '@/Components/BreadCrumb.vue';
import SimpleTable from '@/Components/SimpleTable.vue';
export default {
components: {
BreadCrumb,
Layout,
SimpleTable,
},
props: {
filters: Object,
sort: Object,
cars: Object,
},
data() {
return {
currentRoute: 'cars.sold',
columns: [
{key: 'name', value: 'Name', sortable: true},
{key: 'stammnummer', value: 'Stammummer', sortable: true},
{key: 'buy_contract.date', value: 'Einkaufsdatum', sortable: true},
{key: 'buy_contract.price', value: 'Einkaufspreis', sortable: true},
{key: 'sell_contract.date', value: 'Verkaufssdatum', sortable: true},
{key: 'sell_contract.price', value: 'Verkaufspreis', sortable: true},
{key: 'profit', value: 'Profit', sortable: true},
],
}
},
}
components: {
BreadCrumb,
Layout,
SimpleTable,
},
props: {
filters: Object,
sort: Object,
cars: Object,
},
data() {
return {
currentRoute: 'cars.sold',
columns: [
{ key: 'name', value: 'Name', sortable: true },
{ key: 'stammnummer', value: 'Stammummer', sortable: true },
{ key: 'buy_contract.date', value: 'Einkaufsdatum', sortable: true },
{ key: 'buy_contract.price', value: 'Einkaufspreis', sortable: true },
{ key: 'sell_contract.date', value: 'Verkaufssdatum', sortable: true },
{ key: 'sell_contract.price', value: 'Verkaufspreis', sortable: true },
{ key: 'profit', value: 'Profit', sortable: true },
],
};
},
};
</script>

View File

@ -13,32 +13,32 @@
</template>
<script>
import Layout from '@/Layouts/Layout'
import BreadCrumb from '@/Components/BreadCrumb.vue'
import SimpleTable from '@/Components/SimpleTable.vue'
import Layout from '@/Layouts/Layout';
import BreadCrumb from '@/Components/BreadCrumb.vue';
import SimpleTable from '@/Components/SimpleTable.vue';
export default {
components: {
BreadCrumb,
Layout,
SimpleTable,
},
props: {
filters: Object,
sort: Object,
cars: Object,
},
data() {
return {
currentRoute: 'cars.unsold',
columns: [
{key: 'name', value: 'Name', sortable: true},
{key: 'stammnummer', value: 'Stammummer', sortable: true},
{key: 'initial_date', value: 'Inverkehrssetzung', sortable: true},
{key: 'buy_contract.date', value: 'Einkaufsdatum', sortable: true},
{key: 'buy_contract.price', value: 'Einkaufspreis', sortable: true},
],
}
},
}
components: {
BreadCrumb,
Layout,
SimpleTable,
},
props: {
filters: Object,
sort: Object,
cars: Object,
},
data() {
return {
currentRoute: 'cars.unsold',
columns: [
{ key: 'name', value: 'Name', sortable: true },
{ key: 'stammnummer', value: 'Stammummer', sortable: true },
{ key: 'initial_date', value: 'Inverkehrssetzung', sortable: true },
{ key: 'buy_contract.date', value: 'Einkaufsdatum', sortable: true },
{ key: 'buy_contract.price', value: 'Einkaufspreis', sortable: true },
],
};
},
};
</script>

View File

@ -13,9 +13,9 @@
</template>
<script>
import Layout from '@/Layouts/Layout'
import BreadCrumb from '@/Components/BreadCrumb.vue'
import SimpleTable from '@/Components/SimpleTable.vue'
import Layout from '@/Layouts/Layout';
import BreadCrumb from '@/Components/BreadCrumb.vue';
import SimpleTable from '@/Components/SimpleTable.vue';
export default {
components: {
@ -32,13 +32,13 @@ export default {
return {
currentRoute: 'contacts.buyers',
columns: [
{key: 'name', value: 'Name', sortable: true},
{key: 'company', value: 'Firma', sortable: true},
{key: 'address', value: 'Adresse', sortable: true},
{key: 'fullCity', value: 'Ort', sortable: true},
{key: 'phone', value: 'Telefon'},
{ key: 'name', value: 'Name', sortable: true },
{ key: 'company', value: 'Firma', sortable: true },
{ key: 'address', value: 'Adresse', sortable: true },
{ key: 'fullCity', value: 'Ort', sortable: true },
{ key: 'phone', value: 'Telefon' },
],
}
};
},
}
};
</script>

View File

@ -27,32 +27,32 @@
</template>
<script>
import JetButton from '@/Jetstream/Button'
import JetActionMessage from '@/Jetstream/ActionMessage'
import JetFormSection from '@/Jetstream/FormSection'
import ContactFormFields from './ContactFormFields'
import { useForm } from '@inertiajs/inertia-vue3'
import JetButton from '@/Jetstream/Button';
import JetActionMessage from '@/Jetstream/ActionMessage';
import JetFormSection from '@/Jetstream/FormSection';
import { useForm } from '@inertiajs/inertia-vue3';
import ContactFormFields from './ContactFormFields';
export default {
components: {
JetButton,
JetFormSection,
JetActionMessage,
ContactFormFields,
components: {
JetButton,
JetFormSection,
JetActionMessage,
ContactFormFields,
},
props: {
data: Object,
meta: Object,
},
data() {
return {
form: useForm(this.meta.form_name, this.data),
};
},
methods: {
submitForm() {
this.form.submit(this.meta.method, this.meta.route);
},
props: {
data: Object,
meta: Object,
},
data() {
return {
form: useForm(this.meta.form_name, this.data),
}
},
methods: {
submitForm() {
this.form.submit(this.meta.method, this.meta.route);
},
},
}
},
};
</script>

View File

@ -70,18 +70,18 @@
</template>
<script>
import JetLabel from '@/Jetstream/Label.vue'
import JetInput from '@/Jetstream/Input.vue'
import JetInputError from '@/Jetstream/InputError'
import JetLabel from '@/Jetstream/Label.vue';
import JetInput from '@/Jetstream/Input.vue';
import JetInputError from '@/Jetstream/InputError';
export default {
components: {
JetLabel,
JetInput,
JetInputError,
},
props: {
form: Object,
},
}
components: {
JetLabel,
JetInput,
JetInputError,
},
props: {
form: Object,
},
};
</script>

View File

@ -17,39 +17,39 @@
</template>
<script>
import Layout from '@/Layouts/Layout'
import BreadCrumb from '@/Components/BreadCrumb.vue'
import ContactForm from './Components/ContactForm.vue'
import Layout from '@/Layouts/Layout';
import BreadCrumb from '@/Components/BreadCrumb.vue';
import ContactForm from './Components/ContactForm.vue';
export default {
components: {
Layout,
BreadCrumb,
ContactForm,
},
data() {
return {
meta: {
form_name: 'CreateContact',
route: this.route('contacts.store'),
method: 'post',
button_text: 'Kontakt speichern',
on_success: 'Kontakt gespeichert',
},
data: {
id: null,
firstname: null,
lastname: null,
company: null,
email: null,
phone: null,
address: null,
zip: null,
city: null,
country: 'CH',
notes: null,
},
}
},
}
components: {
Layout,
BreadCrumb,
ContactForm,
},
data() {
return {
meta: {
form_name: 'CreateContact',
route: this.route('contacts.store'),
method: 'post',
button_text: 'Kontakt speichern',
on_success: 'Kontakt gespeichert',
},
data: {
id: null,
firstname: null,
lastname: null,
company: null,
email: null,
phone: null,
address: null,
zip: null,
city: null,
country: 'CH',
notes: null,
},
};
},
};
</script>

View File

@ -20,43 +20,43 @@
</template>
<script>
import Layout from '@/Layouts/Layout'
import BreadCrumb from '@/Components/BreadCrumb.vue'
import ContactForm from './Components/ContactForm.vue'
import Layout from '@/Layouts/Layout';
import BreadCrumb from '@/Components/BreadCrumb.vue';
import ContactForm from './Components/ContactForm.vue';
export default {
components: {
Layout,
BreadCrumb,
ContactForm,
},
components: {
Layout,
BreadCrumb,
ContactForm,
},
props: {
contact: Object,
},
data() {
return {
meta: {
form_name: 'EditContact' + this.contact.id,
route: this.route('contacts.update', this.contact.id),
method: 'put',
button_text: 'Änderungen speichern',
on_success: 'Änderungen gespeichert',
},
data: {
id: this.contact.id,
firstname: this.contact.firstname,
lastname: this.contact.lastname,
company: this.contact.company,
email: this.contact.email,
phone: this.contact.phone,
address: this.contact.address,
zip: this.contact.zip,
city: this.contact.city,
country: this.contact.country,
notes: this.contact.notes,
},
}
},
}
props: {
contact: Object,
},
data() {
return {
meta: {
form_name: `EditContact${this.contact.id}`,
route: this.route('contacts.update', this.contact.id),
method: 'put',
button_text: 'Änderungen speichern',
on_success: 'Änderungen gespeichert',
},
data: {
id: this.contact.id,
firstname: this.contact.firstname,
lastname: this.contact.lastname,
company: this.contact.company,
email: this.contact.email,
phone: this.contact.phone,
address: this.contact.address,
zip: this.contact.zip,
city: this.contact.city,
country: this.contact.country,
notes: this.contact.notes,
},
};
},
};
</script>

View File

@ -13,9 +13,9 @@
</template>
<script>
import Layout from '@/Layouts/Layout'
import BreadCrumb from '@/Components/BreadCrumb.vue'
import SimpleTable from '@/Components/SimpleTable.vue'
import Layout from '@/Layouts/Layout';
import BreadCrumb from '@/Components/BreadCrumb.vue';
import SimpleTable from '@/Components/SimpleTable.vue';
export default {
components: {
@ -32,13 +32,13 @@ export default {
return {
currentRoute: 'contacts',
columns: [
{key: 'name', value: 'Name', sortable: true},
{key: 'company', value: 'Firma', sortable: true},
{key: 'address', value: 'Adresse', sortable: true},
{key: 'fullCity', value: 'Ort', sortable: true},
{key: 'phone', value: 'Telefon'},
{ key: 'name', value: 'Name', sortable: true },
{ key: 'company', value: 'Firma', sortable: true },
{ key: 'address', value: 'Adresse', sortable: true },
{ key: 'fullCity', value: 'Ort', sortable: true },
{ key: 'phone', value: 'Telefon' },
],
}
};
},
}
};
</script>

View File

@ -13,9 +13,9 @@
</template>
<script>
import Layout from '@/Layouts/Layout'
import BreadCrumb from '@/Components/BreadCrumb.vue'
import SimpleTable from '@/Components/SimpleTable.vue'
import Layout from '@/Layouts/Layout';
import BreadCrumb from '@/Components/BreadCrumb.vue';
import SimpleTable from '@/Components/SimpleTable.vue';
export default {
components: {
@ -32,13 +32,13 @@ export default {
return {
currentRoute: 'contacts.sellers',
columns: [
{key: 'name', value: 'Name', sortable: true},
{key: 'company', value: 'Firma', sortable: true},
{key: 'address', value: 'Adresse', sortable: true},
{key: 'fullCity', value: 'Ort', sortable: true},
{key: 'phone', value: 'Telefon'},
{ key: 'name', value: 'Name', sortable: true },
{ key: 'company', value: 'Firma', sortable: true },
{ key: 'address', value: 'Adresse', sortable: true },
{ key: 'fullCity', value: 'Ort', sortable: true },
{ key: 'phone', value: 'Telefon' },
],
}
};
},
}
};
</script>

View File

@ -54,34 +54,34 @@
</template>
<script>
import ShowPage from '@/Components/ShowPage.vue'
import BreadCrumb from '@/Components/BreadCrumb.vue'
import ContactCard from '@/Components/ContactCard.vue'
import BuyContractCard from '@/Components/BuyContractCard.vue'
import SellContractCard from '@/Components/SellContractCard.vue'
import EditButton from '@/Components/Buttons/EditButton.vue'
import DeleteButton from '@/Components/Buttons/DeleteButton.vue'
import RestoreButton from '@/Components/Buttons/RestoreButton.vue'
import ShowPage from '@/Components/ShowPage.vue';
import BreadCrumb from '@/Components/BreadCrumb.vue';
import ContactCard from '@/Components/ContactCard.vue';
import BuyContractCard from '@/Components/BuyContractCard.vue';
import SellContractCard from '@/Components/SellContractCard.vue';
import EditButton from '@/Components/Buttons/EditButton.vue';
import DeleteButton from '@/Components/Buttons/DeleteButton.vue';
import RestoreButton from '@/Components/Buttons/RestoreButton.vue';
export default {
components: {
ShowPage,
BreadCrumb,
ContactCard,
BuyContractCard,
SellContractCard,
EditButton,
DeleteButton,
RestoreButton,
},
components: {
ShowPage,
BreadCrumb,
ContactCard,
BuyContractCard,
SellContractCard,
EditButton,
DeleteButton,
RestoreButton,
},
props: {
contact: Object,
},
data() {
return {
currentRoute: 'contacts.show',
}
},
}
props: {
contact: Object,
},
data() {
return {
currentRoute: 'contacts.show',
};
},
};
</script>

View File

@ -47,47 +47,47 @@
</template>
<script>
import JetButton from '@/Jetstream/Button'
import JetLabel from '@/Jetstream/Label.vue'
import JetInput from '@/Jetstream/Input.vue'
import JetActionMessage from '@/Jetstream/ActionMessage'
import JetInputError from '@/Jetstream/InputError'
import JetFormSection from '@/Jetstream/FormSection'
import Datepicker from 'vue3-datepicker'
import { useForm } from '@inertiajs/inertia-vue3'
import CurrencyInput from '@/Components/CurrencyInput'
import JetButton from '@/Jetstream/Button';
import JetLabel from '@/Jetstream/Label.vue';
import JetInput from '@/Jetstream/Input.vue';
import JetActionMessage from '@/Jetstream/ActionMessage';
import JetInputError from '@/Jetstream/InputError';
import JetFormSection from '@/Jetstream/FormSection';
import Datepicker from 'vue3-datepicker';
import { useForm } from '@inertiajs/inertia-vue3';
import CurrencyInput from '@/Components/CurrencyInput';
export default {
components: {
JetButton,
JetFormSection,
JetLabel,
JetInput,
JetInputError,
JetActionMessage,
Datepicker,
CurrencyInput,
components: {
JetButton,
JetFormSection,
JetLabel,
JetInput,
JetInputError,
JetActionMessage,
Datepicker,
CurrencyInput,
},
props: {
data: Object,
meta: Object,
insurance_types: Array,
},
data() {
return {
form: useForm(this.meta.form_name, this.data),
currencyOptions: {
currency: 'CHF',
locale: 'de-CH',
exportValueAsInteger: true,
hideGroupingSeparatorOnFocus: false,
},
};
},
methods: {
submitForm() {
this.form.submit(this.meta.method, this.meta.route);
},
props: {
data: Object,
meta: Object,
insurance_types: Array,
},
data() {
return {
form: useForm(this.meta.form_name, this.data),
currencyOptions: {
currency: 'CHF',
locale: 'de-CH',
exportValueAsInteger: true,
hideGroupingSeparatorOnFocus: false,
},
}
},
methods: {
submitForm() {
this.form.submit(this.meta.method, this.meta.route);
},
},
}
},
};
</script>

View File

@ -54,61 +54,61 @@
</template>
<script>
import Layout from '@/Layouts/Layout'
import BreadCrumb from '@/Components/BreadCrumb.vue'
import ContractForm from './Components/ContractForm.vue'
import CarCard from '@/Components/CarCard.vue'
import ContactCard from '@/Components/ContactCard.vue'
import JetFormSection from '@/Jetstream/FormSection'
import { ref } from 'vue'
import Layout from '@/Layouts/Layout';
import BreadCrumb from '@/Components/BreadCrumb.vue';
import CarCard from '@/Components/CarCard.vue';
import ContactCard from '@/Components/ContactCard.vue';
import JetFormSection from '@/Jetstream/FormSection';
import { ref } from 'vue';
import ContractForm from './Components/ContractForm.vue';
export default {
components: {
Layout,
BreadCrumb,
ContractForm,
CarCard,
ContactCard,
JetFormSection,
components: {
Layout,
BreadCrumb,
ContractForm,
CarCard,
ContactCard,
JetFormSection,
},
props: {
car: Object,
contact: Object,
type: String,
car_first: Boolean,
insurance_types: Array,
},
data() {
return {
meta: {
form_name: 'CreateContract',
route: this.route('contracts.store'),
method: 'post',
button_text: 'Vertrag speichern',
on_success: 'Vertrag gespeichert',
},
data: {
id: null,
date: ref(new Date()),
price: null,
type: this.type,
insurance_type: '0',
car_id: this.car.id,
contact_id: this.contact.id,
is_sell_contract: this.type == 'SellContract',
},
};
},
computed: {
contractType() {
return this.isSellContract ? 'Verkaufsvertrag' : 'Ankaufsvertrag';
},
props: {
car: Object,
contact: Object,
type: String,
car_first: Boolean,
insurance_types: Array,
contactType() {
return this.isSellContract ? 'Käufer' : 'Verkäufer';
},
data() {
return {
meta: {
form_name: 'CreateContract',
route: this.route('contracts.store'),
method: 'post',
button_text: 'Vertrag speichern',
on_success: 'Vertrag gespeichert',
},
data: {
id: null,
date: ref(new Date()),
price: null,
type: this.type,
insurance_type: '0',
car_id: this.car.id,
contact_id: this.contact.id,
is_sell_contract: this.type == "SellContract",
},
}
isSellContract() {
return this.type == 'SellContract';
},
computed: {
contractType: function () {
return this.isSellContract ? "Verkaufsvertrag" : "Ankaufsvertrag";
},
contactType: function () {
return this.isSellContract ? "Käufer" : "Verkäufer";
},
isSellContract: function () {
return this.type == "SellContract";
},
}
}
},
};
</script>

View File

@ -67,114 +67,113 @@
</template>
<script>
import Layout from '@/Layouts/Layout'
import BreadCrumb from '@/Components/BreadCrumb.vue'
import ContactFormFields from '@/Pages/Contacts/Components/ContactFormFields.vue'
import CarCard from '@/Components/CarCard.vue'
import ContactCard from '@/Components/ContactCard.vue'
import JetFormSection from '@/Jetstream/FormSection'
import Multiselect from 'vue-multiselect'
import JetLabel from '@/Jetstream/Label.vue'
import JetButton from '@/Jetstream/Button'
import JetActionMessage from '@/Jetstream/ActionMessage'
import Layout from '@/Layouts/Layout';
import BreadCrumb from '@/Components/BreadCrumb.vue';
import ContactFormFields from '@/Pages/Contacts/Components/ContactFormFields.vue';
import CarCard from '@/Components/CarCard.vue';
import ContactCard from '@/Components/ContactCard.vue';
import JetFormSection from '@/Jetstream/FormSection';
import Multiselect from 'vue-multiselect';
import JetLabel from '@/Jetstream/Label.vue';
import JetButton from '@/Jetstream/Button';
import JetActionMessage from '@/Jetstream/ActionMessage';
export default {
components: {
Layout,
BreadCrumb,
CarCard,
ContactCard,
JetFormSection,
ContactFormFields,
Multiselect,
JetLabel,
JetButton,
JetActionMessage,
components: {
Layout,
BreadCrumb,
CarCard,
ContactCard,
JetFormSection,
ContactFormFields,
Multiselect,
JetLabel,
JetButton,
JetActionMessage,
},
props: {
car: Object,
contacts: Object,
type: String,
},
data() {
return {
contactsChoice: this.contacts,
contact: {
id: null,
firstname: null,
lastname: null,
company: null,
email: null,
phone: null,
address: null,
zip: null,
city: null,
country: null,
notes: null,
errors: {},
},
createContact: false,
};
},
computed: {
contractType() {
return this.isSellContract ? 'Verkaufsvertrag' : 'Ankaufsvertrag';
},
props: {
car: Object,
contacts: Object,
type: String,
contactType() {
return this.isSellContract ? 'Käufer' : 'Verkäufer';
},
data() {
return {
contactsChoice: this.contacts,
contact: {
id: null,
firstname: null,
lastname: null,
company: null,
email: null,
phone: null,
address: null,
zip: null,
city: null,
country: null,
notes: null,
errors: {},
},
createContact: false,
}
isSellContract() {
return this.type == 'SellContract';
},
computed: {
contractType: function () {
return this.isSellContract ? "Verkaufsvertrag" : "Ankaufsvertrag";
},
contactType: function () {
return this.isSellContract ? "Käufer" : "Verkäufer";
},
isSellContract: function () {
return this.type == "SellContract";
},
emptyContact: function() {
return {
id: null,
firstname: null,
lastname: null,
company: null,
email: null,
phone: null,
address: null,
zip: null,
city: null,
country: null,
notes: null,
errors: {},
};
},
emptyContact() {
return {
id: null,
firstname: null,
lastname: null,
company: null,
email: null,
phone: null,
address: null,
zip: null,
city: null,
country: null,
notes: null,
errors: {},
};
},
methods: {
nextPage() {
this.$inertia.get(route('contracts.create', {
type: this.isSellContract ? 1 : 0,
car: this.car.id,
contact: this.contact.id,
}), { preserveScroll: true, carFirst: true, });
},
openContactForm() {
this.createContact = true;
this.contact = this.emptyContact;
},
submitCreateContactForm(e) {
e.preventDefault();
axios.post(this.route('contacts.store_for_contract'), this.contact)
.then(res => {
this.contactsChoice.push(res.data);
this.contact = res.data;
this.createContact = false;
}).catch(err => {
if (err.response) {
let errors = err.response.data.errors;
},
methods: {
nextPage() {
this.$inertia.get(route('contracts.create', {
type: this.isSellContract ? 1 : 0,
car: this.car.id,
contact: this.contact.id,
}), { preserveScroll: true, carFirst: true });
},
openContactForm() {
this.createContact = true;
this.contact = this.emptyContact;
},
submitCreateContactForm(e) {
e.preventDefault();
axios.post(this.route('contacts.store_for_contract'), this.contact)
.then((res) => {
this.contactsChoice.push(res.data);
this.contact = res.data;
this.createContact = false;
}).catch((err) => {
if (err.response) {
const { errors } = err.response.data;
Object.keys(errors).map(function(key, index) {
errors[key] = errors[key].join(' ');
});
this.contact.errors = errors;
}
});
},
Object.keys(errors).map((key, index) => {
errors[key] = errors[key].join(' ');
});
this.contact.errors = errors;
}
});
},
}
},
};
</script>
<style src="vue-multiselect/dist/vue-multiselect.css"></style>

View File

@ -67,115 +67,114 @@
</template>
<script>
import Layout from '@/Layouts/Layout'
import BreadCrumb from '@/Components/BreadCrumb.vue'
import CarFormFields from '@/Pages/Cars/Components/CarFormFields.vue'
import CarCard from '@/Components/CarCard.vue'
import ContactCard from '@/Components/ContactCard.vue'
import JetFormSection from '@/Jetstream/FormSection'
import Multiselect from 'vue-multiselect'
import JetLabel from '@/Jetstream/Label.vue'
import JetButton from '@/Jetstream/Button'
import JetActionMessage from '@/Jetstream/ActionMessage'
import Layout from '@/Layouts/Layout';
import BreadCrumb from '@/Components/BreadCrumb.vue';
import CarFormFields from '@/Pages/Cars/Components/CarFormFields.vue';
import CarCard from '@/Components/CarCard.vue';
import ContactCard from '@/Components/ContactCard.vue';
import JetFormSection from '@/Jetstream/FormSection';
import Multiselect from 'vue-multiselect';
import JetLabel from '@/Jetstream/Label.vue';
import JetButton from '@/Jetstream/Button';
import JetActionMessage from '@/Jetstream/ActionMessage';
export default {
components: {
Layout,
BreadCrumb,
CarCard,
ContactCard,
CarFormFields,
JetFormSection,
Multiselect,
JetLabel,
JetButton,
JetActionMessage,
components: {
Layout,
BreadCrumb,
CarCard,
ContactCard,
CarFormFields,
JetFormSection,
Multiselect,
JetLabel,
JetButton,
JetActionMessage,
},
props: {
contact: Object,
cars: Object,
brands: Object,
type: String,
},
data() {
return {
carsChoice: this.cars,
car: {
id: null,
stammnummer: null,
vin: null,
colour: null,
car_model_id: null,
initial_date: null,
last_check_date: null,
kilometers: null,
known_damage: null,
notes: null,
errors: {},
},
brand: { id: null, name: null },
car_model: { id: null, name: null },
createCar: false,
};
},
computed: {
contractType() {
return this.isSellContract ? 'Verkaufsvertrag' : 'Ankaufsvertrag';
},
props: {
contact: Object,
cars: Object,
brands: Object,
type: String,
contactType() {
return this.isSellContract ? 'Käufer' : 'Verkäufer';
},
data() {
return {
carsChoice: this.cars,
car: {
id: null,
stammnummer: null,
vin: null,
colour: null,
car_model_id: null,
initial_date: null,
last_check_date: null,
kilometers: null,
known_damage: null,
notes: null,
errors: {},
},
brand: {id: null, name: null},
car_model: {id: null, name: null},
createCar: false,
}
isSellContract() {
return this.type == 'SellContract';
},
computed: {
contractType: function () {
return this.isSellContract ? "Verkaufsvertrag" : "Ankaufsvertrag";
},
contactType: function () {
return this.isSellContract ? "Käufer" : "Verkäufer";
},
isSellContract: function () {
return this.type == "SellContract";
},
emptyCar: function() {
return {
id: null,
stammnummer: null,
vin: null,
colour: null,
car_model_id: null,
initial_date: null,
last_check_date: null,
kilometers: null,
known_damage: null,
notes: null,
errors: {},
};
},
emptyCar() {
return {
id: null,
stammnummer: null,
vin: null,
colour: null,
car_model_id: null,
initial_date: null,
last_check_date: null,
kilometers: null,
known_damage: null,
notes: null,
errors: {},
};
},
methods: {
nextPage() {
this.$inertia.get(route('contracts.create', {
type: this.isSellContract ? 1 : 0,
car: this.car.id,
contact: this.contact.id,
}), { preserveScroll: true });
},
openCarForm() {
this.createCar = true;
this.car = this.emptyCar;
},
submitCreateCarForm(e) {
e.preventDefault();
axios.post(this.route('cars.store_for_contract'), this.car)
.then(res => {
this.carsChoice.push(res.data);
this.car = res.data;
this.createCar = false;
}).catch(err => {
if (err.response) {
let errors = err.response.data.errors;
},
methods: {
nextPage() {
this.$inertia.get(route('contracts.create', {
type: this.isSellContract ? 1 : 0,
car: this.car.id,
contact: this.contact.id,
}), { preserveScroll: true });
},
openCarForm() {
this.createCar = true;
this.car = this.emptyCar;
},
submitCreateCarForm(e) {
e.preventDefault();
axios.post(this.route('cars.store_for_contract'), this.car)
.then((res) => {
this.carsChoice.push(res.data);
this.car = res.data;
this.createCar = false;
}).catch((err) => {
if (err.response) {
const { errors } = err.response.data;
Object.keys(errors).map(function(key, index) {
errors[key] = errors[key].join(' ');
});
this.car.errors = errors;
}
});
},
Object.keys(errors).map((key, index) => {
errors[key] = errors[key].join(' ');
});
this.car.errors = errors;
}
});
},
}
},
};
</script>
<style src="vue-multiselect/dist/vue-multiselect.css"></style>

View File

@ -20,38 +20,38 @@
</template>
<script>
import Layout from '@/Layouts/Layout'
import BreadCrumb from '@/Components/BreadCrumb.vue'
import ContractForm from './Components/ContractForm.vue'
import { ref } from 'vue'
import Layout from '@/Layouts/Layout';
import BreadCrumb from '@/Components/BreadCrumb.vue';
import { ref } from 'vue';
import ContractForm from './Components/ContractForm.vue';
export default {
components: {
BreadCrumb,
Layout,
ContractForm,
},
props: {
contract: Object,
insurance_types: Array,
},
data() {
return {
currentRoute: 'contracts.edit',
meta: {
form_name: 'EditContract' + this.contract.id,
route: this.route('contracts.update', this.contract.id),
method: 'put',
button_text: 'Änderungen speichern',
on_success: 'Änderungen gespeichert',
},
data: {
date: ref(new Date(this.contract.date)),
price: this.contract.price,
insurance_type: this.contract.insurance_type,
is_sell_contract: this.contract.is_sell_contract,
}
}
},
}
components: {
BreadCrumb,
Layout,
ContractForm,
},
props: {
contract: Object,
insurance_types: Array,
},
data() {
return {
currentRoute: 'contracts.edit',
meta: {
form_name: `EditContract${this.contract.id}`,
route: this.route('contracts.update', this.contract.id),
method: 'put',
button_text: 'Änderungen speichern',
on_success: 'Änderungen gespeichert',
},
data: {
date: ref(new Date(this.contract.date)),
price: this.contract.price,
insurance_type: this.contract.insurance_type,
is_sell_contract: this.contract.is_sell_contract,
},
};
},
};
</script>

View File

@ -73,57 +73,56 @@
</template>
<script>
import ShowPage from '@/Components/ShowPage.vue'
import BreadCrumb from '@/Components/BreadCrumb.vue'
import SimpleTable from '@/Components/SimpleTable.vue'
import DeleteButton from '@/Components/Buttons/DeleteButton.vue'
import RestoreButton from '@/Components/Buttons/RestoreButton.vue'
import CarCard from '@/Components/CarCard.vue'
import PrintButton from '@/Components/Buttons/PrintButton.vue'
import ContactCard from '@/Components/ContactCard.vue'
import EditButton from '@/Components/Buttons/EditButton.vue'
import DocumentsView from '@/Components/Documents/View.vue'
import PaymentsView from '@/Components/Payments/View.vue'
import ShowPage from '@/Components/ShowPage.vue';
import BreadCrumb from '@/Components/BreadCrumb.vue';
import SimpleTable from '@/Components/SimpleTable.vue';
import DeleteButton from '@/Components/Buttons/DeleteButton.vue';
import RestoreButton from '@/Components/Buttons/RestoreButton.vue';
import CarCard from '@/Components/CarCard.vue';
import PrintButton from '@/Components/Buttons/PrintButton.vue';
import ContactCard from '@/Components/ContactCard.vue';
import EditButton from '@/Components/Buttons/EditButton.vue';
import DocumentsView from '@/Components/Documents/View.vue';
import PaymentsView from '@/Components/Payments/View.vue';
export default {
components: {
BreadCrumb,
ShowPage,
SimpleTable,
CarCard,
DeleteButton,
RestoreButton,
PrintButton,
ContactCard,
EditButton,
CarCard,
DocumentsView,
PaymentsView,
components: {
BreadCrumb,
ShowPage,
SimpleTable,
CarCard,
DeleteButton,
RestoreButton,
PrintButton,
ContactCard,
EditButton,
CarCard,
DocumentsView,
PaymentsView,
},
props: {
contract: Object,
},
computed: {
contactTitle() {
return this.contract.is_sell_contract ? 'Käufer' : 'Verkäufer';
},
props: {
contract: Object,
},
computed: {
contactTitle: function() {
return this.contract.is_sell_contract ? 'Käufer' : 'Verkäufer';
}
},
data() {
return {
currentRoute: 'contracts.show',
buyContractsColumns: [
{key: 'contact', value: 'Verkäufer'},
{key: 'date', value: 'Kaufdatum'},
{key: 'price', value: 'Kaufpreis'},
],
sellContractsColumns: [
{key: 'contact', value: 'Käufer'},
{key: 'date', value: 'Verkaufsdatum'},
{key: 'price', value: 'Verkaufspreis'},
{key: 'insurance_type', value: 'Versicherungstyp'},
],
}
},
}
},
data() {
return {
currentRoute: 'contracts.show',
buyContractsColumns: [
{ key: 'contact', value: 'Verkäufer' },
{ key: 'date', value: 'Kaufdatum' },
{ key: 'price', value: 'Kaufpreis' },
],
sellContractsColumns: [
{ key: 'contact', value: 'Käufer' },
{ key: 'date', value: 'Verkaufsdatum' },
{ key: 'price', value: 'Verkaufspreis' },
{ key: 'insurance_type', value: 'Versicherungstyp' },
],
};
},
};
</script>

View File

@ -22,39 +22,39 @@
</template>
<script>
import Layout from '@/Layouts/Layout'
import SimpleTable from '@/Components/SimpleTable.vue'
import DashItem from '@/Components/Dashboard/DashItem.vue'
import Layout from '@/Layouts/Layout';
import SimpleTable from '@/Components/SimpleTable.vue';
import DashItem from '@/Components/Dashboard/DashItem.vue';
export default {
components: {
Layout,
SimpleTable,
DashItem,
},
props: {
buy_contracts: Object,
sell_contracts: Object,
sold_this_year: Number,
bought_this_year: Number,
my_cars: Number,
},
data() {
return {
currentRoute: 'cars',
buyContractColumns: [
{key: 'date', value: 'Datum', sortable: false},
// {key: 'car', value: 'Auto', sortable: false},
{key: 'contact', value: 'Verkäufer', sortable: false},
{key: 'price', value: 'Einkaufspreis', sortable: false},
],
sellContractColumns: [
{key: 'date', value: 'Datum', sortable: false},
// {key: 'car', value: 'Auto', sortable: false},
{key: 'contact', value: 'Käufer', sortable: false},
{key: 'price', value: 'Verkaufspreis', sortable: false},
],
}
},
}
export default {
components: {
Layout,
SimpleTable,
DashItem,
},
props: {
buy_contracts: Object,
sell_contracts: Object,
sold_this_year: Number,
bought_this_year: Number,
my_cars: Number,
},
data() {
return {
currentRoute: 'cars',
buyContractColumns: [
{ key: 'date', value: 'Datum', sortable: false },
// {key: 'car', value: 'Auto', sortable: false},
{ key: 'contact', value: 'Verkäufer', sortable: false },
{ key: 'price', value: 'Einkaufspreis', sortable: false },
],
sellContractColumns: [
{ key: 'date', value: 'Datum', sortable: false },
// {key: 'car', value: 'Auto', sortable: false},
{ key: 'contact', value: 'Käufer', sortable: false },
{ key: 'price', value: 'Verkaufspreis', sortable: false },
],
};
},
};
</script>

View File

@ -53,54 +53,54 @@
</template>
<script>
import JetActionSection from '@/Jetstream/ActionSection'
import JetDialogModal from '@/Jetstream/DialogModal'
import JetDangerButton from '@/Jetstream/DangerButton'
import JetInput from '@/Jetstream/Input'
import JetInputError from '@/Jetstream/InputError'
import JetSecondaryButton from '@/Jetstream/SecondaryButton'
import JetActionSection from '@/Jetstream/ActionSection';
import JetDialogModal from '@/Jetstream/DialogModal';
import JetDangerButton from '@/Jetstream/DangerButton';
import JetInput from '@/Jetstream/Input';
import JetInputError from '@/Jetstream/InputError';
import JetSecondaryButton from '@/Jetstream/SecondaryButton';
export default {
components: {
JetActionSection,
JetDangerButton,
JetDialogModal,
JetInput,
JetInputError,
JetSecondaryButton,
},
export default {
components: {
JetActionSection,
JetDangerButton,
JetDialogModal,
JetInput,
JetInputError,
JetSecondaryButton,
},
data() {
return {
confirmingUserDeletion: false,
data() {
return {
confirmingUserDeletion: false,
form: this.$inertia.form({
password: '',
})
}
},
form: this.$inertia.form({
password: '',
}),
};
},
methods: {
confirmUserDeletion() {
this.confirmingUserDeletion = true;
methods: {
confirmUserDeletion() {
this.confirmingUserDeletion = true;
setTimeout(() => this.$refs.password.focus(), 250)
},
setTimeout(() => this.$refs.password.focus(), 250);
},
deleteUser() {
this.form.delete(route('current-user.destroy'), {
preserveScroll: true,
onSuccess: () => this.closeModal(),
onError: () => this.$refs.password.focus(),
onFinish: () => this.form.reset(),
})
},
deleteUser() {
this.form.delete(route('current-user.destroy'), {
preserveScroll: true,
onSuccess: () => this.closeModal(),
onError: () => this.$refs.password.focus(),
onFinish: () => this.form.reset(),
});
},
closeModal() {
this.confirmingUserDeletion = false
closeModal() {
this.confirmingUserDeletion = false;
this.form.reset()
},
},
}
this.form.reset();
},
},
};
</script>

View File

@ -87,58 +87,58 @@
</template>
<script>
import JetActionMessage from '@/Jetstream/ActionMessage'
import JetActionSection from '@/Jetstream/ActionSection'
import JetButton from '@/Jetstream/Button'
import JetDialogModal from '@/Jetstream/DialogModal'
import JetInput from '@/Jetstream/Input'
import JetInputError from '@/Jetstream/InputError'
import JetSecondaryButton from '@/Jetstream/SecondaryButton'
import JetActionMessage from '@/Jetstream/ActionMessage';
import JetActionSection from '@/Jetstream/ActionSection';
import JetButton from '@/Jetstream/Button';
import JetDialogModal from '@/Jetstream/DialogModal';
import JetInput from '@/Jetstream/Input';
import JetInputError from '@/Jetstream/InputError';
import JetSecondaryButton from '@/Jetstream/SecondaryButton';
export default {
props: ['sessions'],
export default {
props: ['sessions'],
components: {
JetActionMessage,
JetActionSection,
JetButton,
JetDialogModal,
JetInput,
JetInputError,
JetSecondaryButton,
},
components: {
JetActionMessage,
JetActionSection,
JetButton,
JetDialogModal,
JetInput,
JetInputError,
JetSecondaryButton,
},
data() {
return {
confirmingLogout: false,
data() {
return {
confirmingLogout: false,
form: this.$inertia.form({
password: '',
})
}
},
form: this.$inertia.form({
password: '',
}),
};
},
methods: {
confirmLogout() {
this.confirmingLogout = true
methods: {
confirmLogout() {
this.confirmingLogout = true;
setTimeout(() => this.$refs.password.focus(), 250)
},
setTimeout(() => this.$refs.password.focus(), 250);
},
logoutOtherBrowserSessions() {
this.form.delete(route('other-browser-sessions.destroy'), {
preserveScroll: true,
onSuccess: () => this.closeModal(),
onError: () => this.$refs.password.focus(),
onFinish: () => this.form.reset(),
})
},
logoutOtherBrowserSessions() {
this.form.delete(route('other-browser-sessions.destroy'), {
preserveScroll: true,
onSuccess: () => this.closeModal(),
onError: () => this.$refs.password.focus(),
onFinish: () => this.form.reset(),
});
},
closeModal() {
this.confirmingLogout = false
closeModal() {
this.confirmingLogout = false;
this.form.reset()
},
},
}
this.form.reset();
},
},
};
</script>

View File

@ -39,25 +39,25 @@
</template>
<script>
import Layout from '@/Layouts/Layout'
import DeleteUserForm from './DeleteUserForm'
import JetSectionBorder from '@/Jetstream/SectionBorder'
import LogoutOtherBrowserSessionsForm from './LogoutOtherBrowserSessionsForm'
import TwoFactorAuthenticationForm from './TwoFactorAuthenticationForm'
import UpdatePasswordForm from './UpdatePasswordForm'
import UpdateProfileInformationForm from './UpdateProfileInformationForm'
import Layout from '@/Layouts/Layout';
import JetSectionBorder from '@/Jetstream/SectionBorder';
import DeleteUserForm from './DeleteUserForm';
import LogoutOtherBrowserSessionsForm from './LogoutOtherBrowserSessionsForm';
import TwoFactorAuthenticationForm from './TwoFactorAuthenticationForm';
import UpdatePasswordForm from './UpdatePasswordForm';
import UpdateProfileInformationForm from './UpdateProfileInformationForm';
export default {
props: ['sessions'],
export default {
props: ['sessions'],
components: {
Layout,
DeleteUserForm,
JetSectionBorder,
LogoutOtherBrowserSessionsForm,
TwoFactorAuthenticationForm,
UpdatePasswordForm,
UpdateProfileInformationForm,
},
}
components: {
Layout,
DeleteUserForm,
JetSectionBorder,
LogoutOtherBrowserSessionsForm,
TwoFactorAuthenticationForm,
UpdatePasswordForm,
UpdateProfileInformationForm,
},
};
</script>

View File

@ -87,80 +87,80 @@
</template>
<script>
import JetActionSection from '@/Jetstream/ActionSection'
import JetButton from '@/Jetstream/Button'
import JetConfirmsPassword from '@/Jetstream/ConfirmsPassword'
import JetDangerButton from '@/Jetstream/DangerButton'
import JetSecondaryButton from '@/Jetstream/SecondaryButton'
import JetActionSection from '@/Jetstream/ActionSection';
import JetButton from '@/Jetstream/Button';
import JetConfirmsPassword from '@/Jetstream/ConfirmsPassword';
import JetDangerButton from '@/Jetstream/DangerButton';
import JetSecondaryButton from '@/Jetstream/SecondaryButton';
export default {
components: {
JetActionSection,
JetButton,
JetConfirmsPassword,
JetDangerButton,
JetSecondaryButton,
},
export default {
components: {
JetActionSection,
JetButton,
JetConfirmsPassword,
JetDangerButton,
JetSecondaryButton,
},
data() {
return {
enabling: false,
disabling: false,
data() {
return {
enabling: false,
disabling: false,
qrCode: null,
recoveryCodes: [],
}
},
qrCode: null,
recoveryCodes: [],
};
},
methods: {
enableTwoFactorAuthentication() {
this.enabling = true
methods: {
enableTwoFactorAuthentication() {
this.enabling = true;
this.$inertia.post('/user/two-factor-authentication', {}, {
preserveScroll: true,
onSuccess: () => Promise.all([
this.showQrCode(),
this.showRecoveryCodes(),
]),
onFinish: () => (this.enabling = false),
})
},
this.$inertia.post('/user/two-factor-authentication', {}, {
preserveScroll: true,
onSuccess: () => Promise.all([
this.showQrCode(),
this.showRecoveryCodes(),
]),
onFinish: () => (this.enabling = false),
});
},
showQrCode() {
return axios.get('/user/two-factor-qr-code')
.then(response => {
this.qrCode = response.data.svg
})
},
showQrCode() {
return axios.get('/user/two-factor-qr-code')
.then((response) => {
this.qrCode = response.data.svg;
});
},
showRecoveryCodes() {
return axios.get('/user/two-factor-recovery-codes')
.then(response => {
this.recoveryCodes = response.data
})
},
showRecoveryCodes() {
return axios.get('/user/two-factor-recovery-codes')
.then((response) => {
this.recoveryCodes = response.data;
});
},
regenerateRecoveryCodes() {
axios.post('/user/two-factor-recovery-codes')
.then(response => {
this.showRecoveryCodes()
})
},
regenerateRecoveryCodes() {
axios.post('/user/two-factor-recovery-codes')
.then((response) => {
this.showRecoveryCodes();
});
},
disableTwoFactorAuthentication() {
this.disabling = true
disableTwoFactorAuthentication() {
this.disabling = true;
this.$inertia.delete('/user/two-factor-authentication', {
preserveScroll: true,
onSuccess: () => (this.disabling = false),
})
},
},
this.$inertia.delete('/user/two-factor-authentication', {
preserveScroll: true,
onSuccess: () => (this.disabling = false),
});
},
},
computed: {
twoFactorEnabled() {
return ! this.enabling && this.$page.props.user.two_factor_enabled
}
}
}
computed: {
twoFactorEnabled() {
return !this.enabling && this.$page.props.user.two_factor_enabled;
},
},
};
</script>

View File

@ -41,52 +41,52 @@
</template>
<script>
import JetActionMessage from '@/Jetstream/ActionMessage'
import JetButton from '@/Jetstream/Button'
import JetFormSection from '@/Jetstream/FormSection'
import JetInput from '@/Jetstream/Input'
import JetInputError from '@/Jetstream/InputError'
import JetLabel from '@/Jetstream/Label'
import JetActionMessage from '@/Jetstream/ActionMessage';
import JetButton from '@/Jetstream/Button';
import JetFormSection from '@/Jetstream/FormSection';
import JetInput from '@/Jetstream/Input';
import JetInputError from '@/Jetstream/InputError';
import JetLabel from '@/Jetstream/Label';
export default {
components: {
JetActionMessage,
JetButton,
JetFormSection,
JetInput,
JetInputError,
JetLabel,
export default {
components: {
JetActionMessage,
JetButton,
JetFormSection,
JetInput,
JetInputError,
JetLabel,
},
data() {
return {
form: this.$inertia.form({
current_password: '',
password: '',
password_confirmation: '',
}),
};
},
methods: {
updatePassword() {
this.form.put(route('user-password.update'), {
errorBag: 'updatePassword',
preserveScroll: true,
onSuccess: () => this.form.reset(),
onError: () => {
if (this.form.errors.password) {
this.form.reset('password', 'password_confirmation');
this.$refs.password.focus();
}
if (this.form.errors.current_password) {
this.form.reset('current_password');
this.$refs.current_password.focus();
}
},
data() {
return {
form: this.$inertia.form({
current_password: '',
password: '',
password_confirmation: '',
}),
}
},
methods: {
updatePassword() {
this.form.put(route('user-password.update'), {
errorBag: 'updatePassword',
preserveScroll: true,
onSuccess: () => this.form.reset(),
onError: () => {
if (this.form.errors.password) {
this.form.reset('password', 'password_confirmation')
this.$refs.password.focus()
}
if (this.form.errors.current_password) {
this.form.reset('current_password')
this.$refs.current_password.focus()
}
}
})
},
},
}
});
},
},
};
</script>

View File

@ -69,72 +69,72 @@
</template>
<script>
import JetButton from '@/Jetstream/Button'
import JetFormSection from '@/Jetstream/FormSection'
import JetInput from '@/Jetstream/Input'
import JetInputError from '@/Jetstream/InputError'
import JetLabel from '@/Jetstream/Label'
import JetActionMessage from '@/Jetstream/ActionMessage'
import JetSecondaryButton from '@/Jetstream/SecondaryButton'
import JetButton from '@/Jetstream/Button';
import JetFormSection from '@/Jetstream/FormSection';
import JetInput from '@/Jetstream/Input';
import JetInputError from '@/Jetstream/InputError';
import JetLabel from '@/Jetstream/Label';
import JetActionMessage from '@/Jetstream/ActionMessage';
import JetSecondaryButton from '@/Jetstream/SecondaryButton';
export default {
components: {
JetActionMessage,
JetButton,
JetFormSection,
JetInput,
JetInputError,
JetLabel,
JetSecondaryButton,
},
export default {
components: {
JetActionMessage,
JetButton,
JetFormSection,
JetInput,
JetInputError,
JetLabel,
JetSecondaryButton,
},
props: ['user'],
props: ['user'],
data() {
return {
form: this.$inertia.form({
_method: 'PUT',
name: this.user.name,
email: this.user.email,
photo: null,
}),
data() {
return {
form: this.$inertia.form({
_method: 'PUT',
name: this.user.name,
email: this.user.email,
photo: null,
}),
photoPreview: null,
}
},
photoPreview: null,
};
},
methods: {
updateProfileInformation() {
if (this.$refs.photo) {
this.form.photo = this.$refs.photo.files[0]
}
methods: {
updateProfileInformation() {
if (this.$refs.photo) {
this.form.photo = this.$refs.photo.files[0];
}
this.form.post(route('user-profile-information.update'), {
errorBag: 'updateProfileInformation',
preserveScroll: true
});
},
this.form.post(route('user-profile-information.update'), {
errorBag: 'updateProfileInformation',
preserveScroll: true,
});
},
selectNewPhoto() {
this.$refs.photo.click();
},
selectNewPhoto() {
this.$refs.photo.click();
},
updatePhotoPreview() {
const reader = new FileReader();
updatePhotoPreview() {
const reader = new FileReader();
reader.onload = (e) => {
this.photoPreview = e.target.result;
};
reader.onload = (e) => {
this.photoPreview = e.target.result;
};
reader.readAsDataURL(this.$refs.photo.files[0]);
},
reader.readAsDataURL(this.$refs.photo.files[0]);
},
deletePhoto() {
this.$inertia.delete(route('current-user-photo.destroy'), {
preserveScroll: true,
onSuccess: () => (this.photoPreview = null),
});
},
},
}
deletePhoto() {
this.$inertia.delete(route('current-user-photo.destroy'), {
preserveScroll: true,
onSuccess: () => (this.photoPreview = null),
});
},
},
};
</script>

View File

@ -31,28 +31,28 @@
</template>
<script>
import Layout from '@/Layouts/Layout'
import JetLabel from '@/Jetstream/Label.vue'
import JetFormSection from '@/Jetstream/FormSection'
import Layout from '@/Layouts/Layout';
import JetLabel from '@/Jetstream/Label.vue';
import JetFormSection from '@/Jetstream/FormSection';
export default {
components: {
Layout,
JetLabel,
JetFormSection,
components: {
Layout,
JetLabel,
JetFormSection,
},
props: {
year: Number,
years: Array,
},
data() {
return {
};
},
computed: {
link() {
return route('reports.print', { year: this.year });
},
props: {
year: Number,
years: Array,
},
data() {
return {
}
},
computed: {
link() {
return route('reports.print', {year: this.year});
},
},
}
},
};
</script>

View File

@ -15,13 +15,13 @@
</template>
<script>
import AppLayout from '@/Layouts/AppLayout'
import CreateTeamForm from './CreateTeamForm'
import AppLayout from '@/Layouts/AppLayout';
import CreateTeamForm from './CreateTeamForm';
export default {
components: {
AppLayout,
CreateTeamForm,
},
}
export default {
components: {
AppLayout,
CreateTeamForm,
},
};
</script>

View File

@ -38,36 +38,36 @@
</template>
<script>
import JetButton from '@/Jetstream/Button'
import JetFormSection from '@/Jetstream/FormSection'
import JetInput from '@/Jetstream/Input'
import JetInputError from '@/Jetstream/InputError'
import JetLabel from '@/Jetstream/Label'
import JetButton from '@/Jetstream/Button';
import JetFormSection from '@/Jetstream/FormSection';
import JetInput from '@/Jetstream/Input';
import JetInputError from '@/Jetstream/InputError';
import JetLabel from '@/Jetstream/Label';
export default {
components: {
JetButton,
JetFormSection,
JetInput,
JetInputError,
JetLabel,
},
export default {
components: {
JetButton,
JetFormSection,
JetInput,
JetInputError,
JetLabel,
},
data() {
return {
form: this.$inertia.form({
name: '',
})
}
},
data() {
return {
form: this.$inertia.form({
name: '',
}),
};
},
methods: {
createTeam() {
this.form.post(route('teams.store'), {
errorBag: 'createTeam',
preserveScroll: true
});
},
},
}
methods: {
createTeam() {
this.form.post(route('teams.store'), {
errorBag: 'createTeam',
preserveScroll: true,
});
},
},
};
</script>

View File

@ -44,40 +44,40 @@
</template>
<script>
import JetActionSection from '@/Jetstream/ActionSection'
import JetConfirmationModal from '@/Jetstream/ConfirmationModal'
import JetDangerButton from '@/Jetstream/DangerButton'
import JetSecondaryButton from '@/Jetstream/SecondaryButton'
import JetActionSection from '@/Jetstream/ActionSection';
import JetConfirmationModal from '@/Jetstream/ConfirmationModal';
import JetDangerButton from '@/Jetstream/DangerButton';
import JetSecondaryButton from '@/Jetstream/SecondaryButton';
export default {
props: ['team'],
export default {
props: ['team'],
components: {
JetActionSection,
JetConfirmationModal,
JetDangerButton,
JetSecondaryButton,
},
components: {
JetActionSection,
JetConfirmationModal,
JetDangerButton,
JetSecondaryButton,
},
data() {
return {
confirmingTeamDeletion: false,
deleting: false,
data() {
return {
confirmingTeamDeletion: false,
deleting: false,
form: this.$inertia.form()
}
},
form: this.$inertia.form(),
};
},
methods: {
confirmTeamDeletion() {
this.confirmingTeamDeletion = true
},
methods: {
confirmTeamDeletion() {
this.confirmingTeamDeletion = true;
},
deleteTeam() {
this.form.delete(route('teams.destroy', this.team), {
errorBag: 'deleteTeam'
});
},
},
}
deleteTeam() {
this.form.delete(route('teams.destroy', this.team), {
errorBag: 'deleteTeam',
});
},
},
};
</script>

View File

@ -26,25 +26,25 @@
</template>
<script>
import TeamMemberManager from './TeamMemberManager'
import AppLayout from '@/Layouts/AppLayout'
import DeleteTeamForm from './DeleteTeamForm'
import JetSectionBorder from '@/Jetstream/SectionBorder'
import UpdateTeamNameForm from './UpdateTeamNameForm'
import AppLayout from '@/Layouts/AppLayout';
import JetSectionBorder from '@/Jetstream/SectionBorder';
import TeamMemberManager from './TeamMemberManager';
import DeleteTeamForm from './DeleteTeamForm';
import UpdateTeamNameForm from './UpdateTeamNameForm';
export default {
props: [
'team',
'availableRoles',
'permissions',
],
export default {
props: [
'team',
'availableRoles',
'permissions',
],
components: {
AppLayout,
DeleteTeamForm,
JetSectionBorder,
TeamMemberManager,
UpdateTeamNameForm,
},
}
components: {
AppLayout,
DeleteTeamForm,
JetSectionBorder,
TeamMemberManager,
UpdateTeamNameForm,
},
};
</script>

View File

@ -247,114 +247,114 @@
</template>
<script>
import JetActionMessage from '@/Jetstream/ActionMessage'
import JetActionSection from '@/Jetstream/ActionSection'
import JetButton from '@/Jetstream/Button'
import JetConfirmationModal from '@/Jetstream/ConfirmationModal'
import JetDangerButton from '@/Jetstream/DangerButton'
import JetDialogModal from '@/Jetstream/DialogModal'
import JetFormSection from '@/Jetstream/FormSection'
import JetInput from '@/Jetstream/Input'
import JetInputError from '@/Jetstream/InputError'
import JetLabel from '@/Jetstream/Label'
import JetSecondaryButton from '@/Jetstream/SecondaryButton'
import JetSectionBorder from '@/Jetstream/SectionBorder'
import JetActionMessage from '@/Jetstream/ActionMessage';
import JetActionSection from '@/Jetstream/ActionSection';
import JetButton from '@/Jetstream/Button';
import JetConfirmationModal from '@/Jetstream/ConfirmationModal';
import JetDangerButton from '@/Jetstream/DangerButton';
import JetDialogModal from '@/Jetstream/DialogModal';
import JetFormSection from '@/Jetstream/FormSection';
import JetInput from '@/Jetstream/Input';
import JetInputError from '@/Jetstream/InputError';
import JetLabel from '@/Jetstream/Label';
import JetSecondaryButton from '@/Jetstream/SecondaryButton';
import JetSectionBorder from '@/Jetstream/SectionBorder';
export default {
components: {
JetActionMessage,
JetActionSection,
JetButton,
JetConfirmationModal,
JetDangerButton,
JetDialogModal,
JetFormSection,
JetInput,
JetInputError,
JetLabel,
JetSecondaryButton,
JetSectionBorder,
},
export default {
components: {
JetActionMessage,
JetActionSection,
JetButton,
JetConfirmationModal,
JetDangerButton,
JetDialogModal,
JetFormSection,
JetInput,
JetInputError,
JetLabel,
JetSecondaryButton,
JetSectionBorder,
},
props: [
'team',
'availableRoles',
'userPermissions'
],
props: [
'team',
'availableRoles',
'userPermissions',
],
data() {
return {
addTeamMemberForm: this.$inertia.form({
email: '',
role: null,
}),
data() {
return {
addTeamMemberForm: this.$inertia.form({
email: '',
role: null,
}),
updateRoleForm: this.$inertia.form({
role: null,
}),
updateRoleForm: this.$inertia.form({
role: null,
}),
leaveTeamForm: this.$inertia.form(),
removeTeamMemberForm: this.$inertia.form(),
leaveTeamForm: this.$inertia.form(),
removeTeamMemberForm: this.$inertia.form(),
currentlyManagingRole: false,
managingRoleFor: null,
confirmingLeavingTeam: false,
teamMemberBeingRemoved: null,
}
},
currentlyManagingRole: false,
managingRoleFor: null,
confirmingLeavingTeam: false,
teamMemberBeingRemoved: null,
};
},
methods: {
addTeamMember() {
this.addTeamMemberForm.post(route('team-members.store', this.team), {
errorBag: 'addTeamMember',
preserveScroll: true,
onSuccess: () => this.addTeamMemberForm.reset(),
});
},
methods: {
addTeamMember() {
this.addTeamMemberForm.post(route('team-members.store', this.team), {
errorBag: 'addTeamMember',
preserveScroll: true,
onSuccess: () => this.addTeamMemberForm.reset(),
});
},
cancelTeamInvitation(invitation) {
this.$inertia.delete(route('team-invitations.destroy', invitation), {
preserveScroll: true
});
},
cancelTeamInvitation(invitation) {
this.$inertia.delete(route('team-invitations.destroy', invitation), {
preserveScroll: true,
});
},
manageRole(teamMember) {
this.managingRoleFor = teamMember
this.updateRoleForm.role = teamMember.membership.role
this.currentlyManagingRole = true
},
manageRole(teamMember) {
this.managingRoleFor = teamMember;
this.updateRoleForm.role = teamMember.membership.role;
this.currentlyManagingRole = true;
},
updateRole() {
this.updateRoleForm.put(route('team-members.update', [this.team, this.managingRoleFor]), {
preserveScroll: true,
onSuccess: () => (this.currentlyManagingRole = false),
})
},
updateRole() {
this.updateRoleForm.put(route('team-members.update', [this.team, this.managingRoleFor]), {
preserveScroll: true,
onSuccess: () => (this.currentlyManagingRole = false),
});
},
confirmLeavingTeam() {
this.confirmingLeavingTeam = true
},
confirmLeavingTeam() {
this.confirmingLeavingTeam = true;
},
leaveTeam() {
this.leaveTeamForm.delete(route('team-members.destroy', [this.team, this.$page.props.user]))
},
leaveTeam() {
this.leaveTeamForm.delete(route('team-members.destroy', [this.team, this.$page.props.user]));
},
confirmTeamMemberRemoval(teamMember) {
this.teamMemberBeingRemoved = teamMember
},
confirmTeamMemberRemoval(teamMember) {
this.teamMemberBeingRemoved = teamMember;
},
removeTeamMember() {
this.removeTeamMemberForm.delete(route('team-members.destroy', [this.team, this.teamMemberBeingRemoved]), {
errorBag: 'removeTeamMember',
preserveScroll: true,
preserveState: true,
onSuccess: () => (this.teamMemberBeingRemoved = null),
})
},
removeTeamMember() {
this.removeTeamMemberForm.delete(route('team-members.destroy', [this.team, this.teamMemberBeingRemoved]), {
errorBag: 'removeTeamMember',
preserveScroll: true,
preserveState: true,
onSuccess: () => (this.teamMemberBeingRemoved = null),
});
},
displayableRole(role) {
return this.availableRoles.find(r => r.key === role).name
},
},
}
displayableRole(role) {
return this.availableRoles.find((r) => r.key === role).name;
},
},
};
</script>

View File

@ -50,40 +50,40 @@
</template>
<script>
import JetActionMessage from '@/Jetstream/ActionMessage'
import JetButton from '@/Jetstream/Button'
import JetFormSection from '@/Jetstream/FormSection'
import JetInput from '@/Jetstream/Input'
import JetInputError from '@/Jetstream/InputError'
import JetLabel from '@/Jetstream/Label'
import JetActionMessage from '@/Jetstream/ActionMessage';
import JetButton from '@/Jetstream/Button';
import JetFormSection from '@/Jetstream/FormSection';
import JetInput from '@/Jetstream/Input';
import JetInputError from '@/Jetstream/InputError';
import JetLabel from '@/Jetstream/Label';
export default {
components: {
JetActionMessage,
JetButton,
JetFormSection,
JetInput,
JetInputError,
JetLabel,
},
export default {
components: {
JetActionMessage,
JetButton,
JetFormSection,
JetInput,
JetInputError,
JetLabel,
},
props: ['team', 'permissions'],
props: ['team', 'permissions'],
data() {
return {
form: this.$inertia.form({
name: this.team.name,
})
}
},
data() {
return {
form: this.$inertia.form({
name: this.team.name,
}),
};
},
methods: {
updateTeamName() {
this.form.put(route('teams.update', this.team), {
errorBag: 'updateTeamName',
preserveScroll: true
});
},
},
}
methods: {
updateTeamName() {
this.form.put(route('teams.update', this.team), {
errorBag: 'updateTeamName',
preserveScroll: true,
});
},
},
};
</script>

75
resources/js/app.js vendored
View File

@ -1,56 +1,55 @@
require('./bootstrap');
// Import modules...
import { createApp, h } from 'vue';
import { App as InertiaApp, plugin as InertiaPlugin } from '@inertiajs/inertia-vue3';
import { InertiaProgress } from '@inertiajs/progress';
import Unicon from 'vue-unicons';
import { createStore } from 'vuex'
import { uniChart, uniFileAlt, uniPalette, uniCalendarAlt, uniPlusCircle, uniMeh, uniUsersAlt, uniCarSideview, uniDashboard, uniSearch, uniFilter, uniFilterSlash, uniTrashAlt, uniPen, uniExclamationTriangle, uniMapMarker, uniPhone, uniEnvelope, uniFileDownload, uniArrowDown, uniArrowUp, uniArrowRight, uniAngleRight, uniAngleUp, uniAngleDown, uniAngleLeft, uniFileUploadAlt } from 'vue-unicons/dist/icons'
import { createStore } from 'vuex';
import {
uniChart, uniFileAlt, uniPalette, uniCalendarAlt, uniPlusCircle, uniMeh, uniUsersAlt, uniCarSideview, uniDashboard, uniSearch, uniFilter, uniFilterSlash, uniTrashAlt, uniPen, uniExclamationTriangle, uniMapMarker, uniPhone, uniEnvelope, uniFileDownload, uniArrowDown, uniArrowUp, uniArrowRight, uniAngleRight, uniAngleUp, uniAngleDown, uniAngleLeft, uniFileUploadAlt,
} from 'vue-unicons/dist/icons';
Unicon.add([uniChart, uniFileAlt, uniPalette, uniCalendarAlt, uniPlusCircle, uniMeh, uniUsersAlt, uniCarSideview, uniDashboard, uniSearch, uniFilter, uniFilterSlash, uniTrashAlt, uniPen, uniExclamationTriangle, uniMapMarker, uniPhone, uniEnvelope, uniFileDownload, uniArrowDown, uniArrowUp, uniArrowRight, uniAngleRight, uniAngleUp, uniAngleDown, uniAngleLeft, uniFileUploadAlt])
require('./bootstrap');
Unicon.add([uniChart, uniFileAlt, uniPalette, uniCalendarAlt, uniPlusCircle, uniMeh, uniUsersAlt, uniCarSideview, uniDashboard, uniSearch, uniFilter, uniFilterSlash, uniTrashAlt, uniPen, uniExclamationTriangle, uniMapMarker, uniPhone, uniEnvelope, uniFileDownload, uniArrowDown, uniArrowUp, uniArrowRight, uniAngleRight, uniAngleUp, uniAngleDown, uniAngleLeft, uniFileUploadAlt]);
// Create a new store instance.
const store = createStore({
state () {
return {
sideBarOpen: false
}
state() {
return {
sideBarOpen: false,
};
},
getters: {
sideBarOpen: (state) => state.sideBarOpen,
},
mutations: {
toggleSidebar(state) {
state.sideBarOpen = !state.sideBarOpen;
},
getters: {
sideBarOpen: state => {
return state.sideBarOpen
}
},
actions: {
toggleSidebar(context) {
context.commit('toggleSidebar');
},
mutations: {
toggleSidebar (state) {
state.sideBarOpen = !state.sideBarOpen
}
},
actions: {
toggleSidebar(context) {
context.commit('toggleSidebar')
}
}
})
},
});
const el = document.getElementById('app');
createApp({
render: () =>
h(InertiaApp, {
initialPage: JSON.parse(el.dataset.page),
resolveComponent: (name) => require(`./Pages/${name}`).default,
}),
render: () => h(InertiaApp, {
initialPage: JSON.parse(el.dataset.page),
resolveComponent: (name) => require(`./Pages/${name}`).default,
}),
})
.mixin({ methods: { route } })
.use(InertiaPlugin)
.use(store)
.use(Unicon, {
fill: '#4B5563',
height: 32,
width: 32
})
.mount(el);
.mixin({ methods: { route } })
.use(InertiaPlugin)
.use(store)
.use(Unicon, {
fill: '#4B5563',
height: 32,
width: 32,
})
.mount(el);
InertiaProgress.init({ color: '#4B5563' });