Merge branch 'master' of https://github.com/brkcvn/akaunting into new-plans

This commit is contained in:
Burak Civan
2022-11-07 17:46:54 +03:00
221 changed files with 10135 additions and 6474 deletions

View File

@@ -520,8 +520,27 @@ export default {
this.add_new.html = '';
this.add_new_html = null;
this.contact_list.push({
key: contact.id,
value: (contact.title) ? contact.title : (contact.display_name) ? contact.display_name : contact.name,
type: (contact.type) ? contact.type : 'customer',
id: contact.id,
name: (contact.title) ? contact.title : (contact.display_name) ? contact.display_name : contact.name,
email: (contact.email) ? contact.email : '',
tax_number: (contact.tax_number) ? contact.tax_number : '',
currency_code: (contact.currency_code) ? contact.currency_code : '',
phone: (contact.phone) ? contact.phone : '',
website: (contact.website) ? contact.website : '',
address: (contact.address) ? contact.address : '',
city: (contact.city) ? contact.city : '',
zip_code: (contact.zip_code) ? contact.zip_code : '',
state: (contact.state) ? contact.state : '',
country: (contact.country) ? contact.country : '',
location: (contact.location) ? contact.location : '',
reference: (contact.reference) ? contact.reference : ''
});
this.$emit('new', contact);
this.$emit('change', this.contact);
let documentClasses = document.body.classList;

View File

@@ -1,5 +1,5 @@
<template>
<div :id="'dropzone-' + _uid" class="dropzone dz-clickable" :class="[preview == 'single' ? 'dropzone-single': 'dropzone-multiple', singleWidthClasses ? 'w-full': 'w-37']">
<div :id="'dropzone-' + _uid" class="dropzone dz-clickable" :class="[preview == 'single' ? 'dropzone-single': 'dropzone-multiple', singleWidthClasses ? 'w-full': 'sm:w-37']">
<div class="fallback">
<div class="custom-file">
<input type="file" class="custom-file-input" :id="'projectCoverUploads' + _uid" :multiple="multiple">

View File

@@ -7,7 +7,7 @@
tabindex="-1"
role="dialog"
:aria-hidden="!show">
<div class="w-full my-10 m-auto flex flex-col" :class="modalDialogClass ? modalDialogClass : 'max-w-md'">
<div class="w-full my-10 m-auto flex flex-col px-2 sm:px-0" :class="modalDialogClass ? modalDialogClass : 'max-w-md'">
<slot name="modal-content">
<div class="modal-content">
<div class="p-5 bg-body rounded-tl-lg rounded-tr-lg">

View File

@@ -7,7 +7,7 @@
tabindex="-1"
role="dialog"
:aria-hidden="!show">
<div class="w-full my-10 m-auto flex flex-col" :class="modalDialogClass ? modalDialogClass : 'max-w-md'">
<div class="w-full my-10 m-auto flex flex-col px-2 sm:px-0" :class="modalDialogClass ? modalDialogClass : 'max-w-md'">
<slot name="modal-content">
<div class="modal-content">
<div class="p-5 bg-body rounded-tl-lg rounded-tr-lg">

View File

@@ -1,7 +1,7 @@
<template>
<div class="sm:col-span-6 space-y-8 sm:space-y-2">
<div class="flex flex-wrap lg:flex-nowrap items-center space-y-3 lg:space-y-0" :class="{ 'justify-between sm:justify-start': frequency == 'custom' }">
<div class="w-60 px-2 text-sm">
<div class="sm:col-span-6 space-y-6 sm:space-y-2">
<div class="flex flex-wrap lg:flex-nowrap items-center space-y-1 lg:space-y-0" :class="{ 'justify-start': frequency == 'custom' }">
<div class="w-24 sm:w-60 px-0 sm:px-2 text-sm">
{{ frequencyText }}
</div>
@@ -14,7 +14,7 @@
</el-option>
</el-select>
<div class="w-20 px-2 text-sm text-center" v-if="frequency == 'custom'">
<div class="w-20 sm:w-auto px-2 text-sm text-center" v-if="frequency == 'custom'">
{{ frequencyEveryText }}
</div>
@@ -30,8 +30,8 @@
</el-select>
</div>
<div class="flex flex-wrap lg:flex-nowrap items-center space-y-3 lg:space-y-0" :class="{ 'justify-between sm:justify-start': limit !== 'never' }">
<div class="w-60 px-2 text-sm">
<div class="flex flex-wrap lg:flex-nowrap items-center space-y-3 lg:space-y-0" :class="{ 'justify-start': limit !== 'never' }">
<div class="w-24 sm:w-60 px-0 sm:px-2 text-sm">
{{ startText }}
</div>

View File

@@ -2,8 +2,7 @@
<div
@click="tryClose"
data-notify="container"
class="alert alert-notify fixed flex items-center justify-between ltr:right-4 rtl:left-4 p-4 text-black font-bold rounded-lg z-30"
style="width: 500px;"
class="alert alert-notify fixed w-full sm:w-500 flex items-center justify-between ltr:right-0 rtl:left-0 sm:ltr:right-4 sm:rtl:left-4 p-4 text-black font-bold rounded-lg z-30"
:class="[
{ 'alert-with-icon': icon },
verticalAlign,

View File

@@ -30,6 +30,7 @@ const app = new Vue({
form: new Form('user'),
bulk_action: new BulkAction('users'),
show_password: false,
landing_pages: null,
}
},
@@ -51,5 +52,25 @@ const app = new Vue({
this.show_password = false;
}
},
onChangeRole(role_id) {
if (! role_id) {
return;
}
let role_promise = Promise.resolve(window.axios.get(url + '/auth/users/landingpages', {
params: {
role_id: role_id
}
}));
role_promise.then(response => {
if (response.data.success) {
this.landing_pages = response.data.data;
}
})
.catch(error => {
});
},
}
});

View File

@@ -70,7 +70,7 @@
</div>
<div class="sm:col-span-6 flex items-center justify-end mt-3.5">
<button type="submit" @click="onSubmit" :disabled="form.loading" id="next-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">
<button type="submit" @click="onSubmit($event)" :disabled="form.loading" id="next-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">
<i v-if="form.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>
<span :class="[{'opacity-0': form.loading}]">
Next
@@ -106,7 +106,8 @@
methods: {
// Form Submit
onSubmit() {
onSubmit(event) {
event.preventDefault();
this.form.submit();
},

View File

@@ -11,7 +11,7 @@
</select>
<div class="sm:col-span-6 flex items-center justify-end mt-3.5">
<button type="submit" @click="onSubmit" :disabled="form.loading" id="next-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">
<button type="submit" @click="onSubmit($event)" :disabled="form.loading" id="next-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">
<i v-if="form.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>
<span :class="[{'opacity-0': form.loading}]">
Next
@@ -58,7 +58,8 @@
},
methods: {
// Form Submit
onSubmit() {
onSubmit(event) {
event.preventDefault();
this.form.submit();
},

View File

@@ -41,7 +41,7 @@
</div>
<div class="sm:col-span-6 flex items-center justify-end mt-3.5">
<button type="submit" @click="onSubmit" :disabled="form.loading" id="next-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">
<button type="submit" @click="onSubmit($event)" :disabled="form.loading" id="next-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">
<i v-if="form.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>
<span :class="[{'opacity-0': form.loading}]">
Next
@@ -77,7 +77,8 @@
},
methods: {
// Form Submit
onSubmit() {
onSubmit(event) {
event.preventDefault();
this.form.submit();
},

View File

@@ -66,6 +66,33 @@ const app = new Vue({
if (typeof this.form.password !== 'undefined') {
this.form.password = '';
}
if (document.querySelector('[data-tabs-swiper]').childElementCount > 2) {
document.querySelectorAll('[data-tabs-slide]').forEach((item) => {
item.classList.add('swiper-slide');
});
document.querySelector('[data-tabs-swiper]').classList.add('swiper', 'swiper-links');
let html = `
<div class="swiper-wrapper">
${document.querySelector('[data-tabs-swiper]').innerHTML}
</div>
<div class="swiper-button-next top-3 right-0">
<span class="material-icons">chevron_right</span>
</div>
<div class="swiper-button-prev top-3 left-0">
<span class="material-icons">chevron_left</span>
</div>
`;
document.querySelector('[data-tabs-swiper]').innerHTML = html;
}
new Swiper(".swiper-links", {
loop: false,

View File

@@ -50,7 +50,7 @@ const app = new Vue({
},
item_name_input: false,
price_name_input: false,
quantity_name_input: false
quantity_name_input: false,
}
},
@@ -141,24 +141,41 @@ const app = new Vue({
});
},
onSmallWidthColumn(item) {
this.$refs[item].$el.classList.remove('sm:col-span-6');
this.$refs[item].$el.classList.add('sm:col-span-3');
},
onFullWidthColumn(item) {
this.$refs[item].$el.classList.add('sm:col-span-6');
this.$refs[item].$el.classList.remove('sm:col-span-3');
},
settingsInvoice() {
if (this.form.item_name == 'custom') {
this.item_name_input = true;
this.onSmallWidthColumn("item_name");
} else {
this.item_name_input = false;
this.onFullWidthColumn("item_name");
}
if (this.form.price_name == 'custom') {
this.price_name_input = true;
this.onSmallWidthColumn("price_name");
} else {
this.price_name_input = false;
this.onFullWidthColumn("price_name");
}
if (this.form.quantity_name == 'custom') {
this.quantity_name_input = true;
this.onSmallWidthColumn("quantity_name");
} else {
this.quantity_name_input = false;
this.onFullWidthColumn("quantity_name");
}
},
// Change currency get money

View File

@@ -61,7 +61,7 @@
></akaunting-date>
</div>
<div class="sm:col-span-3 grid gap-10">
<div class="sm:col-span-3 grid gap-y-4">
<div class="sm:col-span-3">
<base-input not-required :label="translations.company.address" :error="onFailErrorGet('address')">
<textarea class="w-full text-sm px-3 py-2.5 mt-1 rounded-lg border border-light-gray text-black placeholder-light-gray bg-white disabled:bg-gray-200 focus:outline-none focus:ring-transparent focus:border-purple" name="address" data-name="address" rows="3" :placeholder="translations.company.address" v-model="company.address"></textarea>
@@ -90,7 +90,7 @@
{{ translations.company.logo }}
</label>
<akaunting-dropzone-file-upload ref="dropzoneWizard" class="form-file dropzone-column w-2/5" style="height:12.2rem" preview-classes="single" :attachments="logo" :v-model="logo">
<akaunting-dropzone-file-upload ref="dropzoneWizard" class="form-file dropzone-column" style="width: 10.8rem; height: 10.8rem;" preview-classes="single" :attachments="logo" :v-model="logo">
</akaunting-dropzone-file-upload>
<div v-if="onFailErrorGet('logo')" class="text-red text-sm mt-1 block" v-html="onFailErrorGet('logo')"></div>

View File

@@ -27,7 +27,7 @@
</thead>
<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">
<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/actions">
<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 }}
@@ -37,7 +37,7 @@
</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"
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 whitespace-normal opacity-0 invisible"
>
{{ translations.currencies.default }}
<div
@@ -56,20 +56,20 @@
<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 }}
<div class="absolute ltr:right-12 rtl:left-12 -top-4 hidden items-center group-hover:flex">
<button type="button" class="relative bg-white hover:bg-gray-100 border py-0.5 px-1 cursor-pointer index-actions " @click="onEditItem(item, index)">
<div class="absolute ltr:right-12 rtl:left-12 -top-4 hidden items-center group-hover/actions:flex">
<button type="button" class="relative bg-white hover:bg-gray-100 border py-0.5 px-1 cursor-pointer group/tooltip index-actions" @click="onEditItem(item, index)">
<span class="material-icons-outlined text-purple text-lg">edit</span>
<div 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 opacity-0 whitespace-nowrap tooltip-content -top-10 -left-2" data-tooltip-placement="top">
<div 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 opacity-0 whitespace-nowrap -top-10 -left-2 group-hover/tooltip:opacity-100 group-hover/tooltip:visible" data-tooltip-placement="top">
<span>{{ translations.currencies.edit }}</span>
<div class="absolute w-2 h-2 -bottom-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-t-0 before:border-l-0" data-popper-arrow></div>
</div>
</button>
<button type="button" class="relative bg-white hover:bg-gray-100 border py-0.5 px-1 cursor-pointer index-actions " @click="onClickDelete(item)">
<button type="button" class="relative bg-white hover:bg-gray-100 border py-0.5 px-1 cursor-pointer group/tooltip index-actions" @click="onClickDelete(item)">
<span class="material-icons-outlined text-purple text-lg">delete</span>
<div 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 opacity-0 whitespace-nowrap tooltip-content -top-10 -left-2" data-tooltip-placement="top">
<div 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 opacity-0 whitespace-nowrap -top-10 -left-2 group-hover/tooltip:opacity-100 group-hover/tooltip:visible" data-tooltip-placement="top">
<span>{{ translations.currencies.delete }}</span>
<div class="absolute w-2 h-2 -bottom-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-t-0 before:border-l-0" data-popper-arrow></div>
</div>

View File

@@ -6,75 +6,21 @@
@tailwind utilities;
@layer base {
/* form */
.has-error input, .has-error select, .has-error textarea {
border: 1px solid #cc0000 !important;
}
.input-money {
@apply w-full text-sm px-3 py-2.5 mt-1 rounded-lg border border-light-gray text-black placeholder-light-gray bg-white disabled:bg-gray-200 focus:outline-none focus:ring-transparent focus:border-purple;
}
.disabled-money input, .disabled-money {
background-color:transparent !important;
border: none;
}
[type="radio"] {
@apply text-purple focus:outline-none focus:ring-purple focus:border-purple;
}
@layer container {
.container {
@apply px-4 lg:px-0;
}
}
@layer utilities {
.max-h-0 {
max-height: 0;
}
.h-0 {
height: auto;
}
/* form */
/* index */
.index-actions:hover .tooltip-content {
@apply opacity-100 visible;
.index-actions {
@apply ltr:[&:nth-child(2)]:border-l ltr:[&:nth-child(3)]:border-l-0 rtl:[&:nth-child(2)]:border-r rtl:[&:nth-child(3)]:border-r-0 ltr:[&:first-child]:rounded-tl-lg ltr:[&:first-child]:rounded-bl-lg ltr:[&:first-child]:border-r-0 rtl:[&:first-child]:rounded-tr-lg rtl:[&:first-child]:rounded-br-lg rtl:[&:first-child]:border-l-0 ltr:[&:last-child]:rounded-tr-lg ltr:[&:last-child]:rounded-br-lg ltr:[&:last-child]:border-l-0 rtl:[&:last-child]:rounded-tl-lg rtl:[&:last-child]:rounded-bl-lg rtl:[&:last-child]:border-r-0;
}
html[dir='ltr'] .index-actions:first-child {
@apply rounded-tl-lg rounded-bl-lg border-r-0;
}
html[dir='rtl'] .index-actions:first-child {
@apply rounded-tr-lg rounded-br-lg border-l-0;
}
html[dir='ltr'] .index-actions:last-child {
@apply rounded-tr-lg rounded-br-lg border-l-0;
}
html[dir='rtl'] .index-actions:last-child {
@apply rounded-tl-lg rounded-bl-lg border-r-0;
}
html[dir='ltr'] .index-actions:nth-child(2) {
@apply border-l;
}
html[dir='rtl'] .index-actions:nth-child(2) {
@apply border-r;
}
html[dir='ltr'] .index-actions:nth-child(3) {
@apply border-l-0;
}
html[dir='rtl'] .index-actions:nth-child(3) {
@apply border-r-0;
}
[data-dropdown-actions] {
transform: unset !important;
}
@@ -95,7 +41,34 @@
.tabs-link:hover::before {
@apply opacity-100 visible;
}
/* index */
}
@layer base {
/* form */
.has-error input, .has-error select, .has-error textarea {
border: 1px solid #cc0000 !important;
}
.has-error .el-select__tags input {
border: transparent !important;
}
.input-money {
@apply w-full text-sm px-3 py-2.5 mt-1 rounded-lg border border-light-gray text-black placeholder-light-gray bg-white disabled:bg-gray-200 focus:outline-none focus:ring-transparent focus:border-purple;
}
.disabled-money input, .disabled-money {
background-color:transparent !important;
border: none;
}
[type="radio"] {
@apply text-purple focus:outline-none focus:ring-purple focus:border-purple;
}
/* form */
/* index */
.active-tabs {
border-color: transparent !important;
}
@@ -212,6 +185,42 @@
@apply px-0 lg:pl-6 lg:pr-6;
}
/* widget container name will change as lg:px-12 on database. When container class name change on database, this code will clean */
/* after the upgrade tailwind 3.2.1, this tags font-weight changed. Added this block for now */
button, input, optgroup, select, textarea {
@apply font-normal;
}
/* after the upgrade tailwind 3.2.1, this tags font-weight changed. Added this block for now */
/* changelog modal styling for update center */
.change-log-modal .badge {
@apply px-3 py-2 rounded-3xl text-xs font-medium bg-green text-white;
}
.change-log-modal h2 {
@apply text-2xl font-bold text-purple mb-2;
}
.change-log-modal h3 {
@apply text-lg font-bold text-purple mb-2;
}
.change-log-modal ul {
@apply list-disc list-inside mb-2;
}
.change-log-modal li {
@apply text-base text-purple;
}
.change-log-modal a {
@apply text-green underline;
}
/* changelog modal styling for update center */
#button-monthly {
margin-left: unset !important;
}
}
/* menu */
@@ -422,11 +431,16 @@ html[dir='rtl'] .el-picker-panel__sidebar {
right: unset !important;
}
.flatpickr-day.selected {
background-color: #55588B !important;
.flatpickr-day.selected, .flatpickr-day.startRange, .flatpickr-day.endRange, .flatpickr-day.selected.inRange, .flatpickr-day.startRange.inRange, .flatpickr-day.endRange.inRange, .flatpickr-day.selected:focus, .flatpickr-day.startRange:focus, .flatpickr-day.endRange:focus, .flatpickr-day.selected:hover, .flatpickr-day.startRange:hover, .flatpickr-day.endRange:hover, .flatpickr-day.selected.prevMonthDay, .flatpickr-day.startRange.prevMonthDay, .flatpickr-day.endRange.prevMonthDay, .flatpickr-day.selected.nextMonthDay, .flatpickr-day.startRange.nextMonthDay, .flatpickr-day.endRange.nextMonthDay {
background: #55588B !important;
border-color: #55588B !important;
}
.flatpickr-day.selected.startRange + .endRange:not(:nth-child(7n+1)), .flatpickr-day.startRange.startRange + .endRange:not(:nth-child(7n+1)), .flatpickr-day.endRange.startRange + .endRange:not(:nth-child(7n+1)) {
-webkit-box-shadow: -10px 0 0 #888aae !important;
box-shadow: -10px 0 0 #888aae !important;
}
.el-date-editor .el-range-input, .el-date-editor .el-range-input::placeholder {
color: #424242;
}
@@ -470,9 +484,16 @@ html[dir='rtl'] .el-scrollbar__wrap {
}
/* apex-chart cash-flow */
.apex-chart-cash-flow .apexcharts-legend {
width: 24rem !important;
width: 100% !important;
justify-content: space-around !important;
padding: 0;
flex-wrap: nowrap !important;
}
.apex-chart-cash-flow .apexcharts-legend-series {
width: 8rem;
text-align: center;
margin: 0 !important;
}
.apex-chart-cash-flow .apexcharts-toolbar {
@@ -592,6 +613,17 @@ html[dir="rtl"] .lines-radius-border thead td:last-child {
}
}
@media only screen and (max-width: 480px) {
.dashboard-picker .el-picker-panel__body {
width: 100% !important;
margin-left: unset !important;
}
.dashboard-picker.el-date-range-picker.el-popper.has-sidebar {
width: 100% !important;
}
}
#nprogress .bar {
background: #A6A8C9 !important;
height: 5px !important;
@@ -620,6 +652,17 @@ html[dir="rtl"] .lines-radius-border thead td:last-child {
padding: 4px 15px;
}
/* document body selected */
::-moz-selection {
background: #55588B;
color: #FFFFFF;
}
::selection {
background: #55588B;
color: #FFFFFF;
}
/* document body selected */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
-webkit-appearance: none;