Merge branch 'master' of https://github.com/brkcvn/akaunting into code-clean
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
this.modules = wizard_modules;
|
||||
|
||||
Object.keys(this.currency_codes).map((key) => {
|
||||
return this.currency_codes[key];
|
||||
return this.currency_codes[key];
|
||||
});
|
||||
|
||||
this.page_loaded = false;
|
||||
@@ -34,10 +34,10 @@
|
||||
data() {
|
||||
return {
|
||||
translations: {
|
||||
company: {},
|
||||
currencies: {},
|
||||
taxes: {},
|
||||
finish: {},
|
||||
company: {},
|
||||
currencies: {},
|
||||
taxes: {},
|
||||
finish: {},
|
||||
},
|
||||
company: {},
|
||||
countries: {},
|
||||
|
||||
68
resources/assets/js/mixins/wizardAction.js
vendored
68
resources/assets/js/mixins/wizardAction.js
vendored
@@ -8,6 +8,7 @@ export default {
|
||||
name: "",
|
||||
rate: "",
|
||||
select: "",
|
||||
default_currency: 0,
|
||||
enabled: 1
|
||||
},
|
||||
error_field: {},
|
||||
@@ -15,6 +16,7 @@ export default {
|
||||
button_loading: false,
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
onAddItem() {
|
||||
this.new_datas = true;
|
||||
@@ -25,6 +27,9 @@ export default {
|
||||
this.model.name = '';
|
||||
this.model.rate = '';
|
||||
this.model.select = '';
|
||||
this.model.default = 0;
|
||||
this.model.default_currency = 0;
|
||||
this.model.enabled = 1;
|
||||
}
|
||||
},
|
||||
|
||||
@@ -36,6 +41,9 @@ export default {
|
||||
if (this.model) {
|
||||
this.model.name = item.name ? item.name : '';
|
||||
this.model.rate = item.rate ? item.rate : '';
|
||||
this.model.enabled = 1;
|
||||
this.model.default = item.default ? item.default : 0;
|
||||
this.model.default_currency = item.default ? item.default : 0;
|
||||
this.model.select = item.code ? item.code : '';
|
||||
}
|
||||
},
|
||||
@@ -50,6 +58,8 @@ export default {
|
||||
this.model.name = '';
|
||||
this.model.rate = '';
|
||||
this.model.select = '';
|
||||
this.model.default = 0;
|
||||
this.model.default_currency = 0;
|
||||
this.model.enabled = 1;
|
||||
},
|
||||
|
||||
@@ -74,8 +84,8 @@ export default {
|
||||
},
|
||||
|
||||
onDeleteItemMessage(event) {
|
||||
let type = event.success ? 'success' : 'error';
|
||||
let timeout = 1000;
|
||||
let type = event.success ? 'success' : 'danger';
|
||||
let timeout = 5000;
|
||||
|
||||
if (event.important) {
|
||||
timeout = 0;
|
||||
@@ -84,7 +94,7 @@ export default {
|
||||
this.$notify({
|
||||
message: event.message,
|
||||
timeout: timeout,
|
||||
icon: "",
|
||||
icon: "error_outline",
|
||||
type,
|
||||
});
|
||||
|
||||
@@ -102,39 +112,62 @@ export default {
|
||||
});
|
||||
}
|
||||
|
||||
if(plus_data == 'type') {
|
||||
if (plus_data == 'type') {
|
||||
Object.assign(data, {
|
||||
['type']: 'normal',
|
||||
});
|
||||
}
|
||||
|
||||
if (data.default_currency == 1) {
|
||||
data.rate = 1;
|
||||
}
|
||||
|
||||
data.enabled = 1;
|
||||
|
||||
window.axios({
|
||||
method: form_method,
|
||||
url: form_url,
|
||||
data: data,
|
||||
})
|
||||
.then(response => {
|
||||
if(form_list.length != undefined) {
|
||||
if(form_method == 'POST') {
|
||||
if (form_list.length != undefined) {
|
||||
if (form_method == 'POST') {
|
||||
if (data.default_currency == 1) {
|
||||
form_list.forEach(item => {
|
||||
item.default = 0;
|
||||
item.default_currency = 0;
|
||||
});
|
||||
}
|
||||
|
||||
form_list.push({
|
||||
"id": response.data.data.id,
|
||||
"name": response.data.data.name,
|
||||
"code": response.data.data.code,
|
||||
"rate": response.data.data.rate,
|
||||
"enabled": response.data.data.enabled != undefined ? response.data.data.enabled : 'true'
|
||||
"enabled": response.data.data.enabled != undefined ? response.data.data.enabled : 'true',
|
||||
"default": response.data.data.default ? response.data.data.default : 0,
|
||||
"default_currency": response.data.data.default ? response.data.data.default : 0
|
||||
});
|
||||
}
|
||||
|
||||
if(form_method == 'PATCH') {
|
||||
if (form_method == 'PATCH') {
|
||||
form_list.forEach(item => {
|
||||
if (data.default_currency == 1) {
|
||||
item.default = 0;
|
||||
item.default_currency = 0;
|
||||
}
|
||||
|
||||
if (item.id == form_id) {
|
||||
item.name = response.data.data.name;
|
||||
item.code = response.data.data.code;
|
||||
item.rate = response.data.data.rate;
|
||||
item.default = response.data.data.default ? response.data.data.default : 0;
|
||||
item.default_currency = response.data.data.default ? response.data.data.default : 0;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
this.onSuccessMessage(response);
|
||||
}, this)
|
||||
.catch(error => {
|
||||
@@ -145,20 +178,23 @@ export default {
|
||||
onEjetItem(event, form_list, event_id) {
|
||||
form_list.forEach(function (item, index) {
|
||||
if (item.id == event_id) {
|
||||
form_list.splice(index, 1);
|
||||
return;
|
||||
}
|
||||
}, this);
|
||||
form_list.splice(index, 1);
|
||||
|
||||
this.component = "";
|
||||
document.body.classList.remove("overflow-hidden");
|
||||
this.onDeleteItemMessage(event);
|
||||
return;
|
||||
}
|
||||
}, this);
|
||||
|
||||
this.component = "";
|
||||
document.body.classList.remove("overflow-hidden");
|
||||
|
||||
this.onDeleteItemMessage(event);
|
||||
},
|
||||
|
||||
onFailErrorGet(field_name) {
|
||||
if(this.error_field[field_name]) {
|
||||
if (this.error_field[field_name]) {
|
||||
return this.error_field[field_name][0];
|
||||
}
|
||||
|
||||
this.button_loading = false;
|
||||
},
|
||||
|
||||
|
||||
@@ -589,8 +589,10 @@ const app = new Vue({
|
||||
this.form.items[item_index][field_name] = this.items[item_index][field_name];
|
||||
},
|
||||
|
||||
async onPayment() {
|
||||
let document_id = document.getElementById('document_id').value;
|
||||
async onPayment(document_id) {
|
||||
if (typeof document_id == 'object') {
|
||||
document_id = document.getElementById('document_id').value;
|
||||
}
|
||||
|
||||
let payment = {
|
||||
modal: false,
|
||||
|
||||
@@ -54,5 +54,13 @@ const app = new Vue({
|
||||
.catch(error => {
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
watch: {
|
||||
'form.default_currency': function (newVal, oldVal) {
|
||||
if (newVal == 1) {
|
||||
this.form.rate = 1;
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
@@ -119,271 +119,273 @@
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Select, Option } from "element-ui";
|
||||
import AkauntingDropzoneFileUpload from "./../../components/AkauntingDropzoneFileUpload";
|
||||
import AkauntingDate from "./../../components/AkauntingDate";
|
||||
import WizardAction from "./../../mixins/wizardAction";
|
||||
import WizardSteps from "./Steps.vue";
|
||||
import { Select, Option } from "element-ui";
|
||||
import AkauntingDropzoneFileUpload from "./../../components/AkauntingDropzoneFileUpload";
|
||||
import AkauntingDate from "./../../components/AkauntingDate";
|
||||
import WizardAction from "./../../mixins/wizardAction";
|
||||
import WizardSteps from "./Steps.vue";
|
||||
|
||||
export default {
|
||||
name: "Company",
|
||||
export default {
|
||||
name: "Company",
|
||||
|
||||
mixins: [WizardAction],
|
||||
mixins: [
|
||||
WizardAction
|
||||
],
|
||||
|
||||
components: {
|
||||
[Select.name]: Select,
|
||||
[Option.name]: Option,
|
||||
AkauntingDropzoneFileUpload,
|
||||
AkauntingDate,
|
||||
WizardSteps
|
||||
},
|
||||
|
||||
props: {
|
||||
company: {
|
||||
type: [Object, Array],
|
||||
components: {
|
||||
[Select.name]: Select,
|
||||
[Option.name]: Option,
|
||||
AkauntingDropzoneFileUpload,
|
||||
AkauntingDate,
|
||||
WizardSteps
|
||||
},
|
||||
|
||||
countries: {
|
||||
type: [Object, Array],
|
||||
},
|
||||
|
||||
translations: {
|
||||
type: [Object, Array],
|
||||
},
|
||||
|
||||
url: {
|
||||
type: String,
|
||||
default: "text",
|
||||
},
|
||||
|
||||
pageLoad: {
|
||||
type: [Boolean, String]
|
||||
},
|
||||
|
||||
locale: {
|
||||
type: String,
|
||||
},
|
||||
|
||||
dateConfig: {
|
||||
type: Object,
|
||||
default: function () {
|
||||
return {
|
||||
|
||||
};
|
||||
props: {
|
||||
company: {
|
||||
type: [Object, Array],
|
||||
},
|
||||
|
||||
countries: {
|
||||
type: [Object, Array],
|
||||
},
|
||||
|
||||
translations: {
|
||||
type: [Object, Array],
|
||||
},
|
||||
|
||||
url: {
|
||||
type: String,
|
||||
default: "text",
|
||||
},
|
||||
|
||||
pageLoad: {
|
||||
type: [Boolean, String]
|
||||
},
|
||||
|
||||
locale: {
|
||||
type: String,
|
||||
},
|
||||
|
||||
dateConfig: {
|
||||
type: Object,
|
||||
default: function () {
|
||||
return {
|
||||
|
||||
};
|
||||
},
|
||||
description: "FlatPckr date configuration"
|
||||
},
|
||||
description: "FlatPckr date configuration"
|
||||
},
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
active: 0,
|
||||
logo: [],
|
||||
real_date: "",
|
||||
lang_data: '',
|
||||
sorted_countries: [],
|
||||
button_loading_company: false
|
||||
};
|
||||
},
|
||||
|
||||
created() {
|
||||
if (document.documentElement.lang) {
|
||||
let lang_split = document.documentElement.lang.split("-");
|
||||
|
||||
if (lang_split[0] !== 'en') {
|
||||
const lang = require(`flatpickr/dist/l10n/${lang_split[0]}.js`).default[lang_split[0]];
|
||||
|
||||
this.dateConfig.locale = lang;
|
||||
}
|
||||
}
|
||||
|
||||
this.setSortedCountries();
|
||||
},
|
||||
|
||||
computed: {
|
||||
sortedCountries() {
|
||||
this.sorted_countries.sort(this.sortBy('value'));
|
||||
|
||||
return this.sorted_countries;
|
||||
data() {
|
||||
return {
|
||||
active: 0,
|
||||
logo: [],
|
||||
real_date: "",
|
||||
lang_data: '',
|
||||
sorted_countries: [],
|
||||
button_loading_company: false
|
||||
};
|
||||
},
|
||||
},
|
||||
|
||||
mounted() {
|
||||
let company_data = this.company;
|
||||
created() {
|
||||
if (document.documentElement.lang) {
|
||||
let lang_split = document.documentElement.lang.split("-");
|
||||
|
||||
this.onDataWatch(company_data);
|
||||
},
|
||||
if (lang_split[0] !== 'en') {
|
||||
const lang = require(`flatpickr/dist/l10n/${lang_split[0]}.js`).default[lang_split[0]];
|
||||
|
||||
methods: {
|
||||
sortBy(option) {
|
||||
return (firstEl, secondEl) => {
|
||||
let first_element = firstEl[option].toUpperCase(); // ignore upper and lowercase
|
||||
let second_element = secondEl[option].toUpperCase(); // ignore upper and lowercase
|
||||
|
||||
if (first_element < second_element) {
|
||||
return -1;
|
||||
this.dateConfig.locale = lang;
|
||||
}
|
||||
|
||||
if (first_element > second_element) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
// names must be equal
|
||||
return 0;
|
||||
}
|
||||
|
||||
this.setSortedCountries();
|
||||
},
|
||||
|
||||
setSortedCountries() {
|
||||
// Reset sorted_countries
|
||||
this.sorted_countries = [];
|
||||
computed: {
|
||||
sortedCountries() {
|
||||
this.sorted_countries.sort(this.sortBy('value'));
|
||||
|
||||
let created_options = this.countries;
|
||||
return this.sorted_countries;
|
||||
},
|
||||
},
|
||||
|
||||
// Option set sort_option data
|
||||
if (!Array.isArray(created_options)) {
|
||||
for (const [key, value] of Object.entries(created_options)) {
|
||||
this.sorted_countries.push({
|
||||
key: key.toString(),
|
||||
value: value
|
||||
mounted() {
|
||||
let company_data = this.company;
|
||||
|
||||
this.onDataWatch(company_data);
|
||||
},
|
||||
|
||||
methods: {
|
||||
sortBy(option) {
|
||||
return (firstEl, secondEl) => {
|
||||
let first_element = firstEl[option].toUpperCase(); // ignore upper and lowercase
|
||||
let second_element = secondEl[option].toUpperCase(); // ignore upper and lowercase
|
||||
|
||||
if (first_element < second_element) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (first_element > second_element) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
// names must be equal
|
||||
return 0;
|
||||
}
|
||||
},
|
||||
|
||||
setSortedCountries() {
|
||||
// Reset sorted_countries
|
||||
this.sorted_countries = [];
|
||||
|
||||
let created_options = this.countries;
|
||||
|
||||
// Option set sort_option data
|
||||
if (!Array.isArray(created_options)) {
|
||||
for (const [key, value] of Object.entries(created_options)) {
|
||||
this.sorted_countries.push({
|
||||
key: key.toString(),
|
||||
value: value
|
||||
});
|
||||
}
|
||||
} else {
|
||||
created_options.forEach(function (option, index) {
|
||||
if (typeof(option) == 'string') {
|
||||
this.sorted_countries.push({
|
||||
index: index,
|
||||
key: index.toString(),
|
||||
value: option
|
||||
});
|
||||
} else {
|
||||
this.sorted_countries.push({
|
||||
index: index,
|
||||
key: option.id.toString(),
|
||||
value: (option.title) ? option.title : (option.display_name) ? option.display_name : option.name
|
||||
});
|
||||
}
|
||||
}, this);
|
||||
}
|
||||
},
|
||||
|
||||
onDataWatch(company) {
|
||||
if (Object.keys(company).length) {
|
||||
if (company.logo) {
|
||||
let logo_arr = [{
|
||||
id: company.logo.id,
|
||||
name: company.logo.filename + "." + company.logo.extension,
|
||||
path: company.logo.path,
|
||||
type: company.logo.mime_type,
|
||||
size: company.logo.size,
|
||||
downloadPath: false,
|
||||
}];
|
||||
|
||||
this.logo.push(logo_arr);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
onEditSave(event) {
|
||||
event.preventDefault();
|
||||
|
||||
this.button_loading_company = true;
|
||||
|
||||
FormData.prototype.appendRecursive = function (data, wrapper = null) {
|
||||
for (var name in data) {
|
||||
if (name == "previewElement" || name == "previewTemplate") {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (wrapper) {
|
||||
if (
|
||||
(typeof data[name] == "object" || Array.isArray(data[name])) &&
|
||||
data[name] instanceof File != true &&
|
||||
data[name] instanceof Blob != true
|
||||
) {
|
||||
this.appendRecursive(data[name], wrapper + "[" + name + "]");
|
||||
} else {
|
||||
this.append(wrapper + "[" + name + "]", data[name]);
|
||||
}
|
||||
} else {
|
||||
if (
|
||||
(typeof data[name] == "object" || Array.isArray(data[name])) &&
|
||||
data[name] instanceof File != true &&
|
||||
data[name] instanceof Blob != true
|
||||
) {
|
||||
this.appendRecursive(data[name], name);
|
||||
} else {
|
||||
this.append(name, data[name]);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const formData = new FormData(this.$refs["form"]);
|
||||
|
||||
let data_name = {};
|
||||
|
||||
for (let [key, val] of formData.entries()) {
|
||||
Object.assign(data_name, {
|
||||
[key]: val,
|
||||
});
|
||||
}
|
||||
} else {
|
||||
created_options.forEach(function (option, index) {
|
||||
if (typeof(option) == 'string') {
|
||||
this.sorted_countries.push({
|
||||
index: index,
|
||||
key: index.toString(),
|
||||
value: option
|
||||
});
|
||||
} else {
|
||||
this.sorted_countries.push({
|
||||
index: index,
|
||||
key: option.id.toString(),
|
||||
value: (option.title) ? option.title : (option.display_name) ? option.display_name : option.name
|
||||
});
|
||||
}
|
||||
}, this);
|
||||
}
|
||||
},
|
||||
|
||||
onDataWatch(company) {
|
||||
if (Object.keys(company).length) {
|
||||
if (company.logo) {
|
||||
let logo_arr = [{
|
||||
id: company.logo.id,
|
||||
name: company.logo.filename + "." + company.logo.extension,
|
||||
path: company.logo.path,
|
||||
type: company.logo.mime_type,
|
||||
size: company.logo.size,
|
||||
downloadPath: false,
|
||||
}];
|
||||
let logo = '';
|
||||
|
||||
this.logo.push(logo_arr);
|
||||
if (this.$refs.dropzoneWizard.files[1]) {
|
||||
logo = this.$refs.dropzoneWizard.files[1];
|
||||
} else if (this.$refs.dropzoneWizard.files[0]) {
|
||||
logo = this.$refs.dropzoneWizard.files[0];
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
onEditSave(event) {
|
||||
event.preventDefault();
|
||||
|
||||
this.button_loading_company = true;
|
||||
|
||||
FormData.prototype.appendRecursive = function (data, wrapper = null) {
|
||||
for (var name in data) {
|
||||
if (name == "previewElement" || name == "previewTemplate") {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (wrapper) {
|
||||
if (
|
||||
(typeof data[name] == "object" || Array.isArray(data[name])) &&
|
||||
data[name] instanceof File != true &&
|
||||
data[name] instanceof Blob != true
|
||||
) {
|
||||
this.appendRecursive(data[name], wrapper + "[" + name + "]");
|
||||
} else {
|
||||
this.append(wrapper + "[" + name + "]", data[name]);
|
||||
}
|
||||
} else {
|
||||
if (
|
||||
(typeof data[name] == "object" || Array.isArray(data[name])) &&
|
||||
data[name] instanceof File != true &&
|
||||
data[name] instanceof Blob != true
|
||||
) {
|
||||
this.appendRecursive(data[name], name);
|
||||
} else {
|
||||
this.append(name, data[name]);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const formData = new FormData(this.$refs["form"]);
|
||||
|
||||
let data_name = {};
|
||||
|
||||
for (let [key, val] of formData.entries()) {
|
||||
Object.assign(data_name, {
|
||||
[key]: val,
|
||||
["logo"]: logo,
|
||||
["_prefix"]: "company",
|
||||
["_token"]: window.Laravel.csrfToken,
|
||||
["_method"]: "POST",
|
||||
});
|
||||
}
|
||||
|
||||
let logo = '';
|
||||
formData.appendRecursive(data_name);
|
||||
|
||||
if (this.$refs.dropzoneWizard.files[1]) {
|
||||
logo = this.$refs.dropzoneWizard.files[1];
|
||||
} else if (this.$refs.dropzoneWizard.files[0]) {
|
||||
logo = this.$refs.dropzoneWizard.files[0];
|
||||
}
|
||||
this.company.financial_start = data_name.financial_start;
|
||||
|
||||
Object.assign(data_name, {
|
||||
["logo"]: logo,
|
||||
["_prefix"]: "company",
|
||||
["_token"]: window.Laravel.csrfToken,
|
||||
["_method"]: "POST",
|
||||
});
|
||||
window.axios({
|
||||
method: "POST",
|
||||
url: url + "/wizard/companies",
|
||||
data: formData,
|
||||
headers: {
|
||||
"X-CSRF-TOKEN": window.Laravel.csrfToken,
|
||||
"X-Requested-With": "XMLHttpRequest",
|
||||
"Content-Type": "multipart/form-data",
|
||||
},
|
||||
})
|
||||
.then((response) => {
|
||||
this.onSuccessMessage(response);
|
||||
|
||||
formData.appendRecursive(data_name);
|
||||
this.$router.push("/wizard/currencies");
|
||||
this.button_loading_company = false;
|
||||
}, this)
|
||||
.catch((error) => {
|
||||
this.onFailError(error);
|
||||
this.button_loading_company = false;
|
||||
}, this);
|
||||
},
|
||||
|
||||
this.company.financial_start = data_name.financial_start;
|
||||
|
||||
window.axios({
|
||||
method: "POST",
|
||||
url: url + "/wizard/companies",
|
||||
data: formData,
|
||||
headers: {
|
||||
"X-CSRF-TOKEN": window.Laravel.csrfToken,
|
||||
"X-Requested-With": "XMLHttpRequest",
|
||||
"Content-Type": "multipart/form-data",
|
||||
},
|
||||
})
|
||||
.then((response) => {
|
||||
this.onSuccessMessage(response);
|
||||
next() {
|
||||
if (this.active++ > 2);
|
||||
|
||||
this.$router.push("/wizard/currencies");
|
||||
this.button_loading_company = false;
|
||||
}, this)
|
||||
.catch((error) => {
|
||||
this.onFailError(error);
|
||||
this.button_loading_company = false;
|
||||
}, this);
|
||||
},
|
||||
},
|
||||
|
||||
next() {
|
||||
if (this.active++ > 2);
|
||||
|
||||
this.$router.push("/wizard/currencies");
|
||||
watch: {
|
||||
company: function (company) {
|
||||
this.onDataWatch(company);
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
watch: {
|
||||
company: function (company) {
|
||||
this.onDataWatch(company);
|
||||
},
|
||||
},
|
||||
};
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
<div class="overflow-x-visible menu-scroll mt-1">
|
||||
<form ref="form" class="py-2 align-middle inline-block min-w-full">
|
||||
<table id="tbl-currencies" class="min-w-full divide-y divide-gray-200">
|
||||
<table v-if="currencies.length" id="tbl-currencies" class="min-w-full divide-y divide-gray-200">
|
||||
<thead>
|
||||
<tr class="flex items-center px-1">
|
||||
<th class="w-4/12 ltr:pr-6 rtl:pl-6 py-3 ltr:text-left rtl:text-right text-sm font-bold text-black tracking-wider">
|
||||
@@ -29,11 +29,30 @@
|
||||
<tbody data-table-body>
|
||||
<tr v-for="(item, index) in currencies" :key="index" data-table-list class="relative flex items-center border-b hover:bg-gray-100 px-1 flex-wrap group">
|
||||
<td :class="current_tab == index ? 'hidden' : ''" class="w-4/12 ltr:pr-6 rtl:pl-6 py-4 ltr:text-left rtl:text-right whitespace-nowrap text-sm font-medium text-black">
|
||||
{{ item.name }}
|
||||
{{ item.name }}
|
||||
|
||||
<span v-if="item.default" class="cursor-pointer">
|
||||
<span class="relative auto" data-tooltip-target="wizard-currency-default" data-tooltip-placement="right">
|
||||
<span class="material-icons-round text-purple text-sm ml-2">lock</span>
|
||||
</span>
|
||||
|
||||
<div id="wizard-currency-default" role="tooltip"
|
||||
class="inline-block absolute z-20 py-1 px-2 text-sm font-medium rounded-lg bg-white text-gray-900 w-auto border border-gray-200 shadow-sm tooltip-content whitespace-normal opacity-0 invisible"
|
||||
>
|
||||
{{ translations.currencies.default }}
|
||||
<div
|
||||
class="absolute w-2 h-2 before:absolute before:w-2 before:h-2 before:bg-white before:border-gray-200 before:transform before:rotate-45 before:border -left-1 before:border-t-0 before:border-r-0 border-gray-200"
|
||||
data-popper-arrow
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</span>
|
||||
</td>
|
||||
|
||||
<td :class="current_tab == index ? 'hidden' : ''" class="w-4/12 ltr:pr-6 rtl:pl-6 py-4 text-center whitespace-nowrap text-sm font-medium text-black">
|
||||
{{ item.code }}
|
||||
</td>
|
||||
|
||||
<td :class="current_tab == index ? 'hidden' : ''" class="w-4/12 relative ltr:pr-6 rtl:pl-6 py-4 ltr:text-right rtl:text-left whitespace-nowrap text-sm font-medium text-black">
|
||||
{{ item.rate }}
|
||||
|
||||
@@ -59,14 +78,14 @@
|
||||
</td>
|
||||
|
||||
<td class="w-full p-0 current-tab" v-if="current_tab == index">
|
||||
<div class="grid sm:grid-cols-6 gap-x-8 gap-y-6 py-3">
|
||||
<base-input name="name" data-name="name"
|
||||
form-classes="sm:col-span-2"
|
||||
<div class="grid sm:grid-cols-12 gap-x-8 gap-y-6 py-3">
|
||||
<base-input :label="translations.currencies.name" name="name" data-name="name"
|
||||
form-classes="sm:col-span-4"
|
||||
v-model="model.name"
|
||||
:error="onFailErrorGet('name')"
|
||||
/>
|
||||
|
||||
<base-input class="sm:col-span-2" :error="onFailErrorGet('code')">
|
||||
<base-input :label="translations.currencies.code" class="sm:col-span-3" :error="onFailErrorGet('code')">
|
||||
<el-select name="code" v-model="model.select" @change="onChangeCodeItem(model.select)" filterable>
|
||||
<el-option
|
||||
v-for="option in currency_codes"
|
||||
@@ -78,24 +97,46 @@
|
||||
</el-select>
|
||||
</base-input>
|
||||
|
||||
<base-input name="rate" data-name="rate" :placeholder="translations.currencies.rate"
|
||||
form-classes="sm:col-span-2"
|
||||
<base-input :label="translations.currencies.rate" name="rate" data-name="rate" :placeholder="translations.currencies.rate"
|
||||
form-classes="sm:col-span-3"
|
||||
v-model="model.rate"
|
||||
:error="onFailErrorGet('rate')"
|
||||
:disabled="model.default_currency == 1"
|
||||
/>
|
||||
|
||||
<div class="flex justify-end items-center sm:col-span-6">
|
||||
<base-button class=" flex items-center justify-center px-6 py-1.5 text-base rounded-lg bg-transparent hover:bg-gray-100 ltr:mr-2 rtl:ml-2" @click="onCancelItem()">
|
||||
<base-input :label="translations.currencies.default" class="sm:col-span-2" :error="onFailErrorGet('default_currency')">
|
||||
<div class="flex items-center mt-1">
|
||||
<label class="relative w-10 rounded-tl-lg rounded-bl-lg py-2 px-1 text-sm text-center transition-all cursor-pointer" @click="onChangeDefault(1)" v-bind:class="[model.default_currency == 1 ? ['bg-green-500','text-white'] : 'bg-black-100']">
|
||||
Yes
|
||||
<input type="radio" name="default_currency" id="default-1" class="absolute left-0 opacity-0">
|
||||
</label>
|
||||
|
||||
<label class="relative w-10 rounded-tr-lg rounded-br-lg py-2 px-1 text-sm text-center transition-all cursor-pointer" @click="onChangeDefault(0)" v-bind:class="[model.default_currency == 0 ? ['bg-red-500','text-white'] : 'bg-black-100']">
|
||||
No
|
||||
<input type="radio" name="default_currency" id="default-0" class="absolute left-0 opacity-0">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="default_currency" value="0" v-model="model.default_currency" />
|
||||
</base-input>
|
||||
|
||||
<div class="flex justify-end items-center sm:col-span-12">
|
||||
<base-button class="flex items-center justify-center px-6 py-1.5 text-base rounded-lg bg-transparent hover:bg-gray-100 ltr:mr-2 rtl:ml-2" @click="onCancelItem()">
|
||||
{{ translations.currencies.cancel }}
|
||||
</base-button>
|
||||
|
||||
<button
|
||||
type="submit"
|
||||
:disabled="button_loading"
|
||||
class="relative flex items-center justify-center bg-green hover:bg-green-700 text-white px-6 py-1.5 text-base rounded-lg disabled:bg-green-100"
|
||||
:disabled="button_loading"
|
||||
@click="onEditForm(item, $event)"
|
||||
>
|
||||
<i v-if="button_loading" class="animate-submit delay-[0.28s] absolute w-2 h-2 rounded-full left-0 right-0 -top-3.5 m-auto before:absolute before:w-2 before:h-2 before:rounded-full before:animate-submit before:delay-[0.14s] after:absolute after:w-2 after:h-2 after:rounded-full after:animate-submit before:-left-3.5 after:-right-3.5 after:delay-[0.42s]"></i>
|
||||
<i
|
||||
class="animate-submit delay-[0.28s] absolute w-2 h-2 rounded-full left-0 right-0 -top-3.5 m-auto before:absolute before:w-2 before:h-2 before:rounded-full before:animate-submit before:delay-[0.14s]after:absolute after:w-2 after:h-2 after:rounded-full after:animate-submit before:-left-3.5 after:-right-3.5 after:delay-[0.42s]"
|
||||
v-if="button_loading"
|
||||
>
|
||||
</i>
|
||||
|
||||
<span :class="[{'opacity-0': button_loading}]">
|
||||
{{ translations.currencies.save }}
|
||||
</span>
|
||||
@@ -106,54 +147,57 @@
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="flex flex-col items-center">
|
||||
<div v-if="!currencies.length" class="flex flex-col items-center gap-y-2">
|
||||
<span class="text-dark">
|
||||
{{ translations.currencies.no_currency }}
|
||||
</span>
|
||||
|
||||
<span class="text-gray-700">
|
||||
{{ translations.currencies.create_currency }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div v-if="currencies.length" class="w-full border-b hover:bg-gray-100" style="height:53px;">
|
||||
<button type="button" class="w-full h-full flex items-center justify-center text-purple font-medium disabled:bg-gray-200" @click="onAddItem()">
|
||||
<span class="material-icons-outlined text-base font-bold ltr:mr-1 rtl:ml-1">add</span>
|
||||
<span class="bg-no-repeat bg-0-2 bg-0-full hover:bg-full-2 bg-gradient-to-b from-transparent to-purple transition-backgroundSize">{{ translations.currencies.new_currency }}</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<button v-else type="button" class="relative flex items-center justify-center bg-green hover:bg-green-700 text-white px-6 py-1.5 text-base rounded-lg disabled:bg-green-100 mt-3" @click="onAddItem()">
|
||||
{{ translations.currencies.new_currency }}
|
||||
</button>
|
||||
|
||||
<div v-if="new_datas" class="grid sm:grid-cols-7 gap-x-8 gap-y-6 my-3.5 w-full">
|
||||
<base-input :label="translations.currencies.name" name="name" data-name="name" :placeholder="translations.currencies.name"
|
||||
class="sm:col-span-3"
|
||||
v-model="model.name"
|
||||
:error="onFailErrorGet('name')"
|
||||
<div v-if="new_datas" class="grid sm:grid-cols-12 gap-x-8 gap-y-6 px-1 py-3.5 w-full border-b hover:bg-gray-100">
|
||||
<base-input :label="translations.currencies.name"
|
||||
name="name"
|
||||
data-name="name"
|
||||
:placeholder="translations.currencies.name"
|
||||
class="sm:col-span-4"
|
||||
v-model="model.name"
|
||||
:error="onFailErrorGet('name')"
|
||||
/>
|
||||
|
||||
<base-input :label="translations.currencies.code" class="sm:col-span-2" :error="onFailErrorGet('code')">
|
||||
<base-input :label="translations.currencies.code" class="sm:col-span-3" :error="onFailErrorGet('code')">
|
||||
<el-select name="code" v-model="model.select" @change="onChangeCodeItem(model.select)"filterable>
|
||||
<el-option
|
||||
v-for="option in currency_codes"
|
||||
:key="option"
|
||||
:label="option"
|
||||
:value="option"
|
||||
v-for="option in currency_codes"
|
||||
:key="option"
|
||||
:label="option"
|
||||
:value="option"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</base-input>
|
||||
|
||||
<base-input :label="translations.currencies.rate" name="rate" data-name="rate" :placeholder="translations.currencies.rate"
|
||||
class="sm:col-span-2"
|
||||
v-model="model.rate"
|
||||
:error="onFailErrorGet('rate')"
|
||||
<base-input :label="translations.currencies.rate"
|
||||
name="rate"
|
||||
data-name="rate"
|
||||
:placeholder="translations.currencies.rate"
|
||||
class="sm:col-span-3"
|
||||
v-model="model.rate"
|
||||
:disabled="model.default_currency == 1"
|
||||
:error="onFailErrorGet('rate')"
|
||||
/>
|
||||
|
||||
<div class="flex items-center justify-end sm:col-span-7">
|
||||
<base-input :label="translations.currencies.default" class="sm:col-span-2" :error="onFailErrorGet('default_currency')">
|
||||
<div class="flex items-center mt-1">
|
||||
<label class="relative w-10 rounded-tl-lg rounded-bl-lg py-2 px-1 text-sm text-center transition-all cursor-pointer" @click="onChangeDefault(1)" v-bind:class="[model.default_currency == 1 ? ['bg-green-500','text-white'] : 'bg-black-100']">
|
||||
Yes
|
||||
<input type="radio" name="default_currency" id="default-1" class="absolute left-0 opacity-0">
|
||||
</label>
|
||||
|
||||
<label class="relative w-10 rounded-tr-lg rounded-br-lg py-2 px-1 text-sm text-center transition-all cursor-pointer" @click="onChangeDefault(0)" v-bind:class="[model.default_currency == 0 ? ['bg-red-500','text-white'] : 'bg-black-100']">
|
||||
No
|
||||
<input type="radio" name="default_currency" id="default-0" class="absolute left-0 opacity-0">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="default_currency" value="0" v-model="model.default_currency" />
|
||||
</base-input>
|
||||
|
||||
<div class="flex items-center justify-end sm:col-span-12">
|
||||
<base-button class=" flex items-center justify-center px-6 py-1.5 text-base rounded-lg bg-transparent hover:bg-gray-100 ltr:mr-2 rtl:ml-2" @click="new_datas = false">
|
||||
{{ translations.currencies.cancel }}
|
||||
</base-button>
|
||||
@@ -166,167 +210,212 @@
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="! currencies.length && ! new_datas" class="flex flex-col items-center gap-y-2">
|
||||
<span class="text-dark">
|
||||
{{ translations.currencies.no_currency }}
|
||||
</span>
|
||||
|
||||
<span class="text-gray-700">
|
||||
{{ translations.currencies.create_currency }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<button v-if="! currencies.length && ! new_datas" type="button" class="relative flex items-center justify-center bg-green hover:bg-green-700 text-white px-6 py-1.5 text-base rounded-lg disabled:bg-green-100 mt-3" @click="onAddItem()">
|
||||
{{ translations.currencies.new_currency }}
|
||||
</button>
|
||||
|
||||
<div v-if="currencies.length && ! new_datas" class="w-full border-b hover:bg-gray-100" style="height:53px;">
|
||||
<button type="button" class="w-full h-full flex items-center justify-center text-purple font-medium disabled:bg-gray-200" @click="onAddItem()">
|
||||
<span class="material-icons-outlined text-base font-bold ltr:mr-1 rtl:ml-1">add</span>
|
||||
<span class="bg-no-repeat bg-0-2 bg-0-full hover:bg-full-2 bg-gradient-to-b from-transparent to-purple transition-backgroundSize">{{ translations.currencies.new_currency }}</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="flex items-center justify-center mt-5 gap-x-10">
|
||||
<base-button class="w-1/2 flex items-center justify-center px-6 py-1.5 text-base rounded-lg bg-transparent hover:bg-gray-100" @click="prev()">
|
||||
{{ translations.currencies.previous }}
|
||||
</base-button>
|
||||
<base-button class="w-1/2 flex items-center justify-center px-6 py-1.5 text-base rounded-lg bg-transparent hover:bg-gray-100" @click="prev()">
|
||||
{{ translations.currencies.previous }}
|
||||
</base-button>
|
||||
|
||||
<base-button class="w-1/2 relative flex items-center justify-center bg-green hover:bg-green-700 text-white px-6 py-1.5 text-base rounded-lg disabled:bg-green-100" @click="next()">
|
||||
{{translations.currencies.next}}
|
||||
</base-button>
|
||||
<base-button class="w-1/2 relative flex items-center justify-center bg-green hover:bg-green-700 text-white px-6 py-1.5 text-base rounded-lg disabled:bg-green-100" @click="next()">
|
||||
{{ translations.currencies.next }}
|
||||
</base-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<notifications></notifications>
|
||||
|
||||
<form id="form-dynamic-component" method="POST" action="#"></form>
|
||||
|
||||
<component v-bind:is="component" @deleted="onDeleteCurrency($event)"></component>
|
||||
|
||||
<notifications></notifications>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Select, Option } from "element-ui";
|
||||
import AkauntingRadioGroup from "./../../components/AkauntingRadioGroup";
|
||||
import BulkAction from "./../../plugins/bulk-action";
|
||||
import MixinsGlobal from "./../../mixins/global";
|
||||
import WizardAction from "./../../mixins/wizardAction";
|
||||
import WizardSteps from "./Steps.vue";
|
||||
import { Select, Option } from "element-ui";
|
||||
import AkauntingRadioGroup from "./../../components/AkauntingRadioGroup";
|
||||
import BulkAction from "./../../plugins/bulk-action";
|
||||
import MixinsGlobal from "./../../mixins/global";
|
||||
import WizardAction from "./../../mixins/wizardAction";
|
||||
import WizardSteps from "./Steps.vue";
|
||||
|
||||
export default {
|
||||
name: "Currencies",
|
||||
export default {
|
||||
name: "Currencies",
|
||||
|
||||
mixins: [MixinsGlobal, WizardAction],
|
||||
mixins: [
|
||||
MixinsGlobal,
|
||||
WizardAction
|
||||
],
|
||||
|
||||
components: {
|
||||
[Select.name]: Select,
|
||||
[Option.name]: Option,
|
||||
AkauntingRadioGroup,
|
||||
WizardSteps
|
||||
},
|
||||
|
||||
props: {
|
||||
currencies: {
|
||||
type: [Object, Array],
|
||||
components: {
|
||||
[Select.name]: Select,
|
||||
[Option.name]: Option,
|
||||
AkauntingRadioGroup,
|
||||
WizardSteps
|
||||
},
|
||||
|
||||
currency_codes: {
|
||||
type: [Object, Array],
|
||||
},
|
||||
props: {
|
||||
currencies: {
|
||||
type: [Object, Array],
|
||||
},
|
||||
|
||||
translations: {
|
||||
type: [Object, Array],
|
||||
},
|
||||
currency_codes: {
|
||||
type: [Object, Array],
|
||||
},
|
||||
|
||||
pageLoad: {
|
||||
type: [Boolean, String]
|
||||
}
|
||||
},
|
||||
translations: {
|
||||
type: [Object, Array],
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
active: 1,
|
||||
bulk_action: new BulkAction(url + "/settings/currencies"),
|
||||
};
|
||||
},
|
||||
|
||||
methods: {
|
||||
onClickDelete(item) {
|
||||
this.confirmDelete(
|
||||
`${
|
||||
new URL(url).protocol +
|
||||
"//" +
|
||||
location.host +
|
||||
location.pathname +
|
||||
"/" +
|
||||
item.id
|
||||
}`,
|
||||
this.translations.currencies.title,
|
||||
`Confirm Delete <strong>${item.name}</strong> ${this.translations.currencies.title}?`,
|
||||
this.translations.currencies.cancel,
|
||||
this.translations.currencies.delete
|
||||
);
|
||||
},
|
||||
|
||||
onDeleteCurrency(event) {
|
||||
this.onEjetItem(event, this.currencies, event.currency_id);
|
||||
},
|
||||
|
||||
onChangeCodeItem(code) {
|
||||
const formData = new FormData(this.$refs["form"]);
|
||||
const data = {
|
||||
rate: "",
|
||||
precision: "",
|
||||
symbol: "",
|
||||
symbol_first: "",
|
||||
decimal_mark: "",
|
||||
thousands_separator: "",
|
||||
};
|
||||
|
||||
for (let [key, val] of formData.entries()) {
|
||||
Object.assign(data, {
|
||||
[key]: val,
|
||||
});
|
||||
pageLoad: {
|
||||
type: [Boolean, String]
|
||||
}
|
||||
|
||||
window.axios({
|
||||
method: "GET",
|
||||
url: url + "/settings/currencies/config",
|
||||
params: {
|
||||
code: code,
|
||||
},
|
||||
})
|
||||
.then((response) => {
|
||||
data.rate = response.data.rate;
|
||||
data.precision = response.data.precision;
|
||||
data.symbol = response.data.symbol;
|
||||
data.symbol_first = response.data.symbol_first;
|
||||
data.decimal_mark = response.data.decimal_mark;
|
||||
data.thousands_separator = response.data.thousands_separator;
|
||||
|
||||
this.model.rate = response.data.rate;
|
||||
}, this);
|
||||
},
|
||||
|
||||
onEditForm(item, event) {
|
||||
event.preventDefault();
|
||||
|
||||
this.onSubmitEvent(
|
||||
"PATCH",
|
||||
url + "/wizard/currencies/" + item.id,
|
||||
"",
|
||||
this.currencies,
|
||||
item.id
|
||||
);
|
||||
data() {
|
||||
return {
|
||||
active: 1,
|
||||
empty: false,
|
||||
};
|
||||
},
|
||||
|
||||
onSubmitForm(event) {
|
||||
event.preventDefault();
|
||||
|
||||
this.onSubmitEvent(
|
||||
"POST",
|
||||
url + "/wizard/currencies",
|
||||
"",
|
||||
this.currencies
|
||||
);
|
||||
created() {
|
||||
this.empty = ! this.currencies.length;
|
||||
},
|
||||
|
||||
prev() {
|
||||
if (this.active-- > 2);
|
||||
//history.back()
|
||||
methods: {
|
||||
onClickDelete(item) {
|
||||
this.confirmDelete(
|
||||
`${
|
||||
new URL(url).protocol +
|
||||
"//" +
|
||||
location.host +
|
||||
location.pathname +
|
||||
"/" +
|
||||
item.id
|
||||
}`,
|
||||
this.translations.currencies.title,
|
||||
`Confirm Delete <strong>${item.name}</strong> ${this.translations.currencies.title}?`,
|
||||
this.translations.currencies.cancel,
|
||||
this.translations.currencies.delete
|
||||
);
|
||||
},
|
||||
|
||||
this.$router.push("/wizard/companies");
|
||||
onDeleteCurrency(event) {
|
||||
this.empty = this.currencies.length;
|
||||
|
||||
if (event.success) {
|
||||
this.onEjetItem(event, this.currencies, event.currency_id);
|
||||
|
||||
this.empty = ! this.currencies.length;
|
||||
} else {
|
||||
this.component = "";
|
||||
event.important = true;
|
||||
document.body.classList.remove("overflow-hidden");
|
||||
|
||||
this.onDeleteItemMessage(event);
|
||||
}
|
||||
},
|
||||
|
||||
onChangeDefault(value) {
|
||||
this.model.rate = 1;
|
||||
this.model.default_currency = value;
|
||||
},
|
||||
|
||||
onChangeCodeItem(code) {
|
||||
const formData = new FormData(this.$refs["form"]);
|
||||
const data = {
|
||||
rate: "",
|
||||
precision: "",
|
||||
symbol: "",
|
||||
symbol_first: "",
|
||||
decimal_mark: "",
|
||||
thousands_separator: "",
|
||||
};
|
||||
|
||||
for (let [key, val] of formData.entries()) {
|
||||
Object.assign(data, {
|
||||
[key]: val,
|
||||
});
|
||||
}
|
||||
|
||||
window.axios({
|
||||
method: "GET",
|
||||
url: url + "/settings/currencies/config",
|
||||
params: {
|
||||
code: code,
|
||||
},
|
||||
})
|
||||
.then((response) => {
|
||||
data.rate = response.data.rate;
|
||||
data.precision = response.data.precision;
|
||||
data.symbol = response.data.symbol;
|
||||
data.symbol_first = response.data.symbol_first;
|
||||
data.decimal_mark = response.data.decimal_mark;
|
||||
data.thousands_separator = response.data.thousands_separator;
|
||||
|
||||
this.model.rate = response.data.rate;
|
||||
}, this);
|
||||
},
|
||||
|
||||
onEditForm(item, event) {
|
||||
event.preventDefault();
|
||||
|
||||
this.onSubmitEvent(
|
||||
"PATCH",
|
||||
url + "/wizard/currencies/" + item.id,
|
||||
"",
|
||||
this.currencies,
|
||||
item.id
|
||||
);
|
||||
},
|
||||
|
||||
onSubmitForm(event) {
|
||||
event.preventDefault();
|
||||
|
||||
this.onSubmitEvent(
|
||||
"POST",
|
||||
url + "/wizard/currencies",
|
||||
"",
|
||||
this.currencies
|
||||
);
|
||||
},
|
||||
|
||||
prev() {
|
||||
if (this.active-- > 2);
|
||||
//history.back()
|
||||
|
||||
this.$router.push("/wizard/companies");
|
||||
},
|
||||
|
||||
next() {
|
||||
if (this.active++ > 2);
|
||||
|
||||
this.$router.push("/wizard/taxes");
|
||||
},
|
||||
},
|
||||
|
||||
next() {
|
||||
if (this.active++ > 2);
|
||||
|
||||
this.$router.push("/wizard/taxes");
|
||||
},
|
||||
},
|
||||
};
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
<x-slot name="buttons">
|
||||
@can('create-auth-users')
|
||||
<x-link href="{{ route('users.create') }}" kind="primary">
|
||||
<x-link href="{{ route('users.create') }}" kind="primary" id="index-more-actions-invite-user">
|
||||
{{ trans('general.title.invite', ['type' => trans_choice('general.users', 1)]) }}
|
||||
</x-link>
|
||||
@endcan
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
<x-slot name="buttons">
|
||||
@can('create-banking-accounts')
|
||||
<x-link href="{{ route('accounts.create') }}" kind="primary">
|
||||
<x-link href="{{ route('accounts.create') }}" kind="primary" id="index-more-actions-new-account">
|
||||
{{ trans('general.title.new', ['type' => trans_choice('general.accounts', 1)]) }}
|
||||
</x-link>
|
||||
@endcan
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<x-slot name="buttons">
|
||||
@stack('create_button_start')
|
||||
|
||||
<x-dropdown id="dropdown-new-actions">
|
||||
<x-dropdown id="show-new-actions-account">
|
||||
<x-slot name="trigger" class="flex items-center px-3 py-1.5 mb-3 sm:mb-0 bg-green hover:bg-green-700 rounded-xl text-white text-sm font-bold leading-6" override="class">
|
||||
{{ trans('general.new_more') }}
|
||||
<span class="material-icons ltr:ml-2 rtl:mr-2">expand_more</span>
|
||||
@@ -33,7 +33,7 @@
|
||||
@stack('income_button_start')
|
||||
|
||||
@can('create-banking-transactions')
|
||||
<x-dropdown.link href="{{ route('accounts.create-income', $account->id) }}">
|
||||
<x-dropdown.link href="{{ route('accounts.create-income', $account->id) }}" id="show-more-actions-new-income-account">
|
||||
{{ trans_choice('general.incomes', 1) }}
|
||||
</x-dropdown.link>
|
||||
@endcan
|
||||
@@ -41,7 +41,7 @@
|
||||
@stack('expense_button_start')
|
||||
|
||||
@can('create-banking-transactions')
|
||||
<x-dropdown.link href="{{ route('accounts.create-expense', $account->id) }}">
|
||||
<x-dropdown.link href="{{ route('accounts.create-expense', $account->id) }}" id="show-more-actions-new-expense-account">
|
||||
{{ trans_choice('general.expenses', 1) }}
|
||||
</x-dropdown.link>
|
||||
@endcan
|
||||
@@ -49,7 +49,7 @@
|
||||
@stack('transfer_button_start')
|
||||
|
||||
@can('create-banking-transfers')
|
||||
<x-dropdown.link href="{{ route('accounts.create-transfer', $account->id) }}">
|
||||
<x-dropdown.link href="{{ route('accounts.create-transfer', $account->id) }}" id="show-more-actions-new-transfer-account">
|
||||
{{ trans_choice('general.transfers', 1) }}
|
||||
</x-dropdown.link>
|
||||
@endcan
|
||||
@@ -60,7 +60,7 @@
|
||||
@stack('edit_button_start')
|
||||
|
||||
@can('update-banking-accounts')
|
||||
<x-link href="{{ route('accounts.edit', $account->id) }}">
|
||||
<x-link href="{{ route('accounts.edit', $account->id) }}" id="show-more-actions-edit-account">
|
||||
{{ trans('general.edit') }}
|
||||
</x-link>
|
||||
@endcan
|
||||
@@ -71,7 +71,7 @@
|
||||
<x-slot name="moreButtons">
|
||||
@stack('more_button_start')
|
||||
|
||||
<x-dropdown id="dropdown-more-actions">
|
||||
<x-dropdown id="show-more-actions-account">
|
||||
<x-slot name="trigger">
|
||||
<span class="material-icons">more_horiz</span>
|
||||
</x-slot>
|
||||
@@ -79,7 +79,7 @@
|
||||
@stack('see_performance_button_start')
|
||||
|
||||
@can('read-banking-accounts')
|
||||
<x-dropdown.link href="{{ route('accounts.see-performance', $account->id) }}">
|
||||
<x-dropdown.link href="{{ route('accounts.see-performance', $account->id) }}" id="show-more-actions-performance-account">
|
||||
{{ trans('accounts.see_performance') }}
|
||||
</x-dropdown.link>
|
||||
@endcan
|
||||
@@ -89,7 +89,7 @@
|
||||
@stack('duplicate_button_start')
|
||||
|
||||
@can('create-banking-accounts')
|
||||
<x-dropdown.link href="{{ route('accounts.duplicate', $account->id) }}">
|
||||
<x-dropdown.link href="{{ route('accounts.duplicate', $account->id) }}" id="show-more-actions-duplicate-account">
|
||||
{{ trans('general.duplicate') }}
|
||||
</x-dropdown.link>
|
||||
@endcan
|
||||
|
||||
@@ -81,13 +81,22 @@
|
||||
@endif
|
||||
|
||||
<x-table.td kind="amount" class="none-truncate">
|
||||
@php $type = $item->isIncome() ? 'income' : 'expense'; @endphp
|
||||
@php
|
||||
$type = $item->isIncome() ? 'income' : 'expense';
|
||||
$name = $type . '_' . $item->id;
|
||||
|
||||
$checked = $item->reconciled;
|
||||
|
||||
if (! $reconciliation->reconciled && array_key_exists($name, $reconciliation->transactions)) {
|
||||
$checked = (empty($reconciliation->transactions[$name]) || $reconciliation->transactions[$name] === 'false') ? 0 : 1;
|
||||
}
|
||||
@endphp
|
||||
|
||||
<x-form.input.checkbox name="{{ $type . '_' . $item->id }}"
|
||||
label=""
|
||||
id="transaction-{{ $item->id . '-'. $type }}"
|
||||
:value="$item->amount_for_account"
|
||||
:checked="$item->reconciled"
|
||||
:checked="$checked"
|
||||
data-field="transactions"
|
||||
v-model="form.transactions.{{ $type . '_' . $item->id }}"
|
||||
class="text-purple focus:outline-none focus:ring-purple focus:border-purple"
|
||||
@@ -248,4 +257,4 @@
|
||||
</x-slot>
|
||||
|
||||
<x-script folder="banking" file="reconciliations" />
|
||||
</x-layouts.admin>
|
||||
</x-layouts.admin>
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
<x-slot name="buttons">
|
||||
@can('create-banking-reconciliations')
|
||||
<x-link href="{{ route('reconciliations.create') }}" kind="primary">
|
||||
<x-link href="{{ route('reconciliations.create') }}" kind="primary" id="index-more-actions-new-reconciliation">
|
||||
{{ trans('general.title.new', ['type' => trans_choice('general.reconciliations', 1)]) }}
|
||||
</x-link>
|
||||
@endcan
|
||||
|
||||
@@ -11,11 +11,11 @@
|
||||
|
||||
<x-slot name="buttons">
|
||||
@can('create-banking-transactions')
|
||||
<x-link href="{{ route('recurring-transactions.create', ['type' => 'income-recurring']) }}" kind="primary">
|
||||
<x-link href="{{ route('recurring-transactions.create', ['type' => 'income-recurring']) }}" kind="primary" id="index-more-actions-new-income-recurring-transaction">
|
||||
{{ trans('general.title.new', ['type' => trans_choice('general.recurring_incomes', 1)]) }}
|
||||
</x-link>
|
||||
|
||||
<x-link href="{{ route('recurring-transactions.create', ['type' => 'expense-recurring']) }}" kind="primary">
|
||||
<x-link href="{{ route('recurring-transactions.create', ['type' => 'expense-recurring']) }}" kind="primary" id="index-more-actions-new-expense-recurring-transaction">
|
||||
{{ trans('general.title.new', ['type' => trans_choice('general.recurring_expenses', 1)]) }}
|
||||
</x-link>
|
||||
@endcan
|
||||
|
||||
@@ -11,11 +11,11 @@
|
||||
|
||||
<x-slot name="buttons">
|
||||
@can('create-banking-transactions')
|
||||
<x-link href="{{ route('transactions.create', ['type' => 'income']) }}" kind="primary">
|
||||
<x-link href="{{ route('transactions.create', ['type' => 'income']) }}" kind="primary" id="index-more-actions-new-income-transaction">
|
||||
{{ trans('general.title.new', ['type' => trans_choice('general.incomes', 1)]) }}
|
||||
</x-link>
|
||||
|
||||
<x-link href="{{ route('transactions.create', ['type' => 'expense']) }}" kind="primary">
|
||||
<x-link href="{{ route('transactions.create', ['type' => 'expense']) }}" kind="primary" id="index-more-actions-new-expense-transaction">
|
||||
{{ trans('general.title.new', ['type' => trans_choice('general.expenses', 1)]) }}
|
||||
</x-link>
|
||||
@endcan
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
<x-slot name="buttons">
|
||||
@can('create-common-companies')
|
||||
<x-link href="{{ route('companies.create') }}" kind="primary">
|
||||
<x-link href="{{ route('companies.create') }}" kind="primary" id="index-more-actions-new-company">
|
||||
{{ trans('general.title.new', ['type' => trans_choice('general.companies', 1)]) }}
|
||||
</x-link>
|
||||
@endcan
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
<x-slot name="buttons">
|
||||
@can('create-common-dashboards')
|
||||
<x-link href="{{ route('dashboards.create') }}" kind="primary">
|
||||
<x-link href="{{ route('dashboards.create') }}" kind="primary" id="index-more-actions-new-dasboard">
|
||||
{{ trans('general.title.new', ['type' => trans_choice('general.dashboards', 1)]) }}
|
||||
</x-link>
|
||||
@endcan
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<x-slot name="title">
|
||||
@if ($user_dashboards->count() > 1)
|
||||
<div class="flex items-center relative cursor-pointer">
|
||||
<x-dropdown id="dashboard-list">
|
||||
<x-dropdown id="show-dashboard-list">
|
||||
<x-slot name="trigger" class="flex items-center" override="class">
|
||||
<span class="text-2xl xl:text-5xl text-black font-light truncate">
|
||||
<x-button.hover color="to-black-700">
|
||||
@@ -20,7 +20,7 @@
|
||||
</x-slot>
|
||||
|
||||
@foreach ($user_dashboards as $user_dashboard)
|
||||
<x-dropdown.link href="{{ route('dashboards.switch', $user_dashboard->id) }}">
|
||||
<x-dropdown.link href="{{ route('dashboards.switch', $user_dashboard->id) }}" id="show-dashboard-switch-{{ $user_dashboard->id }}">
|
||||
{{ $user_dashboard->name }}
|
||||
</x-dropdown.link>
|
||||
@endforeach
|
||||
@@ -100,9 +100,9 @@
|
||||
@section('dashboard_action')
|
||||
@canany(['create-common-widgets', 'read-common-dashboards'])
|
||||
<div class="dashboard-action">
|
||||
<x-dropdown id="dropdown-dashboard-company">
|
||||
<x-dropdown id="show-more-actions-dashboard">
|
||||
<x-slot name="trigger" class="flex" override="class">
|
||||
<span id="dashboard-more-actions" class="w-8 h-8 flex items-center justify-center px-2 py-2 ltr:ml-2 rtl:mr-2 hover:bg-gray-100 rounded-xl text-purple text-sm font-medium leading-6">
|
||||
<span class="w-8 h-8 flex items-center justify-center px-2 py-2 ltr:ml-2 rtl:mr-2 hover:bg-gray-100 rounded-xl text-purple text-sm font-medium leading-6">
|
||||
<span class="material-icons">more_vert</span>
|
||||
</span>
|
||||
</x-slot>
|
||||
@@ -110,7 +110,7 @@
|
||||
@can('create-common-widgets')
|
||||
<x-button
|
||||
type="button"
|
||||
id="dashboard-add-widget"
|
||||
id="show-more-actions-add-widget"
|
||||
class="w-full flex items-center text-purple px-2 h-9 leading-9 whitespace-nowrap"
|
||||
override="class"
|
||||
title="{{ trans('general.title.add', ['type' => trans_choice('general.widgets', 1)]) }}"
|
||||
@@ -126,12 +126,12 @@
|
||||
|
||||
@can('update-common-dashboards')
|
||||
@can('create-common-dashboards')
|
||||
<x-dropdown.link href="{{ route('dashboards.create') }}">
|
||||
<x-dropdown.link href="{{ route('dashboards.create') }}" id="show-more-actions-new-dashboard">
|
||||
{{ trans('general.title.create', ['type' => trans_choice('general.dashboards', 1)]) }}
|
||||
</x-dropdown.link>
|
||||
@endcan
|
||||
|
||||
<x-dropdown.link href="{{ route('dashboards.index') }}">
|
||||
<x-dropdown.link href="{{ route('dashboards.index') }}" id="show-more-actions-manage-dashboards">
|
||||
{{ trans('general.title.manage', ['type' => trans_choice('general.dashboards', 2)]) }}
|
||||
</x-dropdown.link>
|
||||
@endcan
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
<x-slot name="buttons">
|
||||
@can('create-common-items')
|
||||
<x-link href="{{ route('items.create') }}" kind="primary">
|
||||
<x-link href="{{ route('items.create') }}" kind="primary" id="index-more-actions-new-item">
|
||||
{{ trans('general.title.new', ['type' => trans_choice('general.items', 1)]) }}
|
||||
</x-link>
|
||||
@endcan
|
||||
@@ -22,12 +22,12 @@
|
||||
</x-slot>
|
||||
|
||||
@can('create-common-items')
|
||||
<x-dropdown.link href="{{ route('import.create', ['common', 'items']) }}">
|
||||
<x-dropdown.link href="{{ route('import.create', ['common', 'items']) }}" id="index-more-actions-import-item">
|
||||
{{ trans('import.import') }}
|
||||
</x-dropdown.link>
|
||||
@endcan
|
||||
|
||||
<x-dropdown.link href="{{ route('items.export', request()->input()) }}">
|
||||
<x-dropdown.link href="{{ route('items.export', request()->input()) }}" id="index-more-actions-export-item">
|
||||
{{ trans('general.export') }}
|
||||
</x-dropdown.link>
|
||||
</x-dropdown>
|
||||
|
||||
@@ -55,10 +55,10 @@
|
||||
</div>
|
||||
|
||||
<div class="flex items-start ltr:space-x-2 rtl:space-x-reverse">
|
||||
<livewire:report.pin :categories="$categories" :report-id="$report->id" />
|
||||
<livewire:report.pin :categories="$categories" :report="$report" />
|
||||
|
||||
@canany(['create-common-reports', 'update-common-reports', 'delete-common-reports'])
|
||||
<x-dropdown id="widget-{{ $category_id }}-{{ $report->id }}">
|
||||
<x-dropdown id="index-line-actions-report-{{ $category_id }}-{{ $report->id }}">
|
||||
<x-slot name="trigger" class="flex" override="class">
|
||||
<span class="w-8 h-8 flex items-center justify-center px-2 py-2 rtl:mr-4 hover:bg-gray-100 rounded-xl text-purple text-sm font-medium leading-6">
|
||||
<span class="material-icons">more_vert</span>
|
||||
@@ -66,13 +66,13 @@
|
||||
</x-slot>
|
||||
|
||||
@can('update-common-reports')
|
||||
<x-dropdown.link href="{{ route('reports.edit', $report->id) }}">
|
||||
<x-dropdown.link href="{{ route('reports.edit', $report->id) }}" id="index-line-actions-edit-report-{{ $report->id }}">
|
||||
{{ trans('general.edit') }}
|
||||
</x-dropdown.link>
|
||||
@endcan
|
||||
|
||||
@can('create-common-reports')
|
||||
<x-dropdown.link href="{{ route('reports.duplicate', $report->id) }}">
|
||||
<x-dropdown.link href="{{ route('reports.duplicate', $report->id) }}" id="index-line-actions-duplicate-report-{{ $report->id }}">
|
||||
{{ trans('general.duplicate') }}
|
||||
</x-dropdown.link>
|
||||
@endcan
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
@if ($checkPermissionCreate)
|
||||
@can($permissionCreate)
|
||||
@if (! $hideCreate)
|
||||
<x-link href="{{ route($createRoute) }}" kind="primary">
|
||||
<x-link href="{{ route($createRoute) }}" kind="primary" id="index-more-actions-new-{{ $type }}">
|
||||
{{ trans('general.title.new', ['type' => trans_choice($textPage, 1)]) }}
|
||||
</x-link>
|
||||
@endif
|
||||
@endcan
|
||||
@else
|
||||
@if (! $hideCreate)
|
||||
<x-link href="{{ route($createRoute) }}" kind="primary">
|
||||
<x-link href="{{ route($createRoute) }}" kind="primary" id="index-more-actions-new-{{ $type }}">
|
||||
{{ trans('general.title.new', ['type' => trans_choice($textPage, 1)]) }}
|
||||
</x-link>
|
||||
@endif
|
||||
|
||||
@@ -6,21 +6,21 @@
|
||||
@if ($checkPermissionCreate)
|
||||
@can($permissionCreate)
|
||||
@if (! $hideImport)
|
||||
<x-dropdown.link href="{{ route($importRoute, $importRouteParameters) }}">
|
||||
<x-dropdown.link href="{{ route($importRoute, $importRouteParameters) }}" id="index-more-actions-import-{{ $type }}">
|
||||
{{ trans('import.import') }}
|
||||
</x-dropdown.link>
|
||||
@endif
|
||||
@endcan
|
||||
@else
|
||||
@if (! $hideImport)
|
||||
<x-dropdown.link href="{{ route($importRoute, $importRouteParameters) }}">
|
||||
<x-dropdown.link href="{{ route($importRoute, $importRouteParameters) }}" id="index-more-actions-import-{{ $type }}">
|
||||
{{ trans('import.import') }}
|
||||
</x-dropdown.link>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@if (! $hideExport)
|
||||
<x-dropdown.link href="{{ route($exportRoute, request()->input()) }}">
|
||||
<x-dropdown.link href="{{ route($exportRoute, request()->input()) }}" id="index-more-actions-export-{{ $type }}">
|
||||
{{ trans('general.export') }}
|
||||
</x-dropdown.link>
|
||||
@endif
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
@stack('new_button_start')
|
||||
|
||||
@if (! $hideNewDropdown)
|
||||
<x-dropdown id="customer-new">
|
||||
<x-dropdown id="show-new-actions-{{ $contact->type }}">
|
||||
<x-slot name="trigger" class="flex items-center px-3 py-1.5 mb-3 sm:mb-0 bg-green hover:bg-green-700 rounded-xl text-white text-sm font-bold leading-6" override="class">
|
||||
{{ trans('general.new_more') }}
|
||||
<span class="material-icons ltr:ml-2 rtl:mr-2">expand_more</span>
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
@if (! $hideButtonDocument)
|
||||
@can($permissionCreateDocument)
|
||||
<x-dropdown.link href="{{ route($routeButtonDocument, $contact->id) }}">
|
||||
<x-dropdown.link href="{{ route($routeButtonDocument, $contact->id) }}" id="show-more-actions-new-document-{{ $contact->type }}">
|
||||
{{ trans_choice($textDocument, 1) }}
|
||||
</x-dropdown.link>
|
||||
@endcan
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
@if (! $hideButtonTransaction)
|
||||
@can($permissionCreateTransaction)
|
||||
<x-dropdown.link href="{{ route($routeButtonTransaction, $contact->id) }}">
|
||||
<x-dropdown.link href="{{ route($routeButtonTransaction, $contact->id) }}" id="show-more-actions-new-transaction-{{ $contact->type }}">
|
||||
{{ trans_choice($textTransaction, 1) }}
|
||||
</x-dropdown.link>
|
||||
@endcan
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
@if (! $hideButtonEdit)
|
||||
@can($permissionUpdate)
|
||||
<x-link href="{{ route($routeButtonEdit, $contact->id) }}">
|
||||
<x-link href="{{ route($routeButtonEdit, $contact->id) }}" id="show-more-actions-edit-{{ $contact->type }}">
|
||||
{{ trans('general.edit') }}
|
||||
</x-link>
|
||||
@endcan
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
@stack('button_group_start')
|
||||
|
||||
@if (! $hideActionsDropdown)
|
||||
<x-dropdown id="dropdown-more-actions">
|
||||
<x-dropdown id="show-more-actions-{{ $contact->type }}">
|
||||
<x-slot name="trigger">
|
||||
<span class="material-icons">more_horiz</span>
|
||||
</x-slot>
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
@if (! $hideButtonDuplicate)
|
||||
@can($permissionCreate)
|
||||
<x-dropdown.link href="{{ route($routeButtonDuplicate, $contact->id) }}">
|
||||
<x-dropdown.link href="{{ route($routeButtonDuplicate, $contact->id) }}" id="show-more-actions-duplicate-{{ $contact->type }}">
|
||||
{{ trans('general.duplicate') }}
|
||||
</x-dropdown.link>
|
||||
@endcan
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
@if ($checkPermissionCreate)
|
||||
@can($permissionCreate)
|
||||
@if (! $hideCreate)
|
||||
<x-link href="{{ route($createRoute) }}" kind="primary">
|
||||
<x-link href="{{ route($createRoute) }}" kind="primary" id="index-more-actions-new-{{ $type }}">
|
||||
{{ trans('general.title.new', ['type' => trans_choice($textPage, 1)]) }}
|
||||
</x-link>
|
||||
@endif
|
||||
@endcan
|
||||
@else
|
||||
@if (! $hideCreate)
|
||||
<x-link href="{{ route($createRoute) }}" kind="primary">
|
||||
<x-link href="{{ route($createRoute) }}" kind="primary" id="index-more-actions-new-{{ $type }}">
|
||||
{{ trans('general.title.new', ['type' => trans_choice($textPage, 1)]) }}
|
||||
</x-link>
|
||||
@endif
|
||||
|
||||
@@ -6,21 +6,21 @@
|
||||
@if ($checkPermissionCreate)
|
||||
@can($permissionCreate)
|
||||
@if (! $hideImport)
|
||||
<x-dropdown.link href="{{ route($importRoute, $importRouteParameters) }}">
|
||||
<x-dropdown.link href="{{ route($importRoute, $importRouteParameters) }}" id="index-more-actions-import-{{ $type }}">
|
||||
{{ trans('import.import') }}
|
||||
</x-dropdown.link>
|
||||
@endif
|
||||
@endcan
|
||||
@else
|
||||
@if (! $hideImport)
|
||||
<x-dropdown.link href="{{ route($importRoute, $importRouteParameters) }}">
|
||||
<x-dropdown.link href="{{ route($importRoute, $importRouteParameters) }}" id="index-more-actions-import-{{ $type }}">
|
||||
{{ trans('import.import') }}
|
||||
</x-dropdown.link>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@if (! $hideExport)
|
||||
<x-dropdown.link href="{{ route($exportRoute, request()->input()) }}">
|
||||
<x-dropdown.link href="{{ route($exportRoute, request()->input()) }}" id="index-more-actions-export-{{ $type }}">
|
||||
{{ trans('general.export') }}
|
||||
</x-dropdown.link>
|
||||
@endif
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
@if (! $hideCreate)
|
||||
@can($permissionCreate)
|
||||
<x-link href="{{ route($createRoute) }}" kind="primary">
|
||||
<x-link href="{{ route($createRoute) }}" kind="primary" id="show-more-actions-new-{{ $document->type }}">
|
||||
{{ trans('general.title.new', ['type' => trans_choice($textPage, 1)]) }}
|
||||
</x-link>
|
||||
@endcan
|
||||
@@ -13,7 +13,7 @@
|
||||
@if (! in_array($document->status, $hideButtonStatuses))
|
||||
@if (! $hideEdit)
|
||||
@can($permissionUpdate)
|
||||
<x-link href="{{ route($editRoute, $document->id) }}">
|
||||
<x-link href="{{ route($editRoute, $document->id) }}" id="show-more-actions-edit-{{ $document->type }}">
|
||||
{{ trans('general.edit') }}
|
||||
</x-link>
|
||||
@endcan
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
<x-slot name="body">
|
||||
<div class="flex">
|
||||
<x-link href="{{ route($editRoute, $document->id) }}" @click="e => e.target.classList.add('disabled')">
|
||||
<x-link href="{{ route($editRoute, $document->id) }}" id="show-slider-actions-edit-{{ $document->type }}" @click="e => e.target.classList.add('disabled')">
|
||||
{{ trans('general.edit') }}
|
||||
</x-link>
|
||||
</div>
|
||||
|
||||
@@ -11,10 +11,10 @@
|
||||
@stack('timeline_get_paid_body_button_payment_start')
|
||||
|
||||
@if (! $hideAddPayment)
|
||||
@if(empty($document->transactions->count()) || (! empty($document->transactions->count()) && $document->paid != $document->amount))
|
||||
@if (empty($document->transactions->count()) || (! empty($document->transactions->count()) && $document->paid != $document->amount))
|
||||
<x-button
|
||||
@click="onPayment"
|
||||
id="button-payment"
|
||||
id="show-slider-actions-payment-{{ $document->type }}"
|
||||
class="px-3 py-1.5 mb-3 sm:mb-0 rounded-lg text-xs font-medium leading-6 bg-green hover:bg-green-700 text-white disabled:bg-green-100"
|
||||
override="class"
|
||||
>
|
||||
@@ -32,6 +32,7 @@
|
||||
'utm_medium' => 'app',
|
||||
'utm_campaign' => 'payment_method',
|
||||
]) }}"
|
||||
id="show-slider-actions-online-payment-{{ $document->type }}"
|
||||
override="class"
|
||||
class="py-1.5 mb-3 sm:mb-0 text-xs bg-transparent hover:bg-transparent font-medium leading-6"
|
||||
>
|
||||
@@ -61,7 +62,7 @@
|
||||
</br>
|
||||
|
||||
@if (! empty($transaction->contact) && $transaction->contact->email)
|
||||
<x-button id="button-email-send" class="text-purple mt-1" override="class" @click="onEmailViaTemplate('{{ route($transactionEmailRoute, $transaction->id) }}', '{{ $transactionEmailTemplate }}')">
|
||||
<x-button id="show-slider-actions-transaction-send-email-{{ $document->type }}-{{ $transaction->id }}" class="text-purple mt-1" override="class" @click="onEmailViaTemplate('{{ route($transactionEmailRoute, $transaction->id) }}', '{{ $transactionEmailTemplate }}')">
|
||||
<x-button.hover color="to-purple">
|
||||
{{ trans('general.title.send', ['type' => trans_choice('general.receipts', 1)]) }}
|
||||
</x-button.hover>
|
||||
@@ -80,7 +81,7 @@
|
||||
|
||||
<x-button
|
||||
@click="onEditPayment('{{ $transaction->id }}')"
|
||||
id="button-edit-payment"
|
||||
id="show-slider-actions-transaction-edit-{{ $document->type }}-{{ $transaction->id }}"
|
||||
class="text-purple mt-1"
|
||||
override="class"
|
||||
>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
@if(empty($document->transactions->count()) || (! empty($document->transactions->count()) && $document->paid != $document->amount))
|
||||
<x-button
|
||||
@click="onPayment"
|
||||
id="button-payment"
|
||||
id="show-slider-actions-payment-{{ $document->type }}"
|
||||
class="px-3 py-1.5 mb-3 sm:mb-0 rounded-lg text-xs font-medium leading-6 bg-green hover:bg-green-700 text-white disabled:bg-green-100"
|
||||
override="class"
|
||||
>
|
||||
@@ -45,7 +45,7 @@
|
||||
</br>
|
||||
|
||||
@if (! empty($transaction->contact) && $transaction->contact->email)
|
||||
<x-button id="button-email-send" class="text-purple mt-1" override="class" @click="onEmailViaTemplate('{{ route($transactionEmailRoute, $transaction->id) }}', '{{ $transactionEmailTemplate }}')">
|
||||
<x-button id="show-slider-actions-transaction-send-email-{{ $document->type }}-{{ $transaction->id }}" class="text-purple mt-1" override="class" @click="onEmailViaTemplate('{{ route($transactionEmailRoute, $transaction->id) }}', '{{ $transactionEmailTemplate }}')">
|
||||
<x-button.hover color="to-purple">
|
||||
{{ trans('general.title.send', ['type' => trans_choice('general.receipts', 1)]) }}
|
||||
</x-button.hover>
|
||||
@@ -64,7 +64,7 @@
|
||||
|
||||
<x-button
|
||||
@click="onEditPayment('{{ $transaction->id }}')"
|
||||
id="button-edit-payment"
|
||||
id="show-slider-actions-transaction-edit-{{ $document->type }}-{{ $transaction->id }}"
|
||||
class="text-purple mt-1"
|
||||
override="class"
|
||||
>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
@stack('button_group_start')
|
||||
|
||||
@if (! $hideMoreActions)
|
||||
<x-dropdown id="dropdown-more-actions">
|
||||
<x-dropdown id="show-more-actions-{{ $document->type }}">
|
||||
<x-slot name="trigger">
|
||||
<span class="material-icons">more_horiz</span>
|
||||
</x-slot>
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
@if (! $hideDuplicate)
|
||||
@can($permissionCreate)
|
||||
<x-dropdown.link href="{{ route($duplicateRoute, $document->id) }}">
|
||||
<x-dropdown.link href="{{ route($duplicateRoute, $document->id) }}" id="show-more-actions-duplicate-{{ $document->type }}">
|
||||
{{ trans('general.duplicate') }}
|
||||
</x-dropdown.link>
|
||||
@endcan
|
||||
@@ -27,17 +27,9 @@
|
||||
@stack('button_print_start')
|
||||
|
||||
@if (! $hidePrint)
|
||||
@if ($checkCancelled)
|
||||
@if ($document->status != 'cancelled')
|
||||
<x-dropdown.link href="{{ route($printRoute, $document->id) }}" target="_blank">
|
||||
{{ trans('general.print') }}
|
||||
</x-dropdown.link>
|
||||
@endif
|
||||
@else
|
||||
<x-dropdown.link href="{{ route($printRoute, $document->id) }}" target="_blank">
|
||||
{{ trans('general.print') }}
|
||||
</x-dropdown.link>
|
||||
@endif
|
||||
<x-dropdown.link href="{{ route($printRoute, $document->id) }}" target="_blank" id="show-more-actions-print-{{ $document->type }}">
|
||||
{{ trans('general.print') }}
|
||||
</x-dropdown.link>
|
||||
@endif
|
||||
|
||||
@stack('button_print_end')
|
||||
@@ -45,7 +37,7 @@
|
||||
@stack('button_pdf_start')
|
||||
|
||||
@if (! $hidePdf)
|
||||
<x-dropdown.link href="{{ route($pdfRoute, $document->id) }}">
|
||||
<x-dropdown.link href="{{ route($pdfRoute, $document->id) }}" id="show-more-actions-pdf-{{ $document->type }}">
|
||||
{{ trans('general.download_pdf') }}
|
||||
</x-dropdown.link>
|
||||
@endif
|
||||
@@ -61,7 +53,7 @@
|
||||
|
||||
@if (! $hideShare)
|
||||
@if ($document->status != 'cancelled')
|
||||
<x-dropdown.button @click="onShareLink('{{ route($shareRoute, $document->id) }}')">
|
||||
<x-dropdown.button id="show-more-actions-share-link-{{ $document->type }}" @click="onShareLink('{{ route($shareRoute, $document->id) }}')">
|
||||
{{ trans('general.share_link') }}
|
||||
</x-dropdown.button>
|
||||
@endif
|
||||
@@ -73,7 +65,7 @@
|
||||
|
||||
@if (! $hideEmail)
|
||||
@if ($document->contact_email)
|
||||
<x-dropdown.button @click="onEmail('{{ route($emailRoute, $document->id) }}')">
|
||||
<x-dropdown.button id="show-more-actions-send-email-{{ $document->type }}" @click="onEmail('{{ route($emailRoute, $document->id) }}')">
|
||||
{{ trans($textEmail) }}
|
||||
</x-dropdown.button>
|
||||
@else
|
||||
@@ -88,26 +80,6 @@
|
||||
|
||||
@stack('share_button_end')
|
||||
|
||||
@stack('button_cancelled_start')
|
||||
|
||||
@if (! $hideCancel)
|
||||
@can($permissionUpdate)
|
||||
@if ($checkCancelled)
|
||||
@if ($document->status != 'cancelled')
|
||||
<x-dropdown.link href="{{ route($cancelledRoute, $document->id) }}">
|
||||
{{ trans('general.cancel') }}
|
||||
</x-dropdown.link>
|
||||
@endif
|
||||
@else
|
||||
<x-dropdown.link href="{{ route($cancelledRoute, $document->id) }}">
|
||||
{{ trans('general.cancel') }}
|
||||
</x-dropdown.link>
|
||||
@endif
|
||||
@endcan
|
||||
@endif
|
||||
|
||||
@stack('button_cancelled_end')
|
||||
|
||||
@if (! $hideDivider3)
|
||||
<x-dropdown.divider />
|
||||
@endif
|
||||
@@ -116,7 +88,7 @@
|
||||
|
||||
@if (! $hideCustomize)
|
||||
@can($permissionCustomize)
|
||||
<x-dropdown.link href="{{ route($customizeRoute) }}">
|
||||
<x-dropdown.link href="{{ route($customizeRoute) }}" id="show-more-actions-customize-{{ $document->type }}">
|
||||
{{ trans('general.customize') }}
|
||||
</x-dropdown.link>
|
||||
@endcan
|
||||
@@ -127,13 +99,35 @@
|
||||
@stack('end_button_start')
|
||||
|
||||
@if (! $hideEnd && $document->recurring)
|
||||
<x-dropdown.link href="{{ route($endRoute, $document->id) }}">
|
||||
<x-dropdown.link href="{{ route($endRoute, $document->id) }}" id="show-more-actions-end-{{ $document->type }}">
|
||||
{{ trans('recurring.end') }}
|
||||
</x-dropdown.link>
|
||||
@endif
|
||||
|
||||
@stack('end_button_end')
|
||||
|
||||
@stack('button_cancelled_start')
|
||||
|
||||
@if (! $hideCancel)
|
||||
@can($permissionUpdate)
|
||||
<x-dropdown.divider />
|
||||
|
||||
@if ($checkCancelled)
|
||||
@if ($document->status != 'cancelled')
|
||||
<x-dropdown.link href="{{ route($cancelledRoute, $document->id) }}" id="show-more-actions-cancel-{{ $document->type }}">
|
||||
{{ trans('general.cancel') }}
|
||||
</x-dropdown.link>
|
||||
@endif
|
||||
@else
|
||||
<x-dropdown.link href="{{ route($cancelledRoute, $document->id) }}" id="show-more-actions-cancel-{{ $document->type }}">
|
||||
{{ trans('general.cancel') }}
|
||||
</x-dropdown.link>
|
||||
@endif
|
||||
@endcan
|
||||
@endif
|
||||
|
||||
@stack('button_cancelled_end')
|
||||
|
||||
@if (! $hideDivider4)
|
||||
<x-dropdown.divider />
|
||||
@endif
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
@if (! $hideMarkReceived)
|
||||
@can($permissionUpdate)
|
||||
@if ($document->status == 'draft')
|
||||
<x-link href="{{ route($markReceivedRoute, $document->id) }}" kind="secondary" @click="e => e.target.classList.add('disabled')">
|
||||
<x-link href="{{ route($markReceivedRoute, $document->id) }}" id="show-slider-actions-mark-received-{{ $document->type }}" kind="secondary" @click="e => e.target.classList.add('disabled')">
|
||||
{{ trans($textMarkReceived) }}
|
||||
</x-link>
|
||||
@else
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<div class="flex flex-wrap space-x-3 rtl:space-x-reverse">
|
||||
@if (! $hideEmail)
|
||||
@if ($document->contact_email)
|
||||
<x-button id="button-email-send" kind="secondary" @click="onEmail('{{ route($emailRoute, $document->id) }}')">
|
||||
<x-button id="show-slider-actions-send-email-{{ $document->type }}" kind="secondary" @click="onEmail('{{ route($emailRoute, $document->id) }}')">
|
||||
{{ trans($textEmail) }}
|
||||
</x-button>
|
||||
@else
|
||||
@@ -28,7 +28,7 @@
|
||||
@if (! $hideMarkSent)
|
||||
@can($permissionUpdate)
|
||||
@if ($document->status == 'draft')
|
||||
<x-link href="{{ route($markSentRoute, $document->id) }}" @click="e => e.target.classList.add('disabled')">
|
||||
<x-link id="show-slider-actions-mark-sent-{{ $document->type }}" href="{{ route($markSentRoute, $document->id) }}" @click="e => e.target.classList.add('disabled')">
|
||||
{{ trans($textMarkSent) }}
|
||||
</x-link>
|
||||
@else
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
@if (! $hideShare)
|
||||
@if ($document->status != 'cancelled')
|
||||
<x-button @click="onShareLink('{{ route($shareRoute, $document->id) }}')">
|
||||
<x-button id="show-slider-actions-share-link-{{ $document->type }}" @click="onShareLink('{{ route($shareRoute, $document->id) }}')">
|
||||
{{ trans('general.share_link') }}
|
||||
</x-button>
|
||||
@endif
|
||||
|
||||
@@ -11,27 +11,27 @@
|
||||
|
||||
<div class="flex items-center mt-1">
|
||||
@if (empty($attributes['disabled']))
|
||||
<label class="relative w-10 rounded-tl-lg rounded-bl-lg py-2 px-1 text-sm text-center transition-all cursor-pointer" @click="form.{{ $name }}=1" v-bind:class="[form.{{ $name }} == 1 ? ['bg-green-500','text-white'] : 'bg-black-100']">
|
||||
{{ empty($enable) ? trans('general.yes') : $enable }}
|
||||
<input type="radio" name="{{ $name }}" id="{{ $name }}-1" class="absolute left-0 opacity-0">
|
||||
</label>
|
||||
<label class="relative w-10 rounded-tl-lg rounded-bl-lg py-2 px-1 text-sm text-center transition-all cursor-pointer" @click="form.{{ $name }}=1" v-bind:class="[form.{{ $name }} == 1 ? ['bg-green-500','text-white'] : 'bg-black-100']">
|
||||
{{ empty($enable) ? trans('general.yes') : $enable }}
|
||||
<input type="radio" name="{{ $name }}" id="{{ $name }}-1" class="absolute left-0 opacity-0">
|
||||
</label>
|
||||
@else
|
||||
<label class="relative w-10 rounded-tl-lg rounded-bl-lg py-2 px-1 text-sm text-center transition-all cursor-not-allowed{{ ($value) ? ' bg-green-500 text-white opacity-20 disabled' : ' disabled' }}">
|
||||
{{ empty($enable) ? trans('general.yes') : $enable }}
|
||||
<input type="radio" name="{{ $name }}" id="{{ $name }}-1" class="absolute left-0 opacity-0" disabled>
|
||||
</label>
|
||||
<label class="relative w-10 rounded-tl-lg rounded-bl-lg py-2 px-1 text-sm text-center transition-all cursor-not-allowed{{ ($value) ? ' bg-green-500 text-white opacity-20 disabled' : ' disabled' }}">
|
||||
{{ empty($enable) ? trans('general.yes') : $enable }}
|
||||
<input type="radio" name="{{ $name }}" id="{{ $name }}-1" class="absolute left-0 opacity-0" disabled>
|
||||
</label>
|
||||
@endif
|
||||
|
||||
@if (empty($attributes['disabled']))
|
||||
<label class="relative w-10 rounded-tr-lg rounded-br-lg py-2 px-1 text-sm text-center transition-all cursor-pointer" @click="form.{{ $name }}=0" v-bind:class="[form.{{ $name }} == 0 ? ['bg-red-500','text-white'] : 'bg-black-100']">
|
||||
{{ empty($disable) ? trans('general.no') : $disable }}
|
||||
<input type="radio" name="{{ $name }}" id="{{ $name }}-0" class="absolute left-0 opacity-0">
|
||||
</label>
|
||||
<label class="relative w-10 rounded-tr-lg rounded-br-lg py-2 px-1 text-sm text-center transition-all cursor-pointer" @click="form.{{ $name }}=0" v-bind:class="[form.{{ $name }} == 0 ? ['bg-red-500','text-white'] : 'bg-black-100']">
|
||||
{{ empty($disable) ? trans('general.no') : $disable }}
|
||||
<input type="radio" name="{{ $name }}" id="{{ $name }}-0" class="absolute left-0 opacity-0">
|
||||
</label>
|
||||
@else
|
||||
<label class="relative w-10 rounded-tr-lg rounded-br-lg py-2 px-1 text-sm text-center transition-all cursor-not-allowed{{ ($value) ? ' disabled' : 'bg-red-500 text-white opacity-20 disabled disabled' }}">
|
||||
{{ empty($disable) ? trans('general.no') : $disable }}
|
||||
<input type="radio" name="{{ $name }}" id="{{ $name }}-0" class="absolute left-0 opacity-0" disabled>
|
||||
</label>
|
||||
<label class="relative w-10 rounded-tr-lg rounded-br-lg py-2 px-1 text-sm text-center transition-all cursor-not-allowed{{ ($value) ? ' disabled' : 'bg-red-500 text-white opacity-20 disabled disabled' }}">
|
||||
{{ empty($disable) ? trans('general.no') : $disable }}
|
||||
<input type="radio" name="{{ $name }}" id="{{ $name }}-0" class="absolute left-0 opacity-0" disabled>
|
||||
</label>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<div>
|
||||
<x-tooltip id="{{ $key }}" placement="top" message="{{ trans($action['name']) }}">
|
||||
<x-button @click="onChangeBulkAction('{{ $key }}')"
|
||||
id="button-bulk-action-{{ $key }}"
|
||||
id="index-bulk-actions-{{ $key }}"
|
||||
class="relative w-8 h-8 flex items-center px-2 mr-2 rounded-lg hover:bg-gray-200"
|
||||
override="class"
|
||||
data-message="{{ ! empty($action['message']) ? trans_choice($action['message'], 2, ['type' => strtolower(trans_choice($text, 2))]) : '' }}"
|
||||
@@ -40,7 +40,7 @@
|
||||
<div>
|
||||
<x-tooltip id="{{ $key }}" placement="top" message="{{ trans($action['name']) }}">
|
||||
<x-button @click="onChangeBulkAction('{{ $key }}')"
|
||||
id="button-bulk-action-{{ $key }}"
|
||||
id="index-bulk-actions-{{ $key }}"
|
||||
class="w-8 h-8 flex items-center px-2 rounded-lg hover:bg-gray-200"
|
||||
override="class"
|
||||
data-message="{{ ! empty($action['message']) ? trans_choice($action['message'], 2, ['type' => strtolower(trans_choice($text, 2))]) : '' }}"
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
<div @class(['w-1/2 sm:w-1/3 text-center'])>
|
||||
@if (! empty($item['tooltip']))
|
||||
<x-tooltip id="tooltip-summary-{{ $loop->index }}" placement="top" message="{!! $item['tooltip'] !!}">
|
||||
@if (! empty($item['href']))
|
||||
<x-link href="{{ $item['href'] }}" class="group" override="class">
|
||||
@endif
|
||||
@php $text_color = (! empty($item['text_color'])) ? $item['text_color'] : 'text-purple group-hover:text-purple-700'; @endphp
|
||||
<div @class(['relative text-xl sm:text-6xl', $text_color, 'mb-2'])>
|
||||
{!! $item['amount'] !!}
|
||||
@@ -16,10 +18,14 @@
|
||||
<span class="font-light mt-3">
|
||||
{!! $item['title'] !!}
|
||||
</span>
|
||||
@if (! empty($item['href']))
|
||||
</x-link>
|
||||
@endif
|
||||
</x-tooltip>
|
||||
@else
|
||||
@if (! empty($item['href']))
|
||||
<x-link href="{{ $item['href'] }}" class="group" override="class">
|
||||
@endif
|
||||
@php $text_color = (! empty($item['text_color'])) ? $item['text_color'] : 'text-purple group-hover:text-purple-700'; @endphp
|
||||
<div @class(['relative text-xl sm:text-6xl', $text_color, 'mb-2'])>
|
||||
{!! $item['amount'] !!}
|
||||
@@ -29,7 +35,9 @@
|
||||
<span class="font-light mt-3">
|
||||
{!! $item['title'] !!}
|
||||
</span>
|
||||
@if (! empty($item['href']))
|
||||
</x-link>
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
@endforeach
|
||||
@@ -180,4 +188,4 @@
|
||||
</div>
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,6 +1,8 @@
|
||||
@stack('scripts_start')
|
||||
<!-- Core -->
|
||||
<script src="{{ asset('public/vendor/js-cookie/js.cookie.js') }}"></script>
|
||||
<script type="text/javascript" src="{{ asset('public/akaunting-js/generalAction.js') }}"></script>
|
||||
<script type="text/javascript" src="{{ asset('public/akaunting-js/popper.js') }}"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var wizard_translations = {!! json_encode($translations) !!};
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
@foreach($suggestions as $suggestion)
|
||||
<x-link
|
||||
href="{{ url($suggestion->action_url) . '?' . http_build_query((array) $suggestion->action_parameters) }}"
|
||||
id="suggestion-{{ $suggestion->alias }}-{{ str_replace('.', '-', request()->route()->getName()) }}"
|
||||
class="px-3 py-1.5 mb-3 sm:mb-0 bg-gray-100 hover:bg-gray-200 rounded-xl text-sm font-medium leading-6"
|
||||
target="{{ $suggestion->action_target }}"
|
||||
override="class"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
@if (! $hideButtonAddNew)
|
||||
@can($permissionCreate)
|
||||
<x-link href="{{ route($routeButtonAddNew, ['type' => $type]) }}" kind="primary">
|
||||
<x-link href="{{ route($routeButtonAddNew, ['type' => $type]) }}" kind="primary" id="show-more-actions-new-{{ $transaction->type }}">
|
||||
{{ trans($textButtonAddNew) }}
|
||||
</x-link>
|
||||
@endcan
|
||||
@@ -13,7 +13,7 @@
|
||||
@if (! $transaction->reconciled && $transaction->isNotTransferTransaction())
|
||||
@if (! $hideButtonEdit)
|
||||
@can($permissionUpdate)
|
||||
<x-link href="{{ route($routeButtonEdit, [$transaction->id, 'type' => $type]) }}">
|
||||
<x-link href="{{ route($routeButtonEdit, [$transaction->id, 'type' => $type]) }}" id="show-more-actions-edit-{{ $transaction->type }}">
|
||||
{{ trans('general.edit') }}
|
||||
</x-link>
|
||||
@endcan
|
||||
|
||||
@@ -15,14 +15,16 @@
|
||||
</div>
|
||||
</x-slot>
|
||||
|
||||
<x-slot name="body">
|
||||
<span class="material-icons absolute ltr:right-0 rtl:left-0 top-0 transition-all transform" x-bind:class="create === 1 ? 'rotate-180' : ''">expand_more</span>
|
||||
</button>
|
||||
|
||||
<div class="overflow-hidden transition-transform origin-top-left ease-linear duration-100"
|
||||
x-ref="container1"
|
||||
x-bind:class="create == 1 ? 'h-auto ' : 'scale-y-0 h-0'"
|
||||
>
|
||||
@if ($transaction->isNotTransferTransaction())
|
||||
<div class="flex my-3 space-x-2 rtl:space-x-reverse">
|
||||
<x-link
|
||||
href="{{ route($routeButtonEdit, [$transaction->id, 'type' => $transaction->type]) }}"
|
||||
class="px-3 py-1.5 mb-3 sm:mb-0 bg-gray-100 hover:bg-gray-200 rounded-xl text-purple text-xs font-bold leading-6"
|
||||
override="class"
|
||||
>
|
||||
<x-link href="{{ route($routeButtonEdit, [$transaction->id, 'type' => $transaction->type]) }}" id="show-slider-actions-edit-{{ $transaction->type }}" class="px-3 py-1.5 mb-3 sm:mb-0 bg-gray-100 hover:bg-gray-200 rounded-xl text-purple text-xs font-bold leading-6">
|
||||
{{ trans('general.edit') }}
|
||||
</x-link>
|
||||
</div>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
@stack('button_group_start')
|
||||
|
||||
@if (! $hideButtonMoreActions)
|
||||
<x-dropdown id="dropdown-more-actions">
|
||||
<x-dropdown id="show-more-actions-{{ $transaction->type }}">
|
||||
<x-slot name="trigger">
|
||||
<span class="material-icons">more_horiz</span>
|
||||
</x-slot>
|
||||
@@ -11,7 +11,7 @@
|
||||
@if (empty($transaction->document_id) && $transaction->isNotTransferTransaction())
|
||||
@if (! $hideButtonDuplicate)
|
||||
@can($permissionCreate)
|
||||
<x-dropdown.link href="{{ route($routeButtonDuplicate, [$transaction->id, 'type' => $type]) }}">
|
||||
<x-dropdown.link href="{{ route($routeButtonDuplicate, [$transaction->id, 'type' => $type]) }}" id="show-more-actions-duplicate-{{ $transaction->type }}">
|
||||
{{ trans('general.duplicate') }}
|
||||
</x-dropdown.link>
|
||||
@endcan
|
||||
@@ -27,6 +27,7 @@
|
||||
@can($permissionCreate)
|
||||
<button
|
||||
type="button"
|
||||
id="show-more-actions-connect-{{ $transaction->type }}"
|
||||
class="w-full flex items-center text-purple px-2 h-9 leading-9 whitespace-nowrap"
|
||||
title="{{ trans('general.connect') }}"
|
||||
@click="onConnectTransactions('{{ route('transactions.dial', $transaction->id) }}')">
|
||||
@@ -38,14 +39,14 @@
|
||||
|
||||
@stack('connect_button_end')
|
||||
|
||||
@if (! $hideDivider1 && $transaction->isNotTransferTransaction())
|
||||
@if (! $hideDivider1 && $transaction->isNotDocumentTransaction() && $transaction->isNotTransferTransaction())
|
||||
<x-dropdown.divider />
|
||||
@endif
|
||||
|
||||
@stack('button_print_start')
|
||||
|
||||
@if (! $hideButtonPrint)
|
||||
<x-dropdown.link href="{{ route($routeButtonPrint, $transaction->id) }}" target="_blank">
|
||||
<x-dropdown.link href="{{ route($routeButtonPrint, $transaction->id) }}" target="_blank" id="show-more-actions-print-{{ $transaction->type }}">
|
||||
{{ trans('general.print') }}
|
||||
</x-dropdown.link>
|
||||
@endif
|
||||
@@ -55,7 +56,7 @@
|
||||
@stack('button_pdf_start')
|
||||
|
||||
@if (! $hideButtonPdf)
|
||||
<x-dropdown.link href="{{ route($routeButtonPdf, $transaction->id) }}" class="">
|
||||
<x-dropdown.link href="{{ route($routeButtonPdf, $transaction->id) }}" class="" id="show-more-actions-pdf-{{ $transaction->type }}">
|
||||
{{ trans('general.download_pdf') }}
|
||||
</x-dropdown.link>
|
||||
@endif
|
||||
@@ -70,7 +71,7 @@
|
||||
|
||||
@if ($transaction->isNotTransferTransaction())
|
||||
@if (! $hideButtonShare)
|
||||
<x-dropdown.button @click="onShareLink('{{ route($shareRoute, $transaction->id) }}')">
|
||||
<x-dropdown.button id="show-more-actions-share-link-{{ $transaction->type }}" @click="onShareLink('{{ route($shareRoute, $transaction->id) }}')">
|
||||
{{ trans('general.share_link') }}
|
||||
</x-dropdown.button>
|
||||
@endif
|
||||
@@ -83,7 +84,7 @@
|
||||
@if ($transaction->isNotTransferTransaction())
|
||||
@if (! $hideButtonEmail)
|
||||
@if (! empty($transaction->contact) && $transaction->contact->email)
|
||||
<x-dropdown.button @click="onEmail('{{ route($routeButtonEmail, $transaction->id) }}')">
|
||||
<x-dropdown.button id="show-more-actions-send-email-{{ $transaction->type }}" @click="onEmail('{{ route($routeButtonEmail, $transaction->id) }}')">
|
||||
{{ trans('invoices.send_mail') }}
|
||||
</x-dropdown.button>
|
||||
@else
|
||||
@@ -105,7 +106,7 @@
|
||||
@stack('button_end_start')
|
||||
|
||||
@if (! $hideButtonEnd)
|
||||
<x-dropdown.link href="{{ route($routeButtonEnd, $transaction->id) }}">
|
||||
<x-dropdown.link href="{{ route($routeButtonEnd, $transaction->id) }}" id="show-more-actions-end-{{ $transaction->type }}">
|
||||
{{ trans('recurring.end') }}
|
||||
</x-dropdown.link>
|
||||
@endif
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
@stack('add_new_button_start')
|
||||
|
||||
@can('create-banking-transfers')
|
||||
<x-link href="{{ route('transfers.create') }}" kind="primary">
|
||||
<x-link href="{{ route('transfers.create') }}" kind="primary" id="show-more-actions-new-transfer">
|
||||
{{ trans('general.title.new', ['type' => trans_choice('general.transfers', 1)]) }}
|
||||
</x-link>
|
||||
@endcan
|
||||
|
||||
@@ -10,11 +10,7 @@
|
||||
|
||||
<x-slot name="body">
|
||||
<div class="flex my-3 space-x-2 rtl:space-x-reverse">
|
||||
<x-link
|
||||
href="{{ route('transfers.edit', $transfer->id) }}"
|
||||
class="px-3 py-1.5 mb-3 sm:mb-0 bg-gray-100 hover:bg-gray-200 rounded-xl text-purple text-xs font-bold leading-6"
|
||||
override="class"
|
||||
>
|
||||
<x-link href="{{ route('transfers.edit', $transfer->id) }}" id="show-slider-actions-edit-transfer" class="px-3 py-1.5 mb-3 sm:mb-0 bg-gray-100 hover:bg-gray-200 rounded-xl text-purple text-xs font-bold leading-6">
|
||||
{{ trans('general.edit') }}
|
||||
</x-link>
|
||||
</div>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
@stack('edit_button_start')
|
||||
|
||||
@can('update-banking-transfers')
|
||||
<x-dropdown.link href="{{ route('transfers.edit', $transfer->id) }}">
|
||||
<x-dropdown.link href="{{ route('transfers.edit', $transfer->id) }}" id="show-more-actions-edit-transfer">
|
||||
{{ trans('general.edit') }}
|
||||
</x-dropdown.link>
|
||||
@endcan
|
||||
@@ -16,7 +16,7 @@
|
||||
@stack('duplicate_button_start')
|
||||
|
||||
@can('create-banking-transfers')
|
||||
<x-dropdown.link href="{{ route('transfers.duplicate', $transfer->id) }}">
|
||||
<x-dropdown.link href="{{ route('transfers.duplicate', $transfer->id) }}" id="show-more-actions-duplicate-transfer">
|
||||
{{ trans('general.duplicate') }}
|
||||
</x-dropdown.link>
|
||||
@endcan
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
@stack('print_button_start')
|
||||
|
||||
<x-dropdown.link href="{{ route('transfers.print', $transfer->id) }}" target="_blank">
|
||||
<x-dropdown.link href="{{ route('transfers.print', $transfer->id) }}" target="_blank" id="show-more-actions-print-transfer">
|
||||
{{ trans('general.print') }}
|
||||
</x-dropdown.link>
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
@stack('pdf_button_start')
|
||||
|
||||
<x-dropdown.link href="{{ route('transfers.pdf', $transfer->id) }}">
|
||||
<x-dropdown.link href="{{ route('transfers.pdf', $transfer->id) }}" id="show-more-actions-pdf-transfer">
|
||||
{{ trans('general.download_pdf') }}
|
||||
</x-dropdown.link>
|
||||
|
||||
|
||||
@@ -14,9 +14,9 @@
|
||||
</x-link>
|
||||
@endif
|
||||
|
||||
<x-dropdown id="dropdown-widget-{{ $class->model->id }}">
|
||||
<x-dropdown id="show-more-actions-widget-{{ $class->model->id }}">
|
||||
<x-slot name="trigger" class="flex" override="class">
|
||||
<span id="dashboard-widget-more-actions" class="w-8 h-8 flex items-center justify-center px-2 py-2 hover:bg-gray-100 rounded-xl text-purple text-sm font-medium leading-6">
|
||||
<span class="w-8 h-8 flex items-center justify-center px-2 py-2 hover:bg-gray-100 rounded-xl text-purple text-sm font-medium leading-6">
|
||||
<span class="material-icons">more_vert</span>
|
||||
</span>
|
||||
</x-slot>
|
||||
@@ -24,7 +24,7 @@
|
||||
@can('update-common-widgets')
|
||||
<x-button
|
||||
type="button"
|
||||
id="dashboard-edit-widget"
|
||||
id="show-more-actions-edit-widget-{{ $class->model->id }}"
|
||||
class="w-full flex items-center text-purple px-2 h-9 leading-9 whitespace-nowrap"
|
||||
override="class"
|
||||
title="{{ trans('general.edit') }}"
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
@if ($notification->type != 'updates')
|
||||
<x-tooltip id="notification-{{ $notification->id }}" placement="top" message="{{ trans('notifications.mark_read') }}">
|
||||
<button type="button" wire:click="markRead('{{ $notification->type }}', '{{ $notification->id }}')">
|
||||
<span id="menu-notification-mark-read" class="material-icons text-lg text-purple hover:scale-125">check_circle_outline</span>
|
||||
<span id="menu-notification-read-one-{{ $notification->id }}" class="material-icons text-lg text-purple hover:scale-125">check_circle_outline</span>
|
||||
</button>
|
||||
</x-tooltip>
|
||||
@endif
|
||||
|
||||
@@ -1,22 +1,24 @@
|
||||
<button class="w-8 h-8 flex items-center justify-center px-2 py-2 rounded-xl text-purple text-sm font-medium leading-6" data-tooltip-target="{{ $reportId }}-pin" data-tooltip-placement="bottom">
|
||||
@php $reportClassForId = Str::slug(Str::snake(class_basename($report->class))); @endphp
|
||||
|
||||
<button class="w-8 h-8 flex items-center justify-center px-2 py-2 rounded-xl text-purple text-sm font-medium leading-6" data-tooltip-target="{{ $report->id }}-pin" data-tooltip-placement="bottom">
|
||||
<span
|
||||
id="{{ $pinned ? 'reports-unpin-' . $reportId : 'reports-pin-' . $reportId }}"
|
||||
id="{{ $pinned ? 'index-line-actions-unpin-report-' . $reportClassForId . '-' . $report->id : 'index-line-actions-pin-report-' . $reportClassForId . '-' . $report->id }}"
|
||||
@class([
|
||||
'text-lg transform rotate-45 transition-all',
|
||||
'material-icons-outlined hover:scale-125' => ($pinned) ? false : true,
|
||||
'material-icons' => (! $pinned) ? false : true,
|
||||
])
|
||||
wire:click="changeStatus('{{ $reportId }}')"
|
||||
wire:click="changeStatus('{{ $report->id }}')"
|
||||
>push_pin
|
||||
</span>
|
||||
|
||||
@if ($pinned)
|
||||
<div id="{{ $reportId }}-pin" role="tooltip" class="inline-block absolute invisible z-20 py-1 px-2 text-sm font-medium text-gray-900 bg-white rounded-lg border border-gray-200 shadow-sm whitespace-nowrap opacity-0 tooltip-content">
|
||||
<div id="{{ $report->id }}-pin" role="tooltip" class="inline-block absolute invisible z-20 py-1 px-2 text-sm font-medium text-gray-900 bg-white rounded-lg border border-gray-200 shadow-sm whitespace-nowrap opacity-0 tooltip-content">
|
||||
{{ trans('reports.pin_text.unpin_report') }}
|
||||
<div class="absolute w-2 h-2 -top-1 before:content-[' '] before:absolute before:w-2 before:h-2 before:bg-white before:border-gray-200 before:transform before:rotate-45 before:border before:border-b-0 before:border-r-0" data-popper-arrow></div>
|
||||
</div>
|
||||
@else
|
||||
<div id="{{ $reportId }}-pin" role="tooltip" class="inline-block absolute invisible z-20 py-1 px-2 text-sm font-medium text-gray-900 bg-white rounded-lg border border-gray-200 shadow-sm whitespace-nowrap opacity-0 tooltip-content">
|
||||
<div id="{{ $report->id }}-pin" role="tooltip" class="inline-block absolute invisible z-20 py-1 px-2 text-sm font-medium text-gray-900 bg-white rounded-lg border border-gray-200 shadow-sm whitespace-nowrap opacity-0 tooltip-content">
|
||||
{{ trans('reports.pin_text.pin_report') }}
|
||||
<div class="absolute w-2 h-2 -top-1 before:content-[' '] before:absolute before:w-2 before:h-2 before:bg-white before:border-gray-200 before:transform before:rotate-45 before:border before:border-b-0 before:border-r-0" data-popper-arrow></div>
|
||||
</div>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
<x-slot name="buttons">
|
||||
@can('create-settings-categories')
|
||||
<x-link href="{{ route('categories.create') }}" kind="primary">
|
||||
<x-link href="{{ route('categories.create') }}" kind="primary" id="index-more-actions-new-category">
|
||||
{{ trans('general.title.new', ['type' => trans_choice('general.categories', 1)]) }}
|
||||
</x-link>
|
||||
@endcan
|
||||
@@ -24,12 +24,12 @@
|
||||
</x-slot>
|
||||
|
||||
@can('create-settings-categories')
|
||||
<x-dropdown.link href="{{ route('import.create', ['settings', 'categories']) }}">
|
||||
<x-dropdown.link href="{{ route('import.create', ['settings', 'categories']) }}" id="index-more-actions-import-category">
|
||||
{{ trans('import.import') }}
|
||||
</x-dropdown.link>
|
||||
@endcan
|
||||
|
||||
<x-dropdown.link href="{{ route('categories.export', request()->input()) }}">
|
||||
<x-dropdown.link href="{{ route('categories.export', request()->input()) }}" id="index-more-actions-export-category">
|
||||
{{ trans('general.export') }}
|
||||
</x-dropdown.link>
|
||||
</x-dropdown>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
<x-form.group.select name="code" label="{{ trans('currencies.code') }}" :options="$codes" searchable change="onChangeCode" />
|
||||
|
||||
<x-form.group.text name="rate" label="{{ trans('currencies.rate') }}" @input="onChangeRate" />
|
||||
<x-form.group.text name="rate" label="{{ trans('currencies.rate') }}" @input="onChangeRate" ::disabled="form.default_currency == 1" />
|
||||
|
||||
<x-form.group.select name="precision" label="{{ trans('currencies.precision') }}" :options="$precisions" model="form.precision" />
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
<x-form.group.select name="code" label="{{ trans('currencies.code') }}" :options="$codes" searchable change="onChangeCode" />
|
||||
|
||||
<x-form.group.text name="rate" label="{{ trans('currencies.rate') }}" @input="onChangeRate" />
|
||||
<x-form.group.text name="rate" label="{{ trans('currencies.rate') }}" @input="onChangeRate" ::disabled="form.default_currency == 1" />
|
||||
|
||||
<x-form.group.select name="precision" label="{{ trans('currencies.precision') }}" :options="$precisions" model="form.precision" />
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
<x-slot name="buttons">
|
||||
@can('create-settings-currencies')
|
||||
<x-link href="{{ route('currencies.create') }}" kind="primary">
|
||||
<x-link href="{{ route('currencies.create') }}" kind="primary" id="index-more-actions-new-currency">
|
||||
{{ trans('general.title.new', ['type' => trans_choice('general.currencies', 1)]) }}
|
||||
</x-link>
|
||||
@endcan
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
<x-slot name="buttons">
|
||||
@can('create-settings-taxes')
|
||||
<x-link href="{{ route('taxes.create') }}" kind="primary">
|
||||
<x-link href="{{ route('taxes.create') }}" kind="primary" id="index-more-actions-new-tax">
|
||||
{{ trans('general.title.new', ['type' => trans_choice('general.taxes', 1)]) }}
|
||||
</x-link>
|
||||
@endcan
|
||||
@@ -24,12 +24,12 @@
|
||||
</x-slot>
|
||||
|
||||
@can('create-settings-taxes')
|
||||
<x-dropdown.link href="{{ route('import.create', ['settings', 'taxes']) }}">
|
||||
<x-dropdown.link href="{{ route('import.create', ['settings', 'taxes']) }}" id="index-more-actions-import-tax">
|
||||
{{ trans('import.import') }}
|
||||
</x-dropdown.link>
|
||||
@endcan
|
||||
|
||||
<x-dropdown.link href="{{ route('taxes.export', request()->input()) }}">
|
||||
<x-dropdown.link href="{{ route('taxes.export', request()->input()) }}" id="index-more-actions-export-tax">
|
||||
{{ trans('general.export') }}
|
||||
</x-dropdown.link>
|
||||
</x-dropdown>
|
||||
|
||||
Reference in New Issue
Block a user