From 6542d84ef277313158cf02ee0510476eb417738d Mon Sep 17 00:00:00 2001
From: maspect <maximilian.aspect@gmail.com>
Date: Sat, 30 Mar 2019 01:48:45 +0100
Subject: [PATCH 1/4] Add a field to change legi

---
 src/users/editUser.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/users/editUser.js b/src/users/editUser.js
index 51f320f..5d90b29 100644
--- a/src/users/editUser.js
+++ b/src/users/editUser.js
@@ -9,10 +9,11 @@ export default class UserEdit extends EditView {
     this.submit(this.form.data);
   }
 
+
   view() {
     if (!this.form.schema) return m(loadingScreen);
     return this.layout([
-      ...this.form.renderSchema(['lastname', 'firstname', 'email', 'nethz']),
+      ...this.form.renderSchema(['lastname', 'firstname', 'email', 'nethz', 'legi']),
       m(TextInput, this.form.bind({
         type: 'password',
         name: 'password',
-- 
GitLab


From caed397b7f9d5aa35fa9bbcd000b8350701350c5 Mon Sep 17 00:00:00 2001
From: maspect <maximilian.aspect@gmail.com>
Date: Sat, 30 Mar 2019 12:31:57 +0100
Subject: [PATCH 2/4] Add a button to change the Priority of an event to high

---
 src/events/editEvent.js | 21 ++++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)

diff --git a/src/events/editEvent.js b/src/events/editEvent.js
index ba43938..36bae9a 100644
--- a/src/events/editEvent.js
+++ b/src/events/editEvent.js
@@ -37,9 +37,7 @@ export default class newEvent extends EditView {
       console.log(data);
       this.form.data = data;
     }
-
-
-    if (!this.form.data.priority) this.form.data.priority = 1;
+    if (this.form.data.priority === 10) this.form.data.high_priority = true;
 
     // read additional_fields to make it editable
     if (this.form.data.additional_fields) {
@@ -131,6 +129,13 @@ export default class newEvent extends EditView {
       this.form.data.additional_fields = null;
     }
 
+    if (this.form.data.high_priority === true) {
+      this.form.data.priority = 10;
+    } else {git 
+      this.form.data.priority = 1;
+    }
+    delete this.form.data.high_priority;
+
     // if spots is not set, also remove 'allow_email_signup'
     if (!('spots' in this.form.data) && 'allow_email_signup' in this.form.data
         && !this.form.data.allow_email_signup) {
@@ -372,6 +377,8 @@ export default class newEvent extends EditView {
             type: 'boolean',
             label: 'SBB Abonnement',
           }),
+
+
           m('br'),
           ...this.hasregistration && addFieldsText,
           m('br'),
@@ -407,12 +414,20 @@ export default class newEvent extends EditView {
             // onChange: ({ value }) => { this.data.priority = value; },
           }),
           */
+
           ...this.form.renderSchema(['show_website', 'show_announce', 'show_infoscreen']),
+          // pritority update
+          this.form._renderField('high_priority', {
+            type: 'boolean',
+            label: 'Set high Priority',
+          }),
           m('div', 'Please send your announce text additionally via email to info@amiv.ch ' +
           'until the new announce tool is ready.'),
           m('div', 'Please send an email to info@amiv.ch in order to show your event on' +
             'the infoscreen until the new infoscreen tool is ready.'),
+
         ]),
+
         // page 5: images
         m('div', {
           style: { display: (this.currentpage === 5) ? 'block' : 'none' },
-- 
GitLab


From fa8dbb59bc4a276dfc747b5837aa1f05c2c2c21f Mon Sep 17 00:00:00 2001
From: maspect <maximilian.aspect@gmail.com>
Date: Sat, 30 Mar 2019 12:47:13 +0100
Subject: [PATCH 3/4] Add a high Priority field to advertisement

---
 src/events/editEvent.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/events/editEvent.js b/src/events/editEvent.js
index 36bae9a..5cbd9fb 100644
--- a/src/events/editEvent.js
+++ b/src/events/editEvent.js
@@ -131,7 +131,7 @@ export default class newEvent extends EditView {
 
     if (this.form.data.high_priority === true) {
       this.form.data.priority = 10;
-    } else {git 
+    } else {
       this.form.data.priority = 1;
     }
     delete this.form.data.high_priority;
-- 
GitLab


From 3697bb561e8e98a31afa8c6bf547fe988227f3a2 Mon Sep 17 00:00:00 2001
From: maspect <maximilian.aspect@gmail.com>
Date: Sat, 30 Mar 2019 15:09:33 +0100
Subject: [PATCH 4/4] Add text to imform user about format on images

---
 src/events/editEvent.js | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/events/editEvent.js b/src/events/editEvent.js
index 5cbd9fb..9f77787 100644
--- a/src/events/editEvent.js
+++ b/src/events/editEvent.js
@@ -431,7 +431,9 @@ export default class newEvent extends EditView {
         // page 5: images
         m('div', {
           style: { display: (this.currentpage === 5) ? 'block' : 'none' },
+
         }, [
+          m('div', 'Formats for the files: Thumbnail: 1:1, Poster: Any DIN-A, Infoscreen: 16:9'),
           ['thumbnail', 'poster', 'infoscreen'].map(key => [
             this.form.data[`img_${key}`] ? m('img', {
               src: `${apiUrl}${this.form.data[`img_${key}`].file}`,
@@ -443,6 +445,7 @@ export default class newEvent extends EditView {
               accept: 'image/png, image/jpeg',
             })),
           ]),
+
         ]),
         // bottom back & forth
         m('div', {
-- 
GitLab