mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29:34 +00:00
[Refacotr] Button styles
This commit is contained in:
1 parent
cd2127e028
commit
d5900b605e
6 files changed
+51
-25
No files matched your search
@@ -1,18 +1,44 @@
|
|||||||
.button.primary
|
:root
|
||||||
background: #7f39fb !important
|
--color-primary: #7F39FB
|
||||||
border-radius: 4px !important
|
--color-primary-contrast: #ffffff
|
||||||
color: #fff !important
|
--color-primary-shade: #5716c6
|
||||||
height: 50px
|
|
||||||
width: 100%
|
|
||||||
flex: 0 0 auto
|
|
||||||
|
|
||||||
.button.secondary
|
.button
|
||||||
color: #6200EE
|
height: 50px !important
|
||||||
border: 1px solid #E0E0E0
|
min-width: 203px
|
||||||
border-radius: 4px
|
border-radius: 4px !important
|
||||||
height: 50px
|
border-width: 1px
|
||||||
width: 203px
|
|
||||||
|
&.half
|
||||||
|
width: 50%
|
||||||
|
|
||||||
|
&.block
|
||||||
|
width: 100%
|
||||||
|
|
||||||
|
&.primary
|
||||||
|
background-color: var(--color-primary)
|
||||||
|
border-color: var(--color-primary)
|
||||||
|
color: var(--color-primary-contrast)
|
||||||
|
|
||||||
|
&:hover,
|
||||||
|
&:active
|
||||||
|
background-color: var(--color-primary-shade)
|
||||||
|
border-color: var(--color-primary-shade)
|
||||||
|
color: var(--color-primary-contrast)
|
||||||
|
|
||||||
|
&.outline
|
||||||
|
background-color: var(--color-primary-contrast)
|
||||||
|
border-color: var(--color-primary)
|
||||||
|
color: var(--color-primary)
|
||||||
|
|
||||||
|
&:hover,
|
||||||
|
&:active
|
||||||
|
background-color: var(--color-primary-shade)
|
||||||
|
border-color: var(--color-primary-shade)
|
||||||
|
color: var(--color-primary-contrast)
|
||||||
|
|
||||||
.button.cancel
|
.button.cancel
|
||||||
|
height: 50px
|
||||||
|
width: 100%
|
||||||
border: thin solid rgba(var(--v-border-color), var(--v-border-opacity)) !important
|
border: thin solid rgba(var(--v-border-color), var(--v-border-opacity)) !important
|
||||||
color: #7f39fb !important
|
color: #7f39fb !important
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
<W-loadable :content="masterTask" class="h-100">
|
<W-loadable :content="masterTask" class="h-100">
|
||||||
<v-card v-if="editMode" height="100%" class="d-flex flex-column scrolling">
|
<v-card v-if="editMode" height="100%" class="d-flex flex-column scrolling">
|
||||||
<div class="d-flex justify-space-between align-center modal-header">
|
<div class="d-flex justify-space-between align-center modal-header">
|
||||||
<h1>{{ masterTask.id ? 'Upraviť master task' : 'Vytvoriť master task' }}</h1>
|
<h1>{{ masterTask?.id ? 'Upraviť master task' : 'Vytvoriť master task' }}</h1>
|
||||||
<v-icon
|
<v-icon
|
||||||
@click.stop="closeModal()"
|
@click.stop="closeModal()"
|
||||||
icon="mdi-close"
|
icon="mdi-close"
|
||||||
@@ -215,7 +215,7 @@
|
|||||||
</v-col>
|
</v-col>
|
||||||
<v-col cols="7">
|
<v-col cols="7">
|
||||||
<v-sheet class="ma-2">
|
<v-sheet class="ma-2">
|
||||||
<p>{{ (masterTask.duration).toFixed(2) }} h</p>
|
<p>{{ masterTask?.duration?.toFixed(2) }} h</p>
|
||||||
</v-sheet>
|
</v-sheet>
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
@@ -233,7 +233,7 @@
|
|||||||
</v-col>
|
</v-col>
|
||||||
<v-col cols="7">
|
<v-col cols="7">
|
||||||
<v-sheet class="ma-2">
|
<v-sheet class="ma-2">
|
||||||
<p :class="masterTask.worked_time > masterTask.duration ? 'text-red-darken-4': 'text-black'">{{ (masterTask.worked_time).toFixed(2) }} h</p>
|
<p :class="masterTask.worked_time > masterTask.duration ? 'text-red-darken-4': 'text-black'">{{ (masterTask.worked_time)?.toFixed(2) }} h</p>
|
||||||
</v-sheet>
|
</v-sheet>
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
@@ -251,7 +251,7 @@
|
|||||||
</v-col>
|
</v-col>
|
||||||
<v-col cols="7">
|
<v-col cols="7">
|
||||||
<v-sheet class="ma-2">
|
<v-sheet class="ma-2">
|
||||||
<p :class="masterTask.worked_time > masterTask.duration ? 'text-red-darken-4': 'text-black'">{{ (masterTask.duration - masterTask.worked_time).toFixed(2) }} h</p>
|
<p :class="masterTask.worked_time > masterTask.duration ? 'text-red-darken-4': 'text-black'">{{ (masterTask.duration - masterTask.worked_time)?.toFixed(2) }} h</p>
|
||||||
</v-sheet>
|
</v-sheet>
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
@@ -375,7 +375,7 @@ export default {
|
|||||||
this.employees = tmUtils.enrichEmployeesByFullName(employees)
|
this.employees = tmUtils.enrichEmployeesByFullName(employees)
|
||||||
|
|
||||||
if (masterTask?.id) {
|
if (masterTask?.id) {
|
||||||
this.masterTask = await this.$axios.get_auth_data(`v1/master-tasks/${masterTask.id}`)
|
this.masterTask = await this.$axios.get_auth_data(`v1/mastertasks/${masterTask.id}`)
|
||||||
this.teamSelect = this.masterTask.team.id
|
this.teamSelect = this.masterTask.team.id
|
||||||
} else {
|
} else {
|
||||||
this.masterTask = {team: {}, employees: []}
|
this.masterTask = {team: {}, employees: []}
|
||||||
@@ -393,7 +393,7 @@ export default {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
if (this.masterTask.id)
|
if (this.masterTask.id)
|
||||||
await this.$axios.patch_auth(`v1/master-tasks/${this.masterTask.id}`, this.masterTask)
|
await this.$axios.put_auth(`v1/mastertasks/${this.masterTask.id}`, this.masterTask)
|
||||||
|
|
||||||
else
|
else
|
||||||
await this.$axios.post_auth('v1/mastertasks', this.masterTask)
|
await this.$axios.post_auth('v1/mastertasks', this.masterTask)
|
||||||
|
|||||||
@@ -11,8 +11,8 @@
|
|||||||
></v-icon>
|
></v-icon>
|
||||||
</div>
|
</div>
|
||||||
<v-card-actions class="mt-10 d-flex justify-start align-center">
|
<v-card-actions class="mt-10 d-flex justify-start align-center">
|
||||||
<v-btn class="button primary" variant="flat" @click="deleteTask()">ÁNO</v-btn>
|
<v-btn class="button primary half" variant="flat" @click="deleteTask()">ÁNO</v-btn>
|
||||||
<v-btn class="ml-7 button cancel" @click.stop="closeModal()">ZRUŠIŤ</v-btn>
|
<v-btn class="button primary half outline" @click.stop="closeModal()">ZRUŠIŤ</v-btn>
|
||||||
</v-card-actions>
|
</v-card-actions>
|
||||||
</v-card>
|
</v-card>
|
||||||
</v-dialog>
|
</v-dialog>
|
||||||
|
|||||||
@@ -418,7 +418,7 @@ export default {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
if (this.task.id) {
|
if (this.task.id) {
|
||||||
await this.$axios.patch_auth(`v1/master-tasks/${this.task.id}`, this.task)
|
await this.$axios.put_auth(`v1/mastertasks/${this.task.id}`, this.task)
|
||||||
} else {
|
} else {
|
||||||
await this.$axios.post_auth('v1/mastertasks', this.task)
|
await this.$axios.post_auth('v1/mastertasks', this.task)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,8 +9,8 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<v-card-actions class="mt-10 d-flex justify-start align-center">
|
<v-card-actions class="mt-10 d-flex justify-start align-center">
|
||||||
<v-btn class="button primary" variant="flat" @click="deleteTeam()">ÁNO</v-btn>
|
<v-btn class="button primary half" variant="flat" @click="deleteTeam()">ÁNO</v-btn>
|
||||||
<v-btn class="ml-7 button cancel" @click.stop="closeModal()">ZRUŠIŤ</v-btn>
|
<v-btn class="button primary half outline" @click.stop="closeModal()">ZRUŠIŤ</v-btn>
|
||||||
</v-card-actions>
|
</v-card-actions>
|
||||||
</v-card>
|
</v-card>
|
||||||
</v-dialog>
|
</v-dialog>
|
||||||
|
|||||||
@@ -55,7 +55,7 @@
|
|||||||
/>
|
/>
|
||||||
</v-card-actions>
|
</v-card-actions>
|
||||||
|
|
||||||
<v-btn class="button primary" @click="save()">{{ team.id ? 'UPRAVIŤ' : 'VYTVORIŤ' }}</v-btn>
|
<v-btn class="button primary block" @click="save()">{{ team.id ? 'UPRAVIŤ' : 'VYTVORIŤ' }}</v-btn>
|
||||||
</v-card>
|
</v-card>
|
||||||
</W-loadable>
|
</W-loadable>
|
||||||
</v-dialog>
|
</v-dialog>
|
||||||
|
|||||||
Reference in new issue
Block a user