diff --git a/app/javascript/template_builder/builder.vue b/app/javascript/template_builder/builder.vue index 7ddd1372..4fe13b4d 100644 --- a/app/javascript/template_builder/builder.vue +++ b/app/javascript/template_builder/builder.vue @@ -309,6 +309,8 @@ :data-document-uuid="item.attachment_uuid" :accept-file-types="acceptFileTypes" :with-replace-button="withUploadButton" + :with-google-drive="withGoogleDrive" + :authenticity-token="authenticityToken" :editable="editable" :dynamic-documents="dynamicDocuments" :with-dynamic-documents="withDynamicDocuments" @@ -456,6 +458,8 @@ :with-arrows="template.schema.length > 1" :item="template.schema.find((item) => item.attachment_uuid === document.uuid)" :with-replace-button="withUploadButton" + :with-google-drive="withGoogleDrive" + :authenticity-token="authenticityToken" :accept-file-types="acceptFileTypes" :document="document" :template="template" diff --git a/app/javascript/template_builder/controls.vue b/app/javascript/template_builder/controls.vue index e09397ae..df976002 100644 --- a/app/javascript/template_builder/controls.vue +++ b/app/javascript/template_builder/controls.vue @@ -10,6 +10,9 @@ v-if="withReplaceButton" :template-id="template.id" :accept-file-types="acceptFileTypes" + :authenticity-token="authenticityToken" + :with-google-drive="withGoogleDrive" + :google-drive-file-id="item.google_drive_file_id" @click.stop @success="$emit('replace', { replaceSchemaItem: item, ...$event })" /> @@ -73,6 +76,16 @@ export default { required: true, default: true }, + withGoogleDrive: { + type: Boolean, + required: false, + default: false + }, + authenticityToken: { + type: String, + required: false, + default: '' + }, withArrows: { type: Boolean, required: false, diff --git a/app/javascript/template_builder/google_drive_picker_modal.vue b/app/javascript/template_builder/google_drive_picker_modal.vue new file mode 100644 index 00000000..e4a40f14 --- /dev/null +++ b/app/javascript/template_builder/google_drive_picker_modal.vue @@ -0,0 +1,165 @@ +