Commit 0c181307 authored by Jarod Owen's avatar Jarod Owen
Browse files

Started fixing User Groups

Page wasn't fetching the users that were already there and preventing them
from being added again. Now removing all users from a group errors.
parent 3b97b0d8
Pipeline #5546 passed with stages
in 3 minutes and 54 seconds
......@@ -1748,9 +1748,9 @@
},
"dependencies": {
"acorn": {
"version": "7.1.0",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.0.tgz",
"integrity": "sha512-kL5CuoXA/dgxlBbVrflsflzQ3PAas7RYZB52NOm/6839iVYJgKMJ3cQJD+t2i5+qFa8h3MDpEOJiS64E8JLnSQ==",
"version": "7.1.1",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz",
"integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==",
"dev": true
},
"acorn-walk": {
......@@ -3477,6 +3477,12 @@
"isarray": "^1.0.0"
}
},
"buffer-crc32": {
"version": "0.2.13",
"resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz",
"integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=",
"dev": true
},
"buffer-from": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz",
......@@ -3829,17 +3835,177 @@
}
},
"chromedriver": {
"version": "80.0.0",
"resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-80.0.0.tgz",
"integrity": "sha512-W4tIbaOve7HeGFLnbbZMV4AUlnBaapL+H41fvDFKOXCmUvgPhxVN9y/c3EgmsOcokLQkqxpOC/txEujms1eT0w==",
"version": "80.0.1",
"resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-80.0.1.tgz",
"integrity": "sha512-VfRtZUpBUIjeypS+xM40+VD9g4Drv7L2VibG/4+0zX3mMx4KayN6gfKETycPfO6JwQXTLSxEr58fRcrsa8r5xQ==",
"dev": true,
"requires": {
"@testim/chrome-version": "^1.0.7",
"del": "^4.1.1",
"axios": "^0.19.2",
"del": "^5.1.0",
"extract-zip": "^1.6.7",
"mkdirp": "^0.5.1",
"request": "^2.88.0",
"mkdirp": "^1.0.3",
"tcp-port-used": "^1.0.1"
},
"dependencies": {
"@nodelib/fs.stat": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.3.tgz",
"integrity": "sha512-bQBFruR2TAwoevBEd/NWMoAAtNGzTRgdrqnYCc7dhzfoNvqPzLyqlEQnzZ3kVnNrSp25iyxE00/3h2fqGAGArA==",
"dev": true
},
"array-union": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz",
"integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==",
"dev": true
},
"braces": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
"dev": true,
"requires": {
"fill-range": "^7.0.1"
}
},
"del": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/del/-/del-5.1.0.tgz",
"integrity": "sha512-wH9xOVHnczo9jN2IW68BabcecVPxacIA3g/7z6vhSU/4stOKQzeCRK0yD0A24WiAAUJmmVpWqrERcTxnLo3AnA==",
"dev": true,
"requires": {
"globby": "^10.0.1",
"graceful-fs": "^4.2.2",
"is-glob": "^4.0.1",
"is-path-cwd": "^2.2.0",
"is-path-inside": "^3.0.1",
"p-map": "^3.0.0",
"rimraf": "^3.0.0",
"slash": "^3.0.0"
}
},
"dir-glob": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz",
"integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==",
"dev": true,
"requires": {
"path-type": "^4.0.0"
}
},
"fast-glob": {
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.2.tgz",
"integrity": "sha512-UDV82o4uQyljznxwMxyVRJgZZt3O5wENYojjzbaGEGZgeOxkLFf+V4cnUD+krzb2F72E18RhamkMZ7AdeggF7A==",
"dev": true,
"requires": {
"@nodelib/fs.stat": "^2.0.2",
"@nodelib/fs.walk": "^1.2.3",
"glob-parent": "^5.1.0",
"merge2": "^1.3.0",
"micromatch": "^4.0.2",
"picomatch": "^2.2.1"
}
},
"fill-range": {
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
"integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
"dev": true,
"requires": {
"to-regex-range": "^5.0.1"
}
},
"glob-parent": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz",
"integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==",
"dev": true,
"requires": {
"is-glob": "^4.0.1"
}
},
"globby": {
"version": "10.0.2",
"resolved": "https://registry.npmjs.org/globby/-/globby-10.0.2.tgz",
"integrity": "sha512-7dUi7RvCoT/xast/o/dLN53oqND4yk0nsHkhRgn9w65C4PofCLOoJ39iSOg+qVDdWQPIEj+eszMHQ+aLVwwQSg==",
"dev": true,
"requires": {
"@types/glob": "^7.1.1",
"array-union": "^2.1.0",
"dir-glob": "^3.0.1",
"fast-glob": "^3.0.3",
"glob": "^7.1.3",
"ignore": "^5.1.1",
"merge2": "^1.2.3",
"slash": "^3.0.0"
}
},
"ignore": {
"version": "5.1.4",
"resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.4.tgz",
"integrity": "sha512-MzbUSahkTW1u7JpKKjY7LCARd1fU5W2rLdxlM4kdkayuCwZImjkpluF9CM1aLewYJguPDqewLam18Y6AU69A8A==",
"dev": true
},
"is-number": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
"dev": true
},
"is-path-inside": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.2.tgz",
"integrity": "sha512-/2UGPSgmtqwo1ktx8NDHjuPwZWmHhO+gj0f93EkhLB5RgW9RZevWYYlIkS6zePc6U2WpOdQYIwHe9YC4DWEBVg==",
"dev": true
},
"micromatch": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz",
"integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==",
"dev": true,
"requires": {
"braces": "^3.0.1",
"picomatch": "^2.0.5"
}
},
"mkdirp": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.3.tgz",
"integrity": "sha512-6uCP4Qc0sWsgMLy1EOqqS/3rjDHOEnsStVr/4vtAIK2Y5i2kA7lFFejYrpIyiN9w0pYf4ckeCYT9f1r1P9KX5g==",
"dev": true
},
"path-type": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz",
"integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==",
"dev": true
},
"rimraf": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
"integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
"dev": true,
"requires": {
"glob": "^7.1.3"
}
},
"slash": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
"integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",
"dev": true
},
"to-regex-range": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
"integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
"dev": true,
"requires": {
"is-number": "^7.0.0"
}
}
}
},
"ci-info": {
......@@ -6466,9 +6632,9 @@
},
"dependencies": {
"acorn": {
"version": "7.1.0",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.0.tgz",
"integrity": "sha1-lJ028sKSU12mAig1hsJHfFfrLWw=",
"version": "7.1.1",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz",
"integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==",
"dev": true
}
}
......@@ -6816,15 +6982,15 @@
}
},
"extract-zip": {
"version": "1.6.7",
"resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-1.6.7.tgz",
"integrity": "sha1-qEC0uK9kAyZMjbV/Txp0Mz74H+k=",
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-1.7.0.tgz",
"integrity": "sha512-xoh5G1W/PB0/27lXgMQyIhP5DSY/LhoCsOyZgb+6iMmRtCwVBo55uKaMoEYrDCKQhWvqEip5ZPKAc6eFNyf/MA==",
"dev": true,
"requires": {
"concat-stream": "1.6.2",
"debug": "2.6.9",
"mkdirp": "0.5.1",
"yauzl": "2.4.1"
"concat-stream": "^1.6.2",
"debug": "^2.6.9",
"mkdirp": "^0.5.4",
"yauzl": "^2.10.0"
},
"dependencies": {
"debug": {
......@@ -6836,6 +7002,15 @@
"ms": "2.0.0"
}
},
"mkdirp": {
"version": "0.5.4",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.4.tgz",
"integrity": "sha512-iG9AK/dJLtJ0XNgTuDbSyNS3zECqDlAhnQW4CsNxBG3LQJBbHmRX1egw39DmtOdCAqY+dKXV+sgPgilNWUKMVw==",
"dev": true,
"requires": {
"minimist": "^1.2.5"
}
},
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
......@@ -6907,9 +7082,9 @@
}
},
"fd-slicer": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.0.1.tgz",
"integrity": "sha1-i1vL2ewyfFBBv5qwI/1nUPEXfmU=",
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz",
"integrity": "sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=",
"dev": true,
"requires": {
"pend": "~1.2.0"
......@@ -9417,9 +9592,9 @@
},
"dependencies": {
"acorn": {
"version": "7.1.0",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.0.tgz",
"integrity": "sha1-lJ028sKSU12mAig1hsJHfFfrLWw=",
"version": "7.1.1",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz",
"integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==",
"dev": true
},
"cssom": {
......@@ -11298,9 +11473,9 @@
}
},
"minimist": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ="
"version": "1.2.5",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
},
"minipass": {
"version": "3.1.1",
......@@ -16177,6 +16352,23 @@
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz",
"integrity": "sha1-sj5DWK+oogL+ehAK8fX4g/AgB+4="
},
"v-calendar": {
"version": "1.0.0-beta.23",
"resolved": "https://registry.npmjs.org/v-calendar/-/v-calendar-1.0.0-beta.23.tgz",
"integrity": "sha512-4THp5AU7k6SfoA+J1lTUG/brVPBLU3ib/HxGTS5maxD4WOSAoNSFimqLeu1oveZ8YXAIibnQmm6mBWoRQkd1oQ==",
"requires": {
"date-fns": "^2.6.0",
"lodash": "^4.17.11",
"popper.js": "^1.14.7"
},
"dependencies": {
"date-fns": {
"version": "2.11.1",
"resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.11.1.tgz",
"integrity": "sha512-3RdUoinZ43URd2MJcquzBbDQo+J87cSzB8NkXdZiN5ia1UNyep0oCyitfiL88+R7clGTeq/RniXAc16gWyAu1w=="
}
}
},
"v8-compile-cache": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz",
......@@ -16449,13 +16641,13 @@
}
},
"webpack-bundle-analyzer": {
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/webpack-bundle-analyzer/-/webpack-bundle-analyzer-3.6.0.tgz",
"integrity": "sha1-ObOo+CnKBEaCvG+eARyV3rVUrv0=",
"version": "3.6.1",
"resolved": "https://registry.npmjs.org/webpack-bundle-analyzer/-/webpack-bundle-analyzer-3.6.1.tgz",
"integrity": "sha512-Nfd8HDwfSx1xBwC+P8QMGvHAOITxNBSvu/J/mCJvOwv+G4VWkU7zir9SSenTtyCi0LnVtmsc7G5SZo1uV+bxRw==",
"dev": true,
"requires": {
"acorn": "^6.0.7",
"acorn-walk": "^6.1.1",
"acorn": "^7.1.1",
"acorn-walk": "^7.1.1",
"bfj": "^6.1.1",
"chalk": "^2.4.1",
"commander": "^2.18.0",
......@@ -16469,6 +16661,18 @@
"ws": "^6.0.0"
},
"dependencies": {
"acorn": {
"version": "7.1.1",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz",
"integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==",
"dev": true
},
"acorn-walk": {
"version": "7.1.1",
"resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.1.1.tgz",
"integrity": "sha512-wdlPY2tm/9XBr7QkKlq0WQVgiuGTX6YWPyRyBviSoScBuLfTVQhvwg6wJ369GJ/1nPfTLMfnrFIfjqVg6d+jQQ==",
"dev": true
},
"ws": {
"version": "6.2.1",
"resolved": "https://registry.npmjs.org/ws/-/ws-6.2.1.tgz",
......@@ -17001,12 +17205,13 @@
}
},
"yauzl": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.4.1.tgz",
"integrity": "sha1-lSj0QtqxsihOWLQ3m7GU4i4MQAU=",
"version": "2.10.0",
"resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz",
"integrity": "sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=",
"dev": true,
"requires": {
"fd-slicer": "~1.0.1"
"buffer-crc32": "~0.2.3",
"fd-slicer": "~1.1.0"
}
},
"yorkie": {
......
......@@ -21,6 +21,7 @@
"jquery": "^3.4.1",
"node-sass": "^4.13.1",
"popper.js": "^1.16.1",
"v-calendar": "^1.0.0-beta.23",
"vue": "^2.6.11",
"vue-multiselect": "^2.1.6",
"vue-router": "^3.1.5"
......@@ -35,7 +36,7 @@
"@vue/eslint-config-standard": "^5.1.0",
"@vue/test-utils": "1.0.0-beta.31",
"babel-eslint": "^10.0.3",
"chromedriver": "^80.0.0",
"chromedriver": "^80.0.1",
"eslint": "^6.7.2",
"eslint-plugin-import": "^2.20.1",
"eslint-plugin-node": "^11.0.0",
......
......@@ -6,7 +6,7 @@
User Name: {{ info.display_name }}<br />
New User Name: <input type="text" v-model="inputs.display_name"/><br />
ID: {{ info.id }}<br />
Groups:<div id="ms"><multiselect
Groups:<div class="thinMe"><multiselect
:options="groups"
:closeOnSelect="false"
:multiple="true"
......@@ -14,14 +14,15 @@
></multiselect></div><br />
Doorcode:<input type="text" v-model="doorcode"><br />
Access Times: NYI<br />
Blocked <input type="checkbox" name="blocked" :checked="info.expired"><br />
Expire User: <input type="checkbox" v-model="autoExpire"><br />
Set Expiry Date: <div class="thinMe"><v-date-picker v-model="date"></v-date-picker></div><br />
<input type="button" value="Cancel" @click="$emit('cancel')"><br />
<input type="button" value="Update" @click="update()"><br />
</div>
</template>
<style>
#ms {
.thinMe {
width: 20em;
position: relative;
left: 485px;
......@@ -33,6 +34,7 @@ import Multiselect from 'vue-multiselect'
import axios from 'axios'
import constants from '../constants'
/* eslint-disable vue/no-unused-components */
export default {
components: { Multiselect },
mounted () {
......@@ -65,6 +67,18 @@ export default {
.catch(error => {
console.log('getGroups', error)
})
axios.get(constants.APIHOST + '/users/' + this.info.id)
.then(response => {
console.log('getUser', response.data)
var exp = String(response.data.user.expires_at)
this.date = new Date(exp.slice(0, 10).replace(/-/g, '/'))
console.log('this.date', this.date, exp.slice(0, 10).replace(/-/g, '/'))
this.dateBefore = new Date(exp.slice(0, 10).replace(/-/g, '/'))
})
.catch(error => {
console.log('getUser', error)
})
},
data: function () {
return {
......@@ -72,13 +86,21 @@ export default {
groupsBefore: [],
groups: [],
groupIds: [],
inputs: { first_name: '', last_name: '', display_name: '', email: '', emplid: '', doorcode: '' },
toSubmit: {}
inputs: { first_name: '', last_name: '', display_name: '', email: '', emplid: '', doorcode: '', expires_at: '' },
toSubmit: {},
date: new Date(),
dateBefore: new Date(),
autoExpire: this.info.expired
}
},
props: ['info'],
methods: {
update: function () {
if (this.autoExpire && this.dateBefore > new Date()) {
this.inputs.expires_at = Date.prototype.toJSON.call(new Date())
} else if (this.date !== this.dateBefore) {
this.inputs.expires_at = Date.prototype.toJSON.call(this.date)
}
for (const i in this.inputs) {
var hasProp = Object.prototype.hasOwnProperty.call(this.inputs, i)
if (hasProp & this.inputs[i] !== '') {
......
......@@ -31,29 +31,80 @@ export default {
mounted () {
axios.get(constants.APIHOST + '/users')
.then(response => {
console.log(response.data.users)
console.log('userList', response.data.users)
for (const i in response.data.users) {
this.listU.push(response.data.users[i].first_name + response.data.users[i].last_name)
this.listU.push(response.data.users[i].first_name + ' ' + response.data.users[i].last_name)
this.listUid.push(response.data.users[i].id)
}
})
.catch(error => {
console.log(error)
console.log('userList', error)
})
axios.get(constants.APIHOST + '/groups/' + this.info.id + '/users')
.then(response => {
console.log('users4groups', response.data)
for (const i in response.data.users) {
this.selectedU.push(response.data.users[i].first_name + ' ' + response.data.users[i].last_name)
this.listUbef.push(response.data.users[i].id)
}
})
.catch(error => {
console.log('users4groups', error)
})
},
data: function () {
return {
listU: [],
listUid: [],
listUbef: [],
listD: [],
listG: [],
selectedU: '',
selectedD: '',
selectedG: ''
selectedU: [],
selectedD: [],
selectedG: []
}
},
props: ['info'],
methods: {
update: function () {
alert("this don't work yet lol")
var listUaft = []
var removeFrom = []
var addTo = []
for (const i in this.listU) {
if (this.selectedU.includes(this.listU[i])) {
listUaft.push(this.listUid[i])
}
}
for (const i in this.listUbef) {
if (!(this.listUbef[i] in listUaft)) {
removeFrom.push(this.listUbef[i])
}
}
for (const i in listUaft) {
if (!(listUaft[i] in this.listUbef)) {
addTo.push(listUaft[i])
}
}
for (const i in removeFrom) {
axios.delete(constants.APIHOST + '/users/' + removeFrom[i] + '/group/' + this.info.id)
.then(response => {
console.log('update: remove', response)
})
.catch(error => {
console.log('update: remove', error)
})
}
for (const i in addTo) {
axios.post(constants.APIHOST + '/users/' + addTo[i] + '/group/' + this.info.id)
.then(response => {
console.log('update: add', response)
})
.catch(error => {
console.log('update: add', error)
})
}
this.$emit('cancel')
}
}
}
......
import Vue from 'vue'
import App from './App.vue'
import router from './router'
import VCalendar from 'v-calendar'
window.Popper = require('popper.js').default
window.$ = window.jQuery = require('jquery')
require('bootstrap')
Vue.config.productionTip = false
Vue.use(VCalendar)
new Vue({
router,
render: h => h(App)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment