Skip to content

Commit

Permalink
fix: fix calendar not showing in company pto policy page (#747)
Browse files Browse the repository at this point in the history
  • Loading branch information
djaiss committed Apr 11, 2021
1 parent ddd5a30 commit fb70d3a
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions resources/js/Pages/Adminland/CompanyPTOPolicy/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ td, th {
</div>

<div class="w-100 tr">
<a class="btn dib-l db mb2 mb0-ns" :data-cy="'list-edit-cancel-button-' + ptoPolicy.id" @click.prevent="idToUpdate = 0">
<a class="btn dib-l db mb2 mb0-ns mr2" :data-cy="'list-edit-cancel-button-' + ptoPolicy.id" @click.prevent="idToUpdate = 0">
{{ $t('app.cancel') }}
</a>
<loading-button :class="'btn add w-auto-ns w-100 mb2 pv2 ph3'" :data-cy="'list-edit-cta-button-' + ptoPolicy.id" :state="loadingState" :text="$t('app.update')" />
Expand Down Expand Up @@ -266,16 +266,6 @@ export default {
};
},
computed: {
isOff(holiday) {
let weekend = holiday.day_of_week == 0 || holiday.day_of_week == 6;
return {
weekend: weekend,
off: holiday.is_worked == false && !weekend,
};
},
},
watch: {
ptoPolicies: {
handler(value) {
Expand All @@ -290,6 +280,15 @@ export default {
},
methods: {
isOff: function (holiday) {
let weekend = holiday.day_of_week == 0 || holiday.day_of_week == 6;
return {
weekend: weekend,
off: holiday.is_worked == false && !weekend,
};
},
toggleUpdate(ptoPolicy) {
if (!this.editModal) {
this.load(ptoPolicy);
Expand Down

0 comments on commit fb70d3a

Please sign in to comment.