diff --git a/app/Http/Controllers/Common/Import.php b/app/Http/Controllers/Common/Import.php index fd47a6aee..5f8d32cc1 100644 --- a/app/Http/Controllers/Common/Import.php +++ b/app/Http/Controllers/Common/Import.php @@ -48,6 +48,8 @@ class Import extends Controller $form_params['url'] = $path . '/import'; } - return view('common.import.create', compact('group', 'type', 'path', 'route', 'form_params', 'title_type', 'sample_file')); + $document_link = 'https://akaunting.com/hc/docs/import-export/'; + + return view('common.import.create', compact('group', 'type', 'path', 'route', 'form_params', 'title_type', 'sample_file', 'document_link')); } } diff --git a/app/View/Components/Form/Group/Import.php b/app/View/Components/Form/Group/Import.php new file mode 100644 index 000000000..a5e7ba2b4 --- /dev/null +++ b/app/View/Components/Form/Group/Import.php @@ -0,0 +1,38 @@ + 'form-file dropzone-column sm:w-1/2 h-32.5', + ]; + + /** + * Get the view / contents that represent the component. + * + * @return \Illuminate\Contracts\View\View|string + */ + public function render() + { + if (! empty($this->options)) { + $options = []; + + foreach ($this->options as $option) { + $options[$option->id] = $option->name; + } + + $this->options = $options; + } + + $this->options['maxFilesize'] = config('filesystems.max_size'); + + return view('components.form.group.import'); + } +} diff --git a/app/View/Components/Form/Input/Import.php b/app/View/Components/Form/Input/Import.php new file mode 100644 index 000000000..157c56926 --- /dev/null +++ b/app/View/Components/Form/Input/Import.php @@ -0,0 +1,30 @@ +options)) { + $options = []; + + foreach ($this->options as $option) { + $options[$option->id] = $option->name; + } + + $this->options = $options; + } + + return view('components.form.input.import'); + } +} diff --git a/public/css/app.css b/public/css/app.css index c557a23b8..62eb1b83c 100644 --- a/public/css/app.css +++ b/public/css/app.css @@ -319,7 +319,8 @@ border-radius: .375rem; } -.dz-message { +.dz-message, +.dz-preview-message { padding: 5rem 1rem; display: -webkit-box; display: -ms-flexbox; @@ -331,8 +332,9 @@ -ms-flex-pack: center; justify-content: center; background-color: #fff; - border: 1px dashed #C7C9D9; + border: 2px dashed #C7C9D9; border-radius: .375rem; + font-weight: 500; text-align: center; color: #595959; -webkit-transition: all .15s ease; @@ -341,30 +343,37 @@ -ms-flex-order: -1; order: -1; cursor: pointer; +} + +.dz-message { z-index: 9; } -.dz-message:hover { - border-color: #424242; +.dz-message:hover, +.dz-preview-message:hover { + border-color: #918b8b; } -.dropzone-multiple .dz-message { +.dropzone-multiple .dz-message, +.dropzone-multiple .dz-preview-message { height: 5rem; padding: 0; } -.dropzone-single .dz-message { +.dropzone-single .dz-message, +.dropzone-single .dz-preview-message { height: 100%; - padding: 0.5rem 1rem; + padding: 1rem 0; } -.dropzone-column .dz-message { +.dropzone-column .dz-message, +.dropzone-column .dz-preview-message { height: 100%; padding: 0; } .dropzone-single.dz-max-files-reached .dz-message { - background-color: rgba(0,0,0,.2); + /* background-color: rgba(0,0,0,.2); */ color: #fff; opacity: 0; } @@ -373,7 +382,8 @@ opacity:1 } -.dz-message .dz-button { +.dz-message .dz-button, +.dz-preview-message .dz-button { background: hsla(0,0%,100%,0); border: none; color: #C7C9D9; @@ -388,7 +398,7 @@ } .dropzone-single.dz-max-files-reached .dz-message { - background-color: rgba(0,0,0,.9); + /* background-color: rgba(0,0,0,.9); */ color: #fff; opacity: 0; } @@ -415,6 +425,32 @@ bottom: 7px; z-index: 99; } + +.dz-import-text { + color: #6B7280; + font-weight: 600; +} + +.dz-import-upload { + color: #6B7280; + font-weight: 500; +} + +.dz-import-icon { + font-size: 38px; + outline: none; +} + +.dz-import { + padding: 20px; + background: hsla(0,0%,100%,0); + border: none; + color: #C7C9D9; +} + +.dz-import-width { + width: 120%; +} /* ! tailwindcss v3.3.2 | MIT License | https://tailwindcss.com */ @@ -1543,13 +1579,16 @@ button, input, optgroup, select, textarea{ .change-log-modal .badge{ border-radius: 1.5rem; --tw-bg-opacity: 1; + background-color: rgb(110 161 82 / var(--tw-bg-opacity)); + padding-left: 0.75rem; + padding-right: 0.75rem; padding-top: 0.5rem; padding-bottom: 0.5rem; - font-size: 1.2rem; + font-size: 0.75rem; line-height: 1rem; - font-weight: 700; + font-weight: 500; --tw-text-opacity: 1; - color: #6ea152; + color: rgb(255 255 255 / var(--tw-text-opacity)); } .change-log-modal h2{ @@ -1559,50 +1598,42 @@ button, input, optgroup, select, textarea{ font-weight: 700; --tw-text-opacity: 1; color: rgb(85 88 139 / var(--tw-text-opacity)); -} +} .change-log-modal h3{ margin-bottom: 0.5rem; - margin-top: 40px; font-size: 1.125rem; line-height: 1.75rem; font-weight: 700; --tw-text-opacity: 1; - color: #55588B; + color: rgb(85 88 139 / var(--tw-text-opacity)); } .change-log-modal ul{ margin-bottom: 0.5rem; list-style-position: inside; list-style-type: disc; - border: 2px solid #eaeaea; - padding: 10px 20px; - border-radius: 8px; -} - -.change-log-modal li:last-child { - margin-bottom: 13px; } .change-log-modal li{ font-size: 1rem; line-height: 1.5rem; - margin-top: 13px; --tw-text-opacity: 1; color: rgb(85 88 139 / var(--tw-text-opacity)); } - .change-log-modal a{ --tw-text-opacity: 1; color: rgb(110 161 82 / var(--tw-text-opacity)); + -webkit-text-decoration-line: underline; + text-decoration-line: underline; } /* changelog modal styling for update center */ #button-monthly { - margin-left: unset !important; -} + margin-left: unset !important; + } /* width of container, custom choose */ @@ -62781,6 +62812,10 @@ body{ display: flex; } +.group:hover .group-hover\:hidden{ + display: none; +} + .group:hover .group-hover\:translate-x-1{ --tw-translate-x: 0.25rem; -webkit-transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); @@ -63496,6 +63531,10 @@ body{ margin: 1px; } +:is([dir="ltr"] .ltr\:-ml-10){ + margin-left: -2.5rem; +} + :is([dir="ltr"] .ltr\:-ml-7){ margin-left: -1.75rem; } @@ -63520,6 +63559,10 @@ body{ margin-right: 0.25rem; } +:is([dir="ltr"] .ltr\:mr-10){ + margin-right: 2.5rem; +} + :is([dir="ltr"] .ltr\:mr-2){ margin-right: 0.5rem; } @@ -64513,6 +64556,10 @@ body{ margin: 1px; } +:is([dir="rtl"] .rtl\:-mr-10){ + margin-right: -2.5rem; +} + :is([dir="rtl"] .rtl\:-mr-7){ margin-right: -1.75rem; } @@ -64521,6 +64568,10 @@ body{ margin-left: 0.25rem; } +:is([dir="rtl"] .rtl\:ml-10){ + margin-left: 2.5rem; +} + :is([dir="rtl"] .rtl\:ml-2){ margin-left: 0.5rem; } diff --git a/public/css/third_party/dropzone_custom.css b/public/css/third_party/dropzone_custom.css index 313976b4c..e13c8b688 100644 --- a/public/css/third_party/dropzone_custom.css +++ b/public/css/third_party/dropzone_custom.css @@ -20,43 +20,52 @@ border-radius: .375rem; } -.dz-message { +.dz-message, +.dz-preview-message { padding: 5rem 1rem; display: flex; align-items: center; justify-content: center; background-color: #fff; - border: 1px dashed #C7C9D9; + border: 2px dashed #C7C9D9; border-radius: .375rem; + font-weight: 500; text-align: center; color: #595959; transition: all .15s ease; order: -1; cursor: pointer; +} + +.dz-message { z-index: 9; } -.dz-message:hover { - border-color: #424242; +.dz-message:hover, +.dz-preview-message:hover { + border-color: #918b8b; } -.dropzone-multiple .dz-message { +.dropzone-multiple .dz-message, +.dropzone-multiple .dz-preview-message { height: 5rem; padding: 0; } -.dropzone-single .dz-message { +.dropzone-single .dz-message, +.dropzone-single .dz-preview-message { height: 100%; - padding: 0.5rem 1rem; + padding: 1rem 0; } -.dropzone-column .dz-message { +.dropzone-column .dz-message, +.dropzone-column .dz-preview-message { height: 100%; padding: 0; } .dropzone-single.dz-max-files-reached .dz-message { - background-color: rgba(0,0,0,.2); + /* background-color: rgba(0,0,0,.2); */ color: #fff; opacity: 0; } @@ -65,7 +74,8 @@ opacity:1 } -.dz-message .dz-button { +.dz-message .dz-button, +.dz-preview-message .dz-button { background: hsla(0,0%,100%,0); border: none; color: #C7C9D9; @@ -79,7 +89,7 @@ } .dropzone-single.dz-max-files-reached .dz-message { - background-color: rgba(0,0,0,.9); + /* background-color: rgba(0,0,0,.9); */ color: #fff; opacity: 0; } @@ -99,4 +109,30 @@ .form-file [data-dz-remove] { bottom: 7px; z-index: 99; +} + +.dz-import-text { + color: #6B7280; + font-weight: 600; +} + +.dz-import-upload { + color: #6B7280; + font-weight: 500; +} + +.dz-import-icon { + font-size: 38px; + outline: none; +} + +.dz-import { + padding: 20px; + background: hsla(0,0%,100%,0); + border: none; + color: #C7C9D9; +} + +.dz-import-width { + width: 120%; } \ No newline at end of file diff --git a/public/img/import.png b/public/img/import.png new file mode 100644 index 000000000..3a61c760b Binary files /dev/null and b/public/img/import.png differ diff --git a/resources/assets/js/components/AkauntingImport.vue b/resources/assets/js/components/AkauntingImport.vue new file mode 100644 index 000000000..816373f99 --- /dev/null +++ b/resources/assets/js/components/AkauntingImport.vue @@ -0,0 +1,252 @@ + + + + + \ No newline at end of file diff --git a/resources/assets/js/mixins/global.js b/resources/assets/js/mixins/global.js index a53060ba5..ba7ef3b5e 100644 --- a/resources/assets/js/mixins/global.js +++ b/resources/assets/js/mixins/global.js @@ -24,6 +24,7 @@ import AkauntingConnectTransactions from './../components/AkauntingConnectTransa import AkauntingSwitch from './../components/AkauntingSwitch'; import AkauntingSlider from './../components/AkauntingSlider'; import AkauntingColor from './../components/AkauntingColor'; +import AkauntingImport from './../components/AkauntingImport'; import CardForm from './../components/CreditCard/CardForm'; import NProgress from 'nprogress'; @@ -79,6 +80,7 @@ export default { AkauntingSwitch, AkauntingSlider, AkauntingColor, + AkauntingImport, CardForm, [Select.name]: Select, [Option.name]: Option, diff --git a/resources/lang/en-GB/import.php b/resources/lang/en-GB/import.php index 69dc8c641..13b6a1274 100644 --- a/resources/lang/en-GB/import.php +++ b/resources/lang/en-GB/import.php @@ -2,9 +2,12 @@ return [ - 'import' => 'Import', - 'title' => 'Import :type', - 'limitations' => 'Allowed file types: :extensions
Allowed max rows: :row_limit', - 'sample_file' => 'You can download the sample file and fill it with your data.', + 'import' => 'Import', + 'title' => 'Import :type', + 'limitations' => 'Allowed file types: :extensions
Allowed max rows: :row_limit', + 'sample_file' => 'You can download the sample file and fill it with your data.', + 'sample_file_and_document' => 'You can download the sample file and review the documents for detailed information', + 'drop_file' => 'Upload a file or drag and drop', + 'file_type_and_limitations' => ':extensions up to :row_limit rows', ]; diff --git a/resources/views/common/import/create.blade.php b/resources/views/common/import/create.blade.php index e1a78a482..27d615b59 100644 --- a/resources/views/common/import/create.blade.php +++ b/resources/views/common/import/create.blade.php @@ -3,30 +3,48 @@ {{ trans('import.title', ['type' => $title_type]) }} + +
-
-