title | issue |
---|---|
Modify create document modal |
NEXT-16680 |
-
Changed in component
sw–media-upload-v2
- Added props
useFileData
to allow using value as File object and emit files frommedia-upload-add-file
event - Added method
checkFileType
to check uploaded file extension. - Added method
checkFileSize
to check uploaded file size. - Changed props
source
to add props type File. - Changed props
variant
to add new variant typesmall
. - Added props
maxFileSize
to limit upload file size. - Added props
useFileData
to prevent saving file to database after choosing file from local machine. - Added data variable
isCorrectFileType
- Added method
handleFileCheck
to check if file size and file type are matched. - Changed method
onDragLeave
to reset active state when dragging file out of drop zone. - Changed method
onFileInputChange
to validate files before uploading or setting file.
- Added props
-
Changed in
src/app/component/media/sw-media-upload-v2/sw-media-upload-v2.scss
- Added modifier
is--small
tosw-media-upload-v2__actions
,sw-media-upload-v2__button
,sw-media-upload-v2__dropzone
- Added modifier
-
Changed in component
sw-file-input
- Added props
disabled
to disabled interact with component - Added method
mountedComponent
- Added method
onDragEnter
to handle when dragging file to drop zone - Added method
onDragLeave
to handle when dragging file out of drop zone. - Added method
stopEventPropagation
to handle file input state after dropping file. - Added method
onDrop
to set file after dropping file in drop zone - Added computed
isDragActiveClass
show active state of drop zone when file is moved into it.
- Added props
-
Changed in
src/app/component/form/sw-file-input/sw-file-input.scss
- Added
is--active
modifier for classsw-file-input__dropzone
to highlight dropzone.
- Added
-
Changed in
src/module/sw-order/component/sw-order-document-card/index.js
- Added computed property
showCardFilter
to handle showing card filter of document card. - Added computed property
showCreateDocumentButton
to handle showing create document button of document card. - Added computed property
emptyStateTitle
to handle showing empty state of document card. - Changed method
onCreateDocument
to add custom document from media library or from url, to allow user download or sent email after creating document.
- Added computed property
-
Changed in
src/module/sw-order/component/sw-order-document-card/sw-order-document-card.html.twig
- Changed block
sw_order_document_card_header
, blocksw_order_document_card_header_filter
to handle showing card filter of document card. - Changed block
sw_order_document_card_empty_state
to add new UI of empty state.
- Changed block
-
Changed in
src/module/sw-order/component/sw-order-document-settings-modal/index.js
- Added computed property
modalTitle
to show modal title responding to document type. - Added computed property
fileAcceptTypes
to apply forfileAccept
props ofsw-media-upload-v2
component - Added computed property
mediaRepository
- Added method
openMediaModal
to open media modal. - Added method
closeMediaModal
to close media modal. - Added method
onAddMediaFromLibrary
to add media from modal. - Added method
successfulUploadFromUrl
to add media uploaded from url. - Added method
validateFile
to validate file size and file type. - Added method
removeCustomDocument
to resetdocumentMediaFileId
configuration.
- Added computed property
-
Changed in
src/module/sw-order/component/sw-order-document-settings-modal/sw-order-document-settings-modal.html.twig
- Added block
sw_order_document_settings_modal_form_file_upload_toggle
to cover custom document toggle - Added block
sw_order_document_settings_modal_form_file_upload_input
to cover custom document file input - Added block
sw_order_document_settings_modal_media_modal
to add media modal component - Changed block
sw_order_document_settings_modal_form_document_footer_split_button_context_create_send
and blocksw_order_document_settings_modal_form_document_footer_split_button_context_create_download
to showCreate and send
andCreate and download
context menu.
- Added block
-
Added file
src/module/sw-order/component/sw-order-document-settings-modal/sw-order-document-settings-modal.scss
-
Changed in
src/module/sw-order/component/sw-order-document-settings-delivery-note-modal/sw-order-document-settings-delivery-note-modal.html.twig
.- Deprecated block
sw_order_document_settings_modal_form_document_number_before
- Changed block
sw_order_document_settings_modal_form_document_number
to rearrange fields
- Deprecated block
-
Changed method
createdComponent
insrc/module/sw-order/component/sw-order-document-settings-credit-note-modal/index.js
to filter invoice document options. -
Changed in
src/module/sw-order/component/sw-order-document-settings-credit-note-modal/sw-order-document-settings-credit-note-modal.html.twig
.- Added block
sw_order_document_settings_modal_form_first_row
- Deprecated
sw_order_document_settings_modal_form_document_number
andsw_order_document_settings_modal_form_additional_content
- Added block
-
Changed in
src/module/sw-order/component/sw-order-document-settings-storno-modal/sw-order-document-settings-storno-modal.html.twig
- Changed block
sw_order_document_settings_modal_form_first_row
to rearrange fields - Deprecated block
sw_order_document_settings_modal_form_document_number
- Deprecated block
sw_sales_channel_detail_base_general_input_type
- Deprecated block
sw_order_document_settings_modal_form_document_date
- Changed block
-
Changed method
createDocument
insrc/core/service/api/document.api.service.js
to allow using document file from media library or external URL. -
Changed in
src/module/sw-order/component/sw-order-document-card/index.js
- Added computed property
showCardFilter
- Added computed property
showCreateDocumentButton
- Added computed property
emptyStateTitle
- Changed method
onCreateDocument
to allowcreate and download
orcreate and send option
.
- Added computed property