diff --git a/package.json b/package.json index 9ab8f845f883286dad960fd165571a4af3307938..e50bd5136a2cac7cec1d4d36c622d5839deb2b7e 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "@material/drawer": "^0.30.0", "@material/select": "^0.35.1", "ajv": "^5.5.0", - "amiv-web-ui-components": "git+https://git@gitlab.ethz.ch/amiv/web-ui-components.git#98d1e07a4df864875590bc19c711abe85e7afa19", + "amiv-web-ui-components": "git+https://git@gitlab.ethz.ch/amiv/web-ui-components.git#068a864cae7c8408286d835efe1850467f69098d", "axios": "^0.17.1", "client-oauth2": "^4.2.0", "mithril": "^1.1.6", diff --git a/src/groups/editGroup.js b/src/groups/editGroup.js index e273a5b27accfdaa5b741d87381798072bf2edb6..7264b0d577ac2ebdb7cf137c1fa84fd38a43a2d8 100644 --- a/src/groups/editGroup.js +++ b/src/groups/editGroup.js @@ -52,10 +52,11 @@ class PermissionEditor { }, [ m(Select, { label: apiEndpoint.title, - options: ['read', 'readwrite'], + options: ['no permission', 'read', 'readwrite'], + default: 'no permission', style: { width: '200px' }, onChange: ({ newVal }) => { - if (newVal === '') { + if (newVal === 'no permission') { // the api equivalent to no permission is to delete the key out of the dict if (internalPerm[apiEndpoint.href]) delete internalPerm[apiEndpoint.href]; } else internalPerm[apiEndpoint.href] = newVal; diff --git a/src/jobs/editJob.js b/src/jobs/editJob.js index 6ec5132c946a8ac9363e184f45d01f84b6a7edf2..b3526a0046ee6c5571fb11af026f966e26a3a543 100644 --- a/src/jobs/editJob.js +++ b/src/jobs/editJob.js @@ -35,7 +35,7 @@ export default class newJob extends EditView { label: 'Company Logo', accept: 'image/png, image/jpeg', })), - ...this.form.renderSchema(['time_end', 'title_en']), + ...this.form.renderSchema(['show_website', 'time_end', 'title_en']), this.form._renderField('description_en', { multiLine: true, rows: 5, diff --git a/src/jobs/viewJob.js b/src/jobs/viewJob.js index eba9452739b84abd8ec49f714374cfccd11bfbe9..cb0faf5fbc6451479ce1e3ece501b78707ab8bdd 100644 --- a/src/jobs/viewJob.js +++ b/src/jobs/viewJob.js @@ -34,6 +34,16 @@ export default class viewJob extends ItemView { title: 'Offer Ends', style: stdMargin, }, `${dateFormatter(this.data.time_end)}`) : '', + m(Property, { + title: 'Show on Website', + style: stdMargin, + }, this.data.show_website ? 'visible' : 'not visible'), + m(Property, { + title: 'PDF', + style: stdMargin, + }, this.data.pdf + ? m('a', { href: `${apiUrl}${this.data.pdf.file}`, target: '_blank' }, this.data.pdf.name) + : 'not available'), ]), m('div.viewcontainer', [ m('div.viewcontainercolumn', m(Card, {