mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29:34 +00:00
Refactoring
This commit is contained in:
1 parent
66996747f4
commit
628c6afcb0
12 files changed
+25
-76
No files matched your search
@@ -71,7 +71,6 @@ export default {
|
||||
|
||||
data() {
|
||||
return {
|
||||
selectedEmployee: "",
|
||||
selectedEmployees: [],
|
||||
employees: null,
|
||||
teamName: this.team.name
|
||||
@@ -111,14 +110,9 @@ export default {
|
||||
|
||||
computed: {
|
||||
employeesOptions() {
|
||||
const selectedEmployeesIds = this.selectedEmployees.map(
|
||||
(employee) => employee.id
|
||||
)
|
||||
const employees = this.employees.filter(
|
||||
(employee) => !selectedEmployeesIds.includes(employee.id)
|
||||
)
|
||||
const unselectedEmployees = this.employees.filter(employee => this.selectedEmployees.find(e => e.id == employee.od))
|
||||
|
||||
return employees.map(employee => {
|
||||
return unselectedEmployees.map(employee => {
|
||||
return {
|
||||
key: employee.id,
|
||||
value: `${employee.name} ${employee.surname}`
|
||||
@@ -129,21 +123,7 @@ export default {
|
||||
showModal() {
|
||||
return this.show
|
||||
}
|
||||
},
|
||||
|
||||
watch: {
|
||||
selectedEmployee() {
|
||||
const selectedEmployee = this.selectedEmployee.split(" ")
|
||||
|
||||
const employee = this.employees.find(
|
||||
(e) =>
|
||||
e.name == selectedEmployee[0] &&
|
||||
e.surname == selectedEmployee[1]
|
||||
)
|
||||
|
||||
this.selectedEmployees.push(JSON.parse(JSON.stringify(employee)))
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -29,10 +29,10 @@
|
||||
</v-text-field>
|
||||
<v-icon
|
||||
class="remove-input"
|
||||
@click="removeInput(index)"
|
||||
@click.stop="removeInput(index)"
|
||||
icon="mdi-close"
|
||||
size="small"
|
||||
></v-icon
|
||||
></v-icon
|
||||
>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -5,9 +5,3 @@
|
||||
</v-main>
|
||||
</v-app>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'App'
|
||||
}
|
||||
</script>
|
||||
@@ -1,20 +1,16 @@
|
||||
import { createApp } from 'vue'
|
||||
import vuetify from './vuetify'
|
||||
import { IonicVue } from '@ionic/vue'
|
||||
import { loadFonts } from './webfontloader'
|
||||
import vuetify from './vuetify'
|
||||
import loader from 'vue-loading-overlay'
|
||||
import App from './App.vue'
|
||||
|
||||
import { IonicVue } from '@ionic/vue'
|
||||
|
||||
import router from './router'
|
||||
import store from '../../../store'
|
||||
import wToast from '@/plugins/w/toast'
|
||||
import i18n from '@/plugins/w/i18n'
|
||||
import store from '@/store'
|
||||
import w from '@/plugins/w/w'
|
||||
import vueCal from '@/plugins/app@vendor/vue-cal'
|
||||
import { Options } from '@/plugins/w/w/types'
|
||||
|
||||
|
||||
import '@ionic/vue/css/core.css'
|
||||
import '@ionic/vue/css/normalize.css'
|
||||
import '@ionic/vue/css/structure.css'
|
||||
@@ -29,15 +25,9 @@ import '@ionic/vue/css/display.css'
|
||||
import '@/plugins/app/_theme/index.sass'
|
||||
import 'vue-loading-overlay/dist/vue-loading.css'
|
||||
|
||||
// vue cal
|
||||
import VueCal from '@/plugins/app@vendor/vue-cal/index'
|
||||
|
||||
loadFonts()
|
||||
|
||||
const options: Options = {
|
||||
ionic: {
|
||||
disabled: false
|
||||
},
|
||||
i18n: {
|
||||
languages: [
|
||||
{
|
||||
@@ -89,12 +79,10 @@ const app = createApp(App)
|
||||
.use(w, options)
|
||||
.use(IonicVue)
|
||||
.use(vuetify)
|
||||
// .use(wToast)
|
||||
.use(VueCal)
|
||||
.use(vueCal)
|
||||
.use(loader, {
|
||||
color: '#6200EE'
|
||||
})
|
||||
.use(vueCal)
|
||||
.mount('#app')
|
||||
|
||||
// @ts-expect-error
|
||||
|
||||
@@ -82,6 +82,11 @@ const routes: Array<RouteRecordRaw> = [
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/:catchAll(.*)',
|
||||
name: '404',
|
||||
component: () => import('@/plugins/w@screen/404/404.vue')
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
// Styles
|
||||
import "@mdi/font/css/materialdesignicons.css";
|
||||
import "vuetify/styles";
|
||||
import { createVuetify } from "vuetify"
|
||||
import "@mdi/font/css/materialdesignicons.css"
|
||||
import "vuetify/styles"
|
||||
|
||||
// Vuetify
|
||||
import { createVuetify } from "vuetify";
|
||||
|
||||
export default createVuetify();
|
||||
// https://vuetifyjs.com/en/introduction/why-vuetify/#feature-guides
|
||||
export default createVuetify()
|
||||
@@ -1,17 +1,9 @@
|
||||
/**
|
||||
* plugins/webfontloader.js
|
||||
*
|
||||
* webfontloader documentation: https://github.com/typekit/webfontloader
|
||||
*/
|
||||
|
||||
export async function loadFonts() {
|
||||
const webFontLoader = await import(
|
||||
/* webpackChunkName: "webfontloader" */ "webfontloader"
|
||||
);
|
||||
const webFontLoader = await import('webfontloader')
|
||||
|
||||
webFontLoader.load({
|
||||
google: {
|
||||
families: ["Roboto:100,300,400,500,700,900&display=swap"],
|
||||
},
|
||||
});
|
||||
webFontLoader.load({
|
||||
google: {
|
||||
families: ['Roboto:100,300,400,500,700,900&display=swap']
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
span.highlight {
|
||||
color: #7F39FB;
|
||||
}/*# sourceMappingURL=global.css.map */
|
||||
@@ -1 +0,0 @@
|
||||
{"version":3,"sources":["global.sass","global.css"],"names":[],"mappings":"AAAA;EACC,cAAA;ACCD","file":"global.css"}
|
||||
@@ -55,7 +55,6 @@ export default {
|
||||
try {
|
||||
await this.$axios.delete(`v1/teams/${id}`)
|
||||
this.showDeleteModal = false
|
||||
this.$toast.success('Úspešne ste odstránili task')
|
||||
} catch (error) {
|
||||
this.$toast.error(error)
|
||||
}
|
||||
|
||||
@@ -53,7 +53,6 @@ export default {
|
||||
try {
|
||||
await this.$axios.delete(`v1/teams/${id}`)
|
||||
this.showDeleteModal = false
|
||||
this.$toast.success('Úspešne ste odstránili task')
|
||||
} catch (error) {
|
||||
this.$toast.error(error)
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
<div class="d-flex justify-start">
|
||||
<img class="pencil-icon" :src="require('@/plugins/tm@overview/_img/pencil-icon.svg')" alt="pencil-icon" @click.stop="showEditModal = true" />
|
||||
<img class="trash-icon" :src="require('@/plugins/tm@overview/_img/trash-icon.svg')" alt="trash-icon" @click.stop="showDeleteModal = true" />
|
||||
|
||||
<A-edit-team-modal :show="showEditModal" :team="team" @close-modal="showEditModal = false" />
|
||||
<A-delete-team-modal :show="showDeleteModal" :team="team" @delete-team="deleteTeam" @close-modal="showDeleteModal = false" />
|
||||
</div>
|
||||
@@ -52,7 +53,6 @@ export default {
|
||||
try {
|
||||
await this.$axios.delete(`v1/teams/${id}`)
|
||||
this.showDeleteModal = false
|
||||
this.$toast.success('Úspešne ste odstránili tím')
|
||||
} catch (error) {
|
||||
this.$toast.error(error)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user