diff --git a/client/cypress/integration/frontend/portfolio/project-entry.spec.js b/client/cypress/integration/frontend/portfolio/project-entry.spec.js
index ad16cd1a..3d75845d 100644
--- a/client/cypress/integration/frontend/portfolio/project-entry.spec.js
+++ b/client/cypress/integration/frontend/portfolio/project-entry.spec.js
@@ -1,3 +1,5 @@
+import {PROJECT_ENTRY_TEMPLATE} from '../../../../src/consts/strings.consts';
+
describe('Project Entry', () => {
const operations = {
MeQuery: {
@@ -106,7 +108,7 @@ describe('Project Entry', () => {
// cy.get('[data-cy=text-form-input]').type('Stay with Rocket\nMeet Quill');
// });
cy.getByDataCy('modal-title').should('contain', 'Beitrag erfassen');
- cy.getByDataCy('text-form-input').should('exist');
+ cy.getByDataCy('project-entry-textarea').should('exist');
cy.getByDataCy('use-template-button').should('exist').click();
cy.getByDataCy('upload-document-button').should('exist');
cy.getByDataCy('modal-save-button').click();
@@ -125,7 +127,7 @@ describe('Project Entry', () => {
});
cy.getByDataCy('activity-input').should('not.exist');
- cy.getByDataCy('text-form-input').clear().type('Defeat Thanos');
+ cy.getByDataCy('project-entry-textarea').clear().type('Defeat Thanos');
cy.get('[data-cy=modal-save-button]').click();
cy.get('.project-entry__paragraph:first-of-type').contains('Defeat Thanos');
});
@@ -142,4 +144,11 @@ describe('Project Entry', () => {
cy.get('.project-entry').should('have.length', 0);
});
+
+ it('should use the template', () => {
+ cy.visit('/portfolio/groot');
+ cy.get('[data-cy=add-project-entry]:first-of-type').click();
+ cy.getByDataCy('use-template-button').click();
+ cy.getByDataCy('project-entry-textarea').should('have.value', PROJECT_ENTRY_TEMPLATE);
+ });
});
diff --git a/client/src/components/content-blocks/DocumentBlock.vue b/client/src/components/content-blocks/DocumentBlock.vue
index 3c48b33e..78381085 100644
--- a/client/src/components/content-blocks/DocumentBlock.vue
+++ b/client/src/components/content-blocks/DocumentBlock.vue
@@ -42,9 +42,7 @@
diff --git a/client/src/components/portfolio/NewProjectEntryWizard.vue b/client/src/components/portfolio/NewProjectEntryWizard.vue
index 53931b18..c73f80e0 100644
--- a/client/src/components/portfolio/NewProjectEntryWizard.vue
+++ b/client/src/components/portfolio/NewProjectEntryWizard.vue
@@ -19,7 +19,7 @@
data() {
return {
projectEntry: {
- content: '',
+ description: '',
documentUrl: ''
}
};
diff --git a/client/src/components/portfolio/ProjectEntryForm.vue b/client/src/components/portfolio/ProjectEntryForm.vue
index dce6209c..d21d8c5c 100644
--- a/client/src/components/portfolio/ProjectEntryForm.vue
+++ b/client/src/components/portfolio/ProjectEntryForm.vue
@@ -7,13 +7,28 @@
Beitrag erfassen
'' ? {
- url: this.localProjectEntry.documentUrl,
- } : {};
- },
- content() {
- return {
- text: this.localProjectEntry.content,
- };
- },
- },
-
methods: {
setDocumentUrl(url) {
this.localProjectEntry.documentUrl = url;
},
+ useTemplate() {
+ this.localProjectEntry.description = `${this.localProjectEntry.description}${PROJECT_ENTRY_TEMPLATE}`;
+ },
},
};
@@ -82,10 +98,46 @@
.project-entry-modal {
display: flex;
+ flex-direction: column;
+
+ &__form-field {
+ @include inputstyle;
+ padding: 0;
+ display: flex;
+ flex-direction: column;
+ grid-template-rows: auto 1rem;
+ grid-template-columns: 1fr 1fr;
+ width: 100%;
+ }
+
+ &__textarea {
+ @include auto-grow;
+ border: 0;
+ min-height: 400px;
+ padding: $medium-spacing;
+ }
+
+ &__buttons {
+ display: grid;
+ grid-template-columns: 1fr 1fr;
+ padding: $medium-spacing;
+ }
+
+ &__button {
+ @include regular-text;
+
+ &--template {
+ }
+
+ &--document {
+ }
+ }
&__heading {
@include heading-3;
margin-bottom: 0;
}
+
}
+
diff --git a/client/src/components/ui/ButtonWithIconAndText.vue b/client/src/components/ui/ButtonWithIconAndText.vue
new file mode 100644
index 00000000..5a4cdb1f
--- /dev/null
+++ b/client/src/components/ui/ButtonWithIconAndText.vue
@@ -0,0 +1,51 @@
+
+
+
+ {{ text }}
+
+
+
+
+
+
diff --git a/client/src/components/ui/file-upload/FileUpload.vue b/client/src/components/ui/file-upload/FileUpload.vue
new file mode 100644
index 00000000..09205266
--- /dev/null
+++ b/client/src/components/ui/file-upload/FileUpload.vue
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/client/src/components/ui/file-upload/SimpleFileUpload.vue b/client/src/components/ui/file-upload/SimpleFileUpload.vue
new file mode 100644
index 00000000..c6a3c8ad
--- /dev/null
+++ b/client/src/components/ui/file-upload/SimpleFileUpload.vue
@@ -0,0 +1,71 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/client/src/components/ui/file-upload/SimpleFileUploadHiddenInput.vue b/client/src/components/ui/file-upload/SimpleFileUploadHiddenInput.vue
new file mode 100644
index 00000000..c8109914
--- /dev/null
+++ b/client/src/components/ui/file-upload/SimpleFileUploadHiddenInput.vue
@@ -0,0 +1,27 @@
+
+
+
+
+
diff --git a/client/src/components/ui/file-upload/SimpleFileUploadIcon.vue b/client/src/components/ui/file-upload/SimpleFileUploadIcon.vue
new file mode 100644
index 00000000..d7ed76c4
--- /dev/null
+++ b/client/src/components/ui/file-upload/SimpleFileUploadIcon.vue
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
diff --git a/client/src/components/ui/file-upload/SimpleFileUploadIconAndText.vue b/client/src/components/ui/file-upload/SimpleFileUploadIconAndText.vue
new file mode 100644
index 00000000..7f43c1f9
--- /dev/null
+++ b/client/src/components/ui/file-upload/SimpleFileUploadIconAndText.vue
@@ -0,0 +1,13 @@
+
+
+
+
+
diff --git a/client/src/components/SimpleFileUpload.vue b/client/src/components/ui/file-upload/SimpleFileUploadWithIcon.vue
similarity index 52%
rename from client/src/components/SimpleFileUpload.vue
rename to client/src/components/ui/file-upload/SimpleFileUploadWithIcon.vue
index aa5058db..de4f69e6 100644
--- a/client/src/components/SimpleFileUpload.vue
+++ b/client/src/components/ui/file-upload/SimpleFileUploadWithIcon.vue
@@ -1,41 +1,27 @@
-
-
-
-
+ @click.native="clickUploadCare"/>
+
+