Compare commits
7 Commits
262b8003f4
...
a46ec03369
Author | SHA1 | Date | |
---|---|---|---|
|
a46ec03369 | ||
|
3485957da4 | ||
|
2d0d36af7e | ||
4cf46bd449 | |||
90ed266998 | |||
ca3985a551 | |||
1bb5406b80 |
@ -278,7 +278,7 @@ class HomeController extends Controller
|
|||||||
$forms = UserForm::join('forms', 'user_forms.form_id', '=', 'forms.id')
|
$forms = UserForm::join('forms', 'user_forms.form_id', '=', 'forms.id')
|
||||||
->leftJoin('users', 'forms.created_by', '=', 'users.id')
|
->leftJoin('users', 'forms.created_by', '=', 'users.id')
|
||||||
->where('user_forms.assigned_to', \Auth::id())
|
->where('user_forms.assigned_to', \Auth::id())
|
||||||
->select('user_forms.permissions as permissions', 'forms.name as name', 'forms.description as description', 'forms.id as form_id', 'forms.created_at as created_at', 'forms.slug as slug', 'users.name as created_by');
|
->select('user_forms.permissions as permissions', 'forms.name as name', 'forms.name_ru as name_ru', 'forms.name_est as name_est', 'forms.description as description', 'forms.description_ru as description_ru', 'forms.description_est as description_est', 'forms.id as form_id', 'forms.created_at as created_at', 'forms.slug as slug', 'users.name as created_by');
|
||||||
|
|
||||||
return DataTables::of($forms)
|
return DataTables::of($forms)
|
||||||
->addColumn(
|
->addColumn(
|
||||||
|
File diff suppressed because one or more lines are too long
@ -141,9 +141,10 @@
|
|||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table class="table" id="assigned_form_table" style="width: 100%;">
|
<table class="table" id="assigned_form_table" style="width: 100%;">
|
||||||
<thead>
|
<thead>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<th>@lang('messages.name')</th>
|
|
||||||
<th>@lang('messages.description')</th>
|
<th>@lang('messages.description')</th>
|
||||||
|
<th>@lang('messages.name')</th>
|
||||||
@if (auth()->user()->hasRole(\App\Enums\User\RoleEnum::SUPERVISOR->value))
|
@if (auth()->user()->hasRole(\App\Enums\User\RoleEnum::SUPERVISOR->value))
|
||||||
<th>@lang('messages.created_by')</th>
|
<th>@lang('messages.created_by')</th>
|
||||||
@endif
|
@endif
|
||||||
@ -407,12 +408,22 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
columns: [{
|
columns: [{
|
||||||
data: 'name',
|
data: descColName,
|
||||||
name: 'forms.name'
|
name: 'forms.' + descColName,
|
||||||
|
createdCell: function(td, cellData, rowData, row, col) {
|
||||||
|
if (td.innerHTML.length === 0) {
|
||||||
|
td.innerHTML = rowData.description
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
data: 'description',
|
data: titleColName,
|
||||||
name: 'forms.description'
|
name: 'forms.' + titleColName,
|
||||||
|
createdCell: function(td, cellData, rowData, row, col) {
|
||||||
|
if (td.innerHTML.length === 0) {
|
||||||
|
td.innerHTML = rowData.name
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
@if (auth()->user()->hasRole(\App\Enums\User\RoleEnum::SUPERVISOR->value))
|
@if (auth()->user()->hasRole(\App\Enums\User\RoleEnum::SUPERVISOR->value))
|
||||||
{
|
{
|
||||||
@ -427,6 +438,7 @@
|
|||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
//form collaborate
|
//form collaborate
|
||||||
$(document).on('click', '.collab_btn', function() {
|
$(document).on('click', '.collab_btn', function() {
|
||||||
var url = $(this).data('href');
|
var url = $(this).data('href');
|
||||||
|
Loading…
Reference in New Issue
Block a user