mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/unity.git
synced 2026-08-19 04:13:58 +00:00
hide id
This commit is contained in:
@@ -21,11 +21,15 @@ class Admin extends Authenticatable
|
|||||||
protected $table = 'admins';
|
protected $table = 'admins';
|
||||||
|
|
||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'name', 'email', 'password',
|
'id',
|
||||||
|
'name',
|
||||||
|
'email',
|
||||||
|
'password'
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $hidden = [
|
protected $hidden = [
|
||||||
'password', 'pivot'
|
'password',
|
||||||
|
'pivot'
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $appends = ['hash_id', 'role_list', 'permission_list'];
|
protected $appends = ['hash_id', 'role_list', 'permission_list'];
|
||||||
|
|||||||
+21
-2
@@ -11,10 +11,19 @@ class Contract extends Model
|
|||||||
{
|
{
|
||||||
protected $table = 'contracts';
|
protected $table = 'contracts';
|
||||||
|
|
||||||
protected $appends = ['hash_id', 'contract_obligation_list', 'contract_entity_list'];
|
protected $appends = [
|
||||||
|
'hash_id',
|
||||||
|
'user_hash_id',
|
||||||
|
'contract_template_hash_id',
|
||||||
|
'contract_obligation_list',
|
||||||
|
'contract_entity_list'
|
||||||
|
];
|
||||||
|
|
||||||
protected $hidden = [
|
protected $hidden = [
|
||||||
'id', 'in_time_contract_template',
|
'id',
|
||||||
|
'user_id',
|
||||||
|
'contract_template_id',
|
||||||
|
'in_time_contract_template'
|
||||||
];
|
];
|
||||||
|
|
||||||
public function contract_obligation()
|
public function contract_obligation()
|
||||||
@@ -32,6 +41,16 @@ class Contract extends Model
|
|||||||
return Hasher::encode('contracts', $this->id);
|
return Hasher::encode('contracts', $this->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getUserHashIdAttribute()
|
||||||
|
{
|
||||||
|
return Hasher::encode('users', $this->user_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getContractTemplateHashIdAttribute()
|
||||||
|
{
|
||||||
|
return Hasher::encode('contract_templates', $this->contract_template_id);
|
||||||
|
}
|
||||||
|
|
||||||
public function getContractObligationListAttribute()
|
public function getContractObligationListAttribute()
|
||||||
{
|
{
|
||||||
return $this->contract_obligation()->get()->makeHidden(['contract_list']);
|
return $this->contract_obligation()->get()->makeHidden(['contract_list']);
|
||||||
|
|||||||
@@ -11,7 +11,11 @@ class ContractEntity extends Model
|
|||||||
{
|
{
|
||||||
protected $table = 'contract_entities';
|
protected $table = 'contract_entities';
|
||||||
|
|
||||||
protected $appends = ['hash_id', 'entity_signature_hash_id', 'contract_list', 'entity_list'];
|
protected $appends = ['hash_id', 'user_hash_id', 'contract_hash_id', 'entity_hash_id', 'entity_signature_hash_id', 'contract_list', 'entity_list'];
|
||||||
|
|
||||||
|
protected $hidden = [
|
||||||
|
'id', 'user_id', 'contract_id', 'entity_id', 'entity_sinature_id',
|
||||||
|
];
|
||||||
|
|
||||||
public function contract()
|
public function contract()
|
||||||
{
|
{
|
||||||
@@ -28,6 +32,21 @@ class ContractEntity extends Model
|
|||||||
return Hasher::encode('contract_entities', $this->id);
|
return Hasher::encode('contract_entities', $this->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getUserHashIdAttribute()
|
||||||
|
{
|
||||||
|
return Hasher::encode('users', $this->user_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getContractHashIdAttribute()
|
||||||
|
{
|
||||||
|
return Hasher::encode('contracts', $this->contract_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getEntityHashIdAttribute()
|
||||||
|
{
|
||||||
|
return Hasher::encode('entities', $this->entity_id);
|
||||||
|
}
|
||||||
|
|
||||||
public function getEntitySignatureHashIdAttribute()
|
public function getEntitySignatureHashIdAttribute()
|
||||||
{
|
{
|
||||||
return Hasher::encode('entity_signatures', $this->entity_signature_id);
|
return Hasher::encode('entity_signatures', $this->entity_signature_id);
|
||||||
|
|||||||
@@ -13,7 +13,9 @@ class ContractObligation extends Model
|
|||||||
|
|
||||||
protected $appends = [
|
protected $appends = [
|
||||||
'hash_id',
|
'hash_id',
|
||||||
|
'user_hash_id',
|
||||||
'contract_hash_id',
|
'contract_hash_id',
|
||||||
|
'contract_template_obligation_hash_id',
|
||||||
'contract_list',
|
'contract_list',
|
||||||
'contract_obligation_dependency_list',
|
'contract_obligation_dependency_list',
|
||||||
'depend_contract_obligation_dependency_list',
|
'depend_contract_obligation_dependency_list',
|
||||||
@@ -22,6 +24,11 @@ class ContractObligation extends Model
|
|||||||
];
|
];
|
||||||
|
|
||||||
protected $hidden = [
|
protected $hidden = [
|
||||||
|
'id',
|
||||||
|
'user_id',
|
||||||
|
'contract_id',
|
||||||
|
'contract_template_obligation_id',
|
||||||
|
'contract_entity_id',
|
||||||
'in_time_contract_obligation_template',
|
'in_time_contract_obligation_template',
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -55,11 +62,26 @@ class ContractObligation extends Model
|
|||||||
return Hasher::encode('contract_obligations', $this->id);
|
return Hasher::encode('contract_obligations', $this->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getUserHashIdAttribute()
|
||||||
|
{
|
||||||
|
return Hasher::encode('users', $this->user_id);
|
||||||
|
}
|
||||||
|
|
||||||
public function getContractHashIdAttribute()
|
public function getContractHashIdAttribute()
|
||||||
{
|
{
|
||||||
return Hasher::encode('contracts', $this->contract_id);
|
return Hasher::encode('contracts', $this->contract_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getContractTemplateObligationHashIdAttribute()
|
||||||
|
{
|
||||||
|
return Hasher::encode('contract_template_obligations', $this->contract_template_obligation_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getContractEntityHashIdAttribute()
|
||||||
|
{
|
||||||
|
return Hasher::encode('contract_entities', $this->contract_entity_id);
|
||||||
|
}
|
||||||
|
|
||||||
public function getContractListAttribute()
|
public function getContractListAttribute()
|
||||||
{
|
{
|
||||||
return $this->contract()->get()->makeHidden(['contract_obligation_list']);
|
return $this->contract()->get()->makeHidden(['contract_obligation_list']);
|
||||||
|
|||||||
@@ -13,12 +13,21 @@ class ContractObligationContractDependency extends Model
|
|||||||
|
|
||||||
protected $appends = [
|
protected $appends = [
|
||||||
'hash_id',
|
'hash_id',
|
||||||
|
'user_hash_id',
|
||||||
'contract_obligation_hash_id',
|
'contract_obligation_hash_id',
|
||||||
'depend_contract_hash_id',
|
'depend_contract_hash_id',
|
||||||
'contract_obligation_list',
|
'contract_obligation_list',
|
||||||
'depend_contract_list'
|
'depend_contract_list'
|
||||||
];
|
];
|
||||||
|
|
||||||
|
protected $hidden = [
|
||||||
|
'id',
|
||||||
|
'user_id',
|
||||||
|
'contract_id',
|
||||||
|
'contract_obligation_id',
|
||||||
|
'depend_contract_id',
|
||||||
|
];
|
||||||
|
|
||||||
public function contract_obligation()
|
public function contract_obligation()
|
||||||
{
|
{
|
||||||
return $this->belongsTo('App\Models\ContractObligation', 'contract_obligation_id');
|
return $this->belongsTo('App\Models\ContractObligation', 'contract_obligation_id');
|
||||||
@@ -34,6 +43,11 @@ class ContractObligationContractDependency extends Model
|
|||||||
return Hasher::encode('contract_obligation_contract_dependencies', $this->id);
|
return Hasher::encode('contract_obligation_contract_dependencies', $this->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getUserHashIdAttribute()
|
||||||
|
{
|
||||||
|
return Hasher::encode('users', $this->user_id);
|
||||||
|
}
|
||||||
|
|
||||||
public function getContractObligationHashIdAttribute()
|
public function getContractObligationHashIdAttribute()
|
||||||
{
|
{
|
||||||
return Hasher::encode('contract_obligations', $this->contract_obligation_id);
|
return Hasher::encode('contract_obligations', $this->contract_obligation_id);
|
||||||
|
|||||||
@@ -19,6 +19,13 @@ class ContractObligationDependency extends Model
|
|||||||
'depend_contract_obligation_list'
|
'depend_contract_obligation_list'
|
||||||
];
|
];
|
||||||
|
|
||||||
|
protected $hidden = [
|
||||||
|
'id',
|
||||||
|
'user_id',
|
||||||
|
'contract_obligation_id',
|
||||||
|
'depend_contract_obligation_id',
|
||||||
|
];
|
||||||
|
|
||||||
public function contract_obligation()
|
public function contract_obligation()
|
||||||
{
|
{
|
||||||
return $this->belongsTo('App\Models\ContractObligation', 'contract_obligation_id');
|
return $this->belongsTo('App\Models\ContractObligation', 'contract_obligation_id');
|
||||||
|
|||||||
@@ -11,7 +11,16 @@ class ContractTemplate extends Model
|
|||||||
{
|
{
|
||||||
protected $table = 'contract_templates';
|
protected $table = 'contract_templates';
|
||||||
|
|
||||||
protected $appends = ['hash_id', 'contract_template_obligation_list'];
|
protected $appends = [
|
||||||
|
'hash_id',
|
||||||
|
'user_hash_id',
|
||||||
|
'contract_template_obligation_list'
|
||||||
|
];
|
||||||
|
|
||||||
|
protected $hidden = [
|
||||||
|
'id',
|
||||||
|
'user_id',
|
||||||
|
];
|
||||||
|
|
||||||
public function contract_template_obligation()
|
public function contract_template_obligation()
|
||||||
{
|
{
|
||||||
@@ -23,6 +32,11 @@ class ContractTemplate extends Model
|
|||||||
return Hasher::encode('contract_templates', $this->id);
|
return Hasher::encode('contract_templates', $this->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getUserHashIdAttribute()
|
||||||
|
{
|
||||||
|
return Hasher::encode('users', $this->user_id);
|
||||||
|
}
|
||||||
|
|
||||||
public function getContractTemplateObligationListAttribute()
|
public function getContractTemplateObligationListAttribute()
|
||||||
{
|
{
|
||||||
return $this->contract_template_obligation()
|
return $this->contract_template_obligation()
|
||||||
|
|||||||
@@ -13,12 +13,20 @@ class ContractTemplateObligation extends Model
|
|||||||
|
|
||||||
protected $appends = [
|
protected $appends = [
|
||||||
'hash_id',
|
'hash_id',
|
||||||
|
'user_hash_id',
|
||||||
|
'contract_template_hash_id',
|
||||||
'contract_template_list',
|
'contract_template_list',
|
||||||
'contract_template_obligation_dependency_list',
|
'contract_template_obligation_dependency_list',
|
||||||
'depend_contract_template_obligation_dependency_list',
|
'depend_contract_template_obligation_dependency_list',
|
||||||
'contract_template_obligation_contract_template_dependency_list'
|
'contract_template_obligation_contract_template_dependency_list'
|
||||||
];
|
];
|
||||||
|
|
||||||
|
protected $hidden = [
|
||||||
|
'id',
|
||||||
|
'user_id',
|
||||||
|
'contract_template_id'
|
||||||
|
];
|
||||||
|
|
||||||
public function contract_template()
|
public function contract_template()
|
||||||
{
|
{
|
||||||
return $this->belongsTo('App\Models\ContractTemplate', 'contract_template_id');
|
return $this->belongsTo('App\Models\ContractTemplate', 'contract_template_id');
|
||||||
@@ -44,6 +52,16 @@ class ContractTemplateObligation extends Model
|
|||||||
return Hasher::encode('contract_template_obligations', $this->id);
|
return Hasher::encode('contract_template_obligations', $this->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getUserHashIdAttribute()
|
||||||
|
{
|
||||||
|
return Hasher::encode('users', $this->user_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getContractTemplateHashIdAttribute()
|
||||||
|
{
|
||||||
|
return Hasher::encode('contract_templates', $this->contract_template_id);
|
||||||
|
}
|
||||||
|
|
||||||
public function getContractTemplateListAttribute()
|
public function getContractTemplateListAttribute()
|
||||||
{
|
{
|
||||||
return $this->contract_template()->get()->makeHidden(['contract_template_obligation_list']);
|
return $this->contract_template()->get()->makeHidden(['contract_template_obligation_list']);
|
||||||
|
|||||||
@@ -13,12 +13,20 @@ class ContractTemplateObligationContractTemplateDependency extends Model
|
|||||||
|
|
||||||
protected $appends = [
|
protected $appends = [
|
||||||
'hash_id',
|
'hash_id',
|
||||||
|
'user_hash_id',
|
||||||
'contract_template_obligation_hash_id',
|
'contract_template_obligation_hash_id',
|
||||||
'depend_contract_template_hash_id',
|
'depend_contract_template_hash_id',
|
||||||
'contract_template_obligation_list',
|
'contract_template_obligation_list',
|
||||||
'depend_contract_template_list'
|
'depend_contract_template_list'
|
||||||
];
|
];
|
||||||
|
|
||||||
|
protected $hidden = [
|
||||||
|
'id',
|
||||||
|
'user_id',
|
||||||
|
'contract_template_obligation_id',
|
||||||
|
'depend_contract_template_id'
|
||||||
|
];
|
||||||
|
|
||||||
public function contract_template_obligation()
|
public function contract_template_obligation()
|
||||||
{
|
{
|
||||||
return $this->belongsTo('App\Models\ContractTemplateObligation', 'contract_template_obligation_id');
|
return $this->belongsTo('App\Models\ContractTemplateObligation', 'contract_template_obligation_id');
|
||||||
@@ -34,6 +42,11 @@ class ContractTemplateObligationContractTemplateDependency extends Model
|
|||||||
return Hasher::encode('contract_template_obligation_contract_template_dependencies', $this->id);
|
return Hasher::encode('contract_template_obligation_contract_template_dependencies', $this->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getUserHashIdAttribute()
|
||||||
|
{
|
||||||
|
return Hasher::encode('users', $this->user_id);
|
||||||
|
}
|
||||||
|
|
||||||
public function getContractTemplateObligationHashIdAttribute()
|
public function getContractTemplateObligationHashIdAttribute()
|
||||||
{
|
{
|
||||||
return Hasher::encode('contract_template_obligations', $this->contract_template_obligation_id);
|
return Hasher::encode('contract_template_obligations', $this->contract_template_obligation_id);
|
||||||
|
|||||||
@@ -13,12 +13,20 @@ class ContractTemplateObligationDependency extends Model
|
|||||||
|
|
||||||
protected $appends = [
|
protected $appends = [
|
||||||
'hash_id',
|
'hash_id',
|
||||||
|
'user_hash_id',
|
||||||
'contract_template_obligation_hash_id',
|
'contract_template_obligation_hash_id',
|
||||||
'depend_contract_template_obligation_hash_id',
|
'depend_contract_template_obligation_hash_id',
|
||||||
'contract_template_obligation_list',
|
'contract_template_obligation_list',
|
||||||
'depend_contract_template_obligation_list'
|
'depend_contract_template_obligation_list'
|
||||||
];
|
];
|
||||||
|
|
||||||
|
protected $hidden = [
|
||||||
|
'id',
|
||||||
|
'user_id',
|
||||||
|
'contract_template_obligation_id',
|
||||||
|
'depend_contract_template_obligation_id'
|
||||||
|
];
|
||||||
|
|
||||||
public function contract_template_obligation()
|
public function contract_template_obligation()
|
||||||
{
|
{
|
||||||
return $this->belongsTo('App\Models\ContractTemplateObligation', 'contract_template_obligation_id');
|
return $this->belongsTo('App\Models\ContractTemplateObligation', 'contract_template_obligation_id');
|
||||||
@@ -34,6 +42,11 @@ class ContractTemplateObligationDependency extends Model
|
|||||||
return Hasher::encode('contract_template_obligation_dependencies', $this->id);
|
return Hasher::encode('contract_template_obligation_dependencies', $this->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getUserHashIdAttribute()
|
||||||
|
{
|
||||||
|
return Hasher::encode('users', $this->user_id);
|
||||||
|
}
|
||||||
|
|
||||||
public function getContractTemplateObligationHashIdAttribute()
|
public function getContractTemplateObligationHashIdAttribute()
|
||||||
{
|
{
|
||||||
return Hasher::encode('contract_template_obligations', $this->contract_template_obligation_id);
|
return Hasher::encode('contract_template_obligations', $this->contract_template_obligation_id);
|
||||||
|
|||||||
+15
-1
@@ -11,7 +11,16 @@ class Entity extends Model
|
|||||||
{
|
{
|
||||||
protected $table = 'entities';
|
protected $table = 'entities';
|
||||||
|
|
||||||
protected $appends = ['hash_id', 'entity_signature_list'];
|
protected $appends = [
|
||||||
|
'hash_id',
|
||||||
|
'user_id',
|
||||||
|
'entity_signature_list'
|
||||||
|
];
|
||||||
|
|
||||||
|
protected $hidden = [
|
||||||
|
'id',
|
||||||
|
'user_id',
|
||||||
|
];
|
||||||
|
|
||||||
public function entity_signature()
|
public function entity_signature()
|
||||||
{
|
{
|
||||||
@@ -23,6 +32,11 @@ class Entity extends Model
|
|||||||
return Hasher::encode('entities', $this->id);
|
return Hasher::encode('entities', $this->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getUserHashIdAttribute()
|
||||||
|
{
|
||||||
|
return Hasher::encode('users', $this->user_id);
|
||||||
|
}
|
||||||
|
|
||||||
public function getEntitySignatureListAttribute()
|
public function getEntitySignatureListAttribute()
|
||||||
{
|
{
|
||||||
return $this->entity_signature()->get()->makeHidden(['entity_list']);
|
return $this->entity_signature()->get()->makeHidden(['entity_list']);
|
||||||
|
|||||||
@@ -11,7 +11,16 @@ class EntitySignature extends Model
|
|||||||
{
|
{
|
||||||
protected $table = 'entity_signatures';
|
protected $table = 'entity_signatures';
|
||||||
|
|
||||||
protected $appends = ['hash_id', 'entity_list'];
|
protected $appends = [
|
||||||
|
'hash_id',
|
||||||
|
'entity_hash_id',
|
||||||
|
'entity_list'
|
||||||
|
];
|
||||||
|
|
||||||
|
protected $hidden = [
|
||||||
|
'id',
|
||||||
|
'entity_id',
|
||||||
|
];
|
||||||
|
|
||||||
public function entity()
|
public function entity()
|
||||||
{
|
{
|
||||||
@@ -23,6 +32,11 @@ class EntitySignature extends Model
|
|||||||
return Hasher::encode('entity_signatures', $this->id);
|
return Hasher::encode('entity_signatures', $this->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getEntityHashIdAttribute()
|
||||||
|
{
|
||||||
|
return Hasher::encode('entities', $this->entity_id);
|
||||||
|
}
|
||||||
|
|
||||||
public function getEntityListAttribute()
|
public function getEntityListAttribute()
|
||||||
{
|
{
|
||||||
return $this->entity()->get()->makeHidden(['entity_signature_list']);
|
return $this->entity()->get()->makeHidden(['entity_signature_list']);
|
||||||
|
|||||||
@@ -15,7 +15,13 @@ class Permission extends Model
|
|||||||
'pivot'
|
'pivot'
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $appends = ['hash_id'];
|
protected $appends = [
|
||||||
|
'hash_id'
|
||||||
|
];
|
||||||
|
|
||||||
|
protected $hidden = [
|
||||||
|
'id',
|
||||||
|
];
|
||||||
|
|
||||||
public function getHashIdAttribute()
|
public function getHashIdAttribute()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ class Role extends Model
|
|||||||
protected $appends = ['hash_id', 'permission_list'];
|
protected $appends = ['hash_id', 'permission_list'];
|
||||||
|
|
||||||
protected $hidden = [
|
protected $hidden = [
|
||||||
|
'id',
|
||||||
'pivot'
|
'pivot'
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
+8
-3
@@ -24,11 +24,16 @@ class User extends Authenticatable
|
|||||||
'name', 'email', 'password',
|
'name', 'email', 'password',
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $hidden = [
|
protected $appends = [
|
||||||
'password',
|
'hash_id',
|
||||||
|
'role_list',
|
||||||
|
'permission_list'
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $appends = ['hash_id', 'role_list', 'permission_list'];
|
protected $hidden = [
|
||||||
|
'id',
|
||||||
|
'password'
|
||||||
|
];
|
||||||
|
|
||||||
public function getHashIdAttribute()
|
public function getHashIdAttribute()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -46,12 +46,17 @@
|
|||||||
<tr v-if="contract_template_list.data" v-for="(contract, $index) in contract_template_list.data" :key="$index">
|
<tr v-if="contract_template_list.data" v-for="(contract, $index) in contract_template_list.data" :key="$index">
|
||||||
<td>{{ $index + 1 }}</td>
|
<td>{{ $index + 1 }}</td>
|
||||||
<td>
|
<td>
|
||||||
|
<div><b>Hash Id</b>: {{ contract.hash_id }}</div>
|
||||||
<div><b>Name</b>: {{ contract.name }}</div>
|
<div><b>Name</b>: {{ contract.name }}</div>
|
||||||
<div><b>Complete Day Range</b>: {{ contract.complete_day_range }}</div>
|
<div><b>Complete Day Range</b>: {{ contract.complete_day_range }}</div>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<div v-if="contract.contract_template_obligation_list" v-for="(obligation, $index) in contract.contract_template_obligation_list" :key="$index">
|
<div v-if="contract.contract_template_obligation_list" v-for="(obligation, $index) in contract.contract_template_obligation_list" :key="$index">
|
||||||
<div>-{{ obligation.name }} <small>({{ obligation.sequence }})</small></div>
|
<div>
|
||||||
|
-{{ obligation.name }}
|
||||||
|
<small>({{ obligation.hash_id }})</small>
|
||||||
|
<small>({{ obligation.sequence }})</small>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="!contract.contract_template_obligation_list[0]">
|
<div v-if="!contract.contract_template_obligation_list[0]">
|
||||||
-
|
-
|
||||||
|
|||||||
@@ -7,14 +7,14 @@
|
|||||||
<i class="fa fa-filter"></i>
|
<i class="fa fa-filter"></i>
|
||||||
</button>
|
</button>
|
||||||
<div v-if="filter_status" class="filter dropdown-menu show">
|
<div v-if="filter_status" class="filter dropdown-menu show">
|
||||||
<contract-template-filter
|
<entity-template-filter
|
||||||
:form="form"
|
:form="form"
|
||||||
@clicked="filterSubmit"
|
@clicked="filterSubmit"
|
||||||
@reset="FilterReset"
|
@reset="FilterReset"
|
||||||
></contract-template-filter>
|
></entity-template-filter>
|
||||||
</div>
|
</div>
|
||||||
</b-col>
|
</b-col>
|
||||||
<b-col md="6" v-if="permission_list.includes('add contract')" class="text-right">
|
<b-col md="6" v-if="permission_list.includes('add entity')" class="text-right">
|
||||||
<router-link
|
<router-link
|
||||||
class="btn btn-primary"
|
class="btn btn-primary"
|
||||||
to="create"
|
to="create"
|
||||||
@@ -42,21 +42,22 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr v-if="entity_list.data" v-for="(contract, $index) in entity_list.data" :key="$index">
|
<tr v-if="entity_list.data" v-for="(entity, $index) in entity_list.data" :key="$index">
|
||||||
<td>{{ $index + 1 }}</td>
|
<td>{{ $index + 1 }}</td>
|
||||||
<td>
|
<td>
|
||||||
<div><b>Name</b>: {{ contract.name }}</div>
|
<div><b>Hash Id</b>: {{ entity.hash_id }}</div>
|
||||||
|
<div><b>Name</b>: {{ entity.name }}</div>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<span :class="'badge badge-' + contract.status[0].color">{{ contract.status[0].name }}</span>
|
<span :class="'badge badge-' + entity.status[0].color">{{ entity.status[0].name }}</span>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{{ contract.created_at }}
|
{{ entity.created_at }}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<router-link
|
<router-link
|
||||||
v-if="permission_list.includes('edit contract')"
|
v-if="permission_list.includes('edit entity')"
|
||||||
:to="'edit/' + contract.hash_id"
|
:to="'edit/' + entity.hash_id"
|
||||||
class="btn btn-xs btn-light"
|
class="btn btn-xs btn-light"
|
||||||
title="Edit"
|
title="Edit"
|
||||||
>
|
>
|
||||||
@@ -91,12 +92,12 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import ContractTemplateFilter from "./Filter";
|
import entityTemplateFilter from "./Filter";
|
||||||
import PaginateNav from '../../components/paginations/NextPerviousPagination';
|
import PaginateNav from '../../components/paginations/NextPerviousPagination';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
ContractTemplateFilter,
|
entityTemplateFilter,
|
||||||
PaginateNav
|
PaginateNav
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@@ -122,7 +123,7 @@
|
|||||||
vm.permission_list = response.data.permission_list;
|
vm.permission_list = response.data.permission_list;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getContractTemplateList() {
|
getentityTemplateList() {
|
||||||
let vm = this;
|
let vm = this;
|
||||||
let url = 'entity/list';
|
let url = 'entity/list';
|
||||||
vm.tableCall(url);
|
vm.tableCall(url);
|
||||||
@@ -178,7 +179,7 @@
|
|||||||
created() {
|
created() {
|
||||||
let vm = this;
|
let vm = this;
|
||||||
vm.getPermissionList();
|
vm.getPermissionList();
|
||||||
vm.getContractTemplateList();
|
vm.getentityTemplateList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user