diff --git a/app/Abstracts/Notification.php b/app/Abstracts/Notification.php index 367af653f..196e2a917 100644 --- a/app/Abstracts/Notification.php +++ b/app/Abstracts/Notification.php @@ -91,7 +91,7 @@ abstract class Notification extends BaseNotification implements ShouldQueue public function getFooter() { - $url = 'https://akaunting.com/lp/accounting-software?utm_source=email&utm_medium=footer&utm_campaign=plg&utm_content=' . $this->template->alias; + $url = 'https://akaunting.com/accounting-software?utm_source=email&utm_medium=footer&utm_campaign=plg&utm_content=' . $this->template->alias; $get_started = '' . trans('footer.get_started') . ''; diff --git a/app/Traits/Recurring.php b/app/Traits/Recurring.php index ad347f6b2..73db91340 100644 --- a/app/Traits/Recurring.php +++ b/app/Traits/Recurring.php @@ -188,7 +188,11 @@ trait Recurring return false; } - return $schedule->current()->getStart(); + if (! $current = $schedule->current()) { + return false; + } + + return $current->getStart(); } public function getNextRecurring() @@ -210,7 +214,11 @@ trait Recurring return false; } - return $schedule->first()->getStart(); + if (! $first = $schedule->first()) { + return false; + } + + return $first->getStart(); } public function getLastRecurring() @@ -219,6 +227,10 @@ trait Recurring return false; } - return $schedule->last()->getStart(); + if (! $last = $schedule->last()) { + return false; + } + + return $last->getStart(); } } diff --git a/app/View/Components/DeleteLink.php b/app/View/Components/DeleteLink.php index 52c9cdee7..f098768eb 100644 --- a/app/View/Components/DeleteLink.php +++ b/app/View/Components/DeleteLink.php @@ -282,7 +282,7 @@ class DeleteLink extends Component protected function getClass($class) { - $default_class = 'w-full flex items-center text-purple px-2 h-9 leading-9 whitespace-nowrap'; + $default_class = 'w-full flex items-center text-red sm:text-purple px-2 h-9 leading-9 whitespace-nowrap'; $explode = explode(',', $this->override); diff --git a/public/akaunting-js/generalAction.js b/public/akaunting-js/generalAction.js index cbf0431bc..c863f94af 100644 --- a/public/akaunting-js/generalAction.js +++ b/public/akaunting-js/generalAction.js @@ -11,7 +11,7 @@ document.querySelectorAll("[data-table-list]").forEach((row) => { //redirect edit or show page for table row click document.querySelectorAll("[data-table-body]").forEach((table) => { - if (document.body.clientWidth >= 991) { + if (document.body.clientWidth < 768 || document.body.clientWidth > 1200) { let rows = table.querySelectorAll("tr"); rows.forEach((row) => { @@ -27,7 +27,13 @@ document.querySelectorAll("[data-table-body]").forEach((table) => { if (row_href) { for (let i = first_selector; i < td.length - 1; i++) { let td_item = td[i]; - td_item.addEventListener("click", () => { + + td_item.addEventListener("click", (event) => { + // click disabled when preview dialog is open + if (event.target.closest('[data-tooltip-target]')) { + return; + } + // click disabled when preview dialog is open window.location.href = row_href; }); @@ -42,6 +48,20 @@ document.querySelectorAll("[data-table-body]").forEach((table) => { } }); } + + if (document.body.clientWidth <= 768) { + table.querySelectorAll('[data-table-list]').forEach((actions) => { + actions.querySelector('[data-mobile-actions]').addEventListener('click', function() { + this.closest('td').querySelector('[data-mobile-actions-modal]').classList.add('show'); + this.closest('td').querySelector('[data-mobile-actions-modal]').classList.remove('opacity-0', 'invisible'); + + this.closest('td').querySelector('[data-mobile-actions-modal]').addEventListener('click', function() { + this.classList.add('opacity-0', 'invisible'); + this.classList.remove('show'); + }); + }); + }); + } }); //redirect edit or show page for table row click @@ -368,7 +388,7 @@ function marqueeAnimation(truncate) { // offsetwidth = width of the text, clientWidth = width of parent text (div) // because some index page has icons, we use two time parent element - if (truncate.children.length < 1 && truncate.offsetWidth > truncate.parentElement.clientWidth || truncate.offsetWidth > truncate.parentElement.parentElement.parentElement.clientWidth) { + if (truncate.children.length < 1 && truncate.offsetWidth > truncate.parentElement.clientWidth || truncate.offsetWidth > truncate.parentElement.parentElement.parentElement.clientWidth) { truncate.addEventListener('mouseover', function () { truncate.parentElement.style.animationPlayState = 'running'; @@ -429,6 +449,7 @@ document.querySelectorAll('[data-index-icon]').forEach((defaultText) => { if (icon_parents_element.classList.contains('flex')) { icon_parents_element.appendChild(defaultText); + icon_parents_element.classList.remove('truncate'); } else { if (icon_parents_element.classList.contains('overflow-x-hidden')) { icon_parents_element.parentElement.appendChild(defaultText); @@ -440,3 +461,46 @@ document.querySelectorAll('[data-index-icon]').forEach((defaultText) => { //disable/enable icons ejected from data-truncate-marquee //margue animation for truncated text + +// set with for page header +document.querySelectorAll('[data-page-title-first]').forEach((first) => { + document.querySelectorAll('[data-page-title-second]').forEach((second) => { + let title_truncate = first.querySelector('[data-title-truncate]'); + + if (title_truncate !== null) { + if (first.clientWidth < title_truncate.clientWidth && second.clientHeight > 0) { + // added specific width styling for truncate text + title_truncate.style.width = first.clientWidth + 'px'; + let subtract = title_truncate.clientWidth - 40; + title_truncate.style.width = subtract + 'px'; + title_truncate.classList.add('truncate'); + // added specific width styling for truncate text + + // added specific width styling into the parent title element for truncate text + first.classList.add('w-full', 'sm:w-6/12'); + // added specific width styling into the parent title element for truncate text + + title_truncate.parentNode.classList.add('overflow-x-hidden', 'hide-scroll-bar'); + + // added truncate animation for truncated text + title_truncate.addEventListener('mouseover', function () { + this.classList.add('animate-marquee'); + this.classList.remove('truncate'); + this.style.animationPlayState = 'running'; + }); + + title_truncate.addEventListener('mouseout', function () { + this.style.animationPlayState = 'paused'; + this.classList.remove('animate-marquee'); + this.classList.add('truncate'); + }); + // added truncate animation for truncated text + } + } + + // remove width class name for extend the right side + first.classList.remove('w-full', 'sm:w-6/12'); + // remove width class name for extend the right side + }); +}); +// set with for page header diff --git a/public/css/app.css b/public/css/app.css index a2837b0a6..1d98bee48 100644 --- a/public/css/app.css +++ b/public/css/app.css @@ -1399,7 +1399,7 @@ input[type=file]::file-selector-button:hover{ background-color: #DCE2F9; } -.menu-list a svg { +.menu-list ul svg { width: 22px; height: 24px; fill: none; @@ -53411,6 +53411,9 @@ button, input, optgroup, select, textarea{ border-bottom-left-radius: 0.5rem; border-right-width: 0px; } +.suggestion-buttons > a:first-child, .suggestion-buttons > button:first-child{ + margin-top: 0.5rem; +} [data-dropdown-actions] { -webkit-transform: unset !important; transform: unset !important; @@ -53467,6 +53470,27 @@ table thead a:hover{ visibility: visible; opacity: 1; } +.notifications-menu ul li a { + border-bottom: 1px solid; + } +.avatar-attachment{ + display: -webkit-inline-box; + display: -ms-inline-flexbox; + display: inline-flex; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + -webkit-box-pack: center; + -ms-flex-pack: center; + justify-content: center; + --tw-text-opacity: 1; + color: rgb(255 255 255 / var(--tw-text-opacity)); + background-color: #adb5bd; + border-radius: .375rem; + font-size: 1rem; + height: 45px; + width: 45px; +} /* index */ @@ -54059,6 +54083,14 @@ html[dir="rtl"] .lines-radius-border thead td:last-child { } /* responsive for role mobile */ +/* full-width for mobile. Some component use inline styling for width */ +@media only screen and (max-width: 991px) { + .full-width-mobile { + width: 100% !important; + } + } + /* full-width for mobile. Some component use inline styling for width */ + [dir="ltr"] .ltr\:-right-57 { right: -14.5rem; } @@ -54080,6 +54112,17 @@ html[dir="rtl"] .lines-radius-border thead td:last-child { } /* plans page accordion */ + /* hidden scroll-bar */ + .hide-scroll-bar::-webkit-scrollbar { + display: none; + } + + .hide-scroll-bar { + -ms-overflow-style: none; /* IE and Edge */ + scrollbar-width: none; /* Firefox */ + } + /* hidden scroll-bar */ + @media only screen and (max-width: 480px) { .small-table-width { width: 550px; @@ -54493,16 +54536,16 @@ body{ background-color: rgb(255 255 255 / var(--tw-bg-opacity)); } -.hover\:bg-gray-100:hover{ - --tw-bg-opacity: 1; - background-color: rgb(243 244 246 / var(--tw-bg-opacity)); -} - .hover\:bg-lilac-100:hover{ --tw-bg-opacity: 1; background-color: rgb(245 247 250 / var(--tw-bg-opacity)); } +.hover\:bg-gray-100:hover{ + --tw-bg-opacity: 1; + background-color: rgb(243 244 246 / var(--tw-bg-opacity)); +} + .hover\:bg-gray-200:hover{ --tw-bg-opacity: 1; background-color: rgb(229 231 235 / var(--tw-bg-opacity)); @@ -57019,6 +57062,12 @@ body{ gap: 0px; } + .sm\:space-x-4 > :not([hidden]) ~ :not([hidden]){ + --tw-space-x-reverse: 0; + margin-right: calc(1rem * var(--tw-space-x-reverse)); + margin-left: calc(1rem * calc(1 - var(--tw-space-x-reverse))); + } + .sm\:space-y-2 > :not([hidden]) ~ :not([hidden]){ --tw-space-y-reverse: 0; margin-top: calc(0.5rem * calc(1 - var(--tw-space-y-reverse))); @@ -57037,6 +57086,10 @@ body{ border-left-width: calc(2px * calc(1 - var(--tw-divide-x-reverse))); } + .sm\:p-7{ + padding: 1.75rem; + } + .sm\:px-0{ padding-left: 0px; padding-right: 0px; @@ -57052,6 +57105,11 @@ body{ line-height: 2.75rem; } + .sm\:text-purple{ + --tw-text-opacity: 1; + color: rgb(85 88 139 / var(--tw-text-opacity)); + } + [dir="ltr"] .sm\:ltr\:right-4{ right: 1rem; } diff --git a/public/css/print.css b/public/css/print.css index c19970f17..335dbec07 100644 --- a/public/css/print.css +++ b/public/css/print.css @@ -767,69 +767,63 @@ html[dir='rtl'] .print-heading { .classic-invoice { margin-top: 10px; } +/*--Print --*/ -.col-60 -{ +.col-60 { display: inline-block; - width: 100%; + width: 60%; vertical-align: top; } -.col-50 -{ +.col-50 { display: inline-block; - width: 100%; + width: 50%; vertical-align: top; } -.col-40 -{ +.col-40 { display: inline-block; - width: 100%; + width: 40%; vertical-align: top; } -.col-58 -{ + +.col-58{ display: inline-block; width: 58%; vertical-align: top; } -.col-42 -{ + +.col-42 { display: inline-block; width: 42%; vertical-align: top; } -.col-16 -{ + +.col-16 { display: inline-block; max-width: 16%; vertical-align: top; } -/*--Print --*/ -@media (min-width: 991px) { - .col-60 - { - display: inline-block; - width: 60%; - vertical-align: top; - } - - .col-50 - { +@media (max-width: 480px) { + .col-60 { display: inline-block; width: 50%; vertical-align: top; } - - .col-40 - { + + .col-40 { display: inline-block; - width: 40%; + width: 50%; vertical-align: top; } + .mt-classic { + margin-top: -1px; + } +} + +@media (min-width: 991px) { .classic-invoice { margin-top: unset; } diff --git a/resources/assets/js/components/AkauntingDropzoneFileUpload.vue b/resources/assets/js/components/AkauntingDropzoneFileUpload.vue index 27128d909..3c7d6b76f 100644 --- a/resources/assets/js/components/AkauntingDropzoneFileUpload.vue +++ b/resources/assets/js/components/AkauntingDropzoneFileUpload.vue @@ -20,7 +20,7 @@
@@ -45,12 +45,12 @@ -
+
diff --git a/resources/assets/js/components/AkauntingSelect.vue b/resources/assets/js/components/AkauntingSelect.vue index cee481cc3..595fd7943 100644 --- a/resources/assets/js/components/AkauntingSelect.vue +++ b/resources/assets/js/components/AkauntingSelect.vue @@ -73,7 +73,7 @@ :label="option.value" :value="option.key"> subdirectory_arrow_right{{ option.value }} - {{ addNew.new_text }} + {{ addNew.new_text }} {{ option.value }} - {{ addNew.new_text }} + {{ addNew.new_text }} @@ -105,7 +105,7 @@ - {{ addNew.new_text }} + {{ addNew.new_text }} @@ -170,7 +170,7 @@ :label="option.value" :value="option.key"> subdirectory_arrow_right{{ option.value }} - {{ addNew.new_text }} + {{ addNew.new_text }} subdirectory_arrow_right{{ option.value }} - {{ addNew.new_text }} + {{ addNew.new_text }} @@ -202,7 +202,7 @@ - {{ addNew.new_text }} + {{ addNew.new_text }} - - +
+
+
+ @if ($file->aggregate_type == 'image') +
+ {{ $file->basename }} +
+ @else +
+ attach_file +
@endif - @endcan - - download - +
+ + {{ $file->basename }} + + + + {{ $file->readableSize() }} + +
+
+ +
+ @can('delete-common-uploads') + + delete + + + @if ($options) + + + + @endif + @endcan + + + download + +
diff --git a/resources/views/components/suggestions.blade.php b/resources/views/components/suggestions.blade.php index f640ce8ed..4ab701889 100644 --- a/resources/views/components/suggestions.blade.php +++ b/resources/views/components/suggestions.blade.php @@ -8,4 +8,4 @@ > {{ $suggestion->name }} -@endforeach +@endforeach \ No newline at end of file diff --git a/resources/views/components/table/actions-mobile.blade.php b/resources/views/components/table/actions-mobile.blade.php new file mode 100644 index 000000000..186103d6d --- /dev/null +++ b/resources/views/components/table/actions-mobile.blade.php @@ -0,0 +1,150 @@ +@php + $count_buttons = 1; + $more_actions = []; +@endphp + +
+ + more_horiz + +
+ + \ No newline at end of file diff --git a/resources/views/components/table/actions.blade.php b/resources/views/components/table/actions.blade.php index 8ce6cd0cf..639303fc4 100644 --- a/resources/views/components/table/actions.blade.php +++ b/resources/views/components/table/actions.blade.php @@ -3,132 +3,136 @@ $more_actions = []; @endphp -