permission fix 1400-12-18
This commit is contained in:
@@ -480,7 +480,7 @@
|
||||
<a-list :locale="{emptyText:'رکوردی وجود ندارد.'}" bordered item-layout="horizontal">
|
||||
<a-list-item class="grid grid-cols-3" v-for="(item,index) in training" :key="index">
|
||||
<div>
|
||||
<a-button v-if="item.file" target="_blank" type="primary" :href="item.file.storage" class="mr-3">دانلود پیوست
|
||||
<a-button v-if="item.file" target="_blank" type="primary" :disabled="!$getAccess('personnel.train.download')" :href="item.file.storage" class="mr-3">دانلود پیوست
|
||||
</a-button>
|
||||
<a-tooltip placement="bottomRight">
|
||||
<template slot="title">
|
||||
@@ -506,7 +506,7 @@
|
||||
<a-button :disabled="!$getAccess('personnel.train.create')" class="mt-4 ml-2"
|
||||
@click="showAddEducationalInformation=true;isAlertUpload = false">افزودن ردیف
|
||||
</a-button>
|
||||
<a-button type="primary" @click="savefromPersonel" class="mt-5" :disabled="checkPermission('3')">
|
||||
<a-button type="primary" @click="savefromPersonel" class="mt-5" :disabled="checkPermission('2')">
|
||||
ویرایش
|
||||
</a-button>
|
||||
</a-tab-pane>
|
||||
@@ -656,7 +656,7 @@
|
||||
</a-list-item>
|
||||
</a-list>
|
||||
<a-button class="mt-3 ml-2" @click="showAddContract = true">افزودن ردیف</a-button>
|
||||
<a-button type="primary" @click="savefromPersonel" class="mt-5" :disabled="checkPermission('4')">
|
||||
<a-button type="primary" @click="savefromPersonel" class="mt-5" :disabled="checkPermission('3')">
|
||||
ویرایش
|
||||
</a-button>
|
||||
</a-tab-pane>
|
||||
@@ -691,7 +691,7 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<a-button type="primary" @click="savefromPersonel" class="mt-5" :disabled="checkPermission('5')">
|
||||
<a-button type="primary" @click="savefromPersonel" class="mt-5" :disabled="checkPermission('4')">
|
||||
ویرایش
|
||||
</a-button>
|
||||
</a-tab-pane>
|
||||
@@ -765,7 +765,7 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<a-button type="primary" @click="savefromPersonel" class="mt-5" :disabled="checkPermission('6')">
|
||||
<a-button type="primary" @click="savefromPersonel" class="mt-5" :disabled="checkPermission('5')">
|
||||
ویرایش
|
||||
</a-button>
|
||||
</a-tab-pane>
|
||||
@@ -798,7 +798,7 @@
|
||||
<a-button class="ml-2" :disabled="!$getAccess('personnel.function.create')"
|
||||
@click="showAddPerformance=true">افزودن ردیف
|
||||
</a-button>
|
||||
<a-button type="primary" @click="savefromPersonel" class="mt-5" :disabled="checkPermission('7')">
|
||||
<a-button type="primary" @click="savefromPersonel" class="mt-5" :disabled="checkPermission('6')">
|
||||
ویرایش
|
||||
</a-button>
|
||||
</a-tab-pane>
|
||||
@@ -835,7 +835,7 @@
|
||||
<a-button :disabled="!$getAccess('personnel.rule.create')" class="mt-4 ml-2"
|
||||
@click="showAddDocument=true;isAlertUpload = false">افزودن ردیف
|
||||
</a-button>
|
||||
<a-button type="primary" @click="savefromPersonel" class="mt-5" :disabled="checkPermission('8')">
|
||||
<a-button type="primary" @click="savefromPersonel" class="mt-5" :disabled="checkPermission('7')">
|
||||
ویرایش
|
||||
</a-button>
|
||||
</a-tab-pane>
|
||||
@@ -1328,13 +1328,13 @@ export default {
|
||||
},
|
||||
checkPermission(index) {
|
||||
const steps = {
|
||||
1: 'contract.basic.update',
|
||||
3: 'contract.train',
|
||||
4: 'contract.contract',
|
||||
5: 'contract.intro',
|
||||
6: 'contract.delivery',
|
||||
7: 'contract.function',
|
||||
8: 'contract.rule'
|
||||
1: 'personnel.basic.update',
|
||||
2: 'personnel.train.update',
|
||||
3: 'personnel.contract.update',
|
||||
4: 'personnel.intro',
|
||||
5: 'personnel.delivery',
|
||||
6: 'personnel.function.update',
|
||||
7: 'personnel.rule.update'
|
||||
}
|
||||
return !this.$getAccess(steps[index])
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user