added translate for form name

This commit is contained in:
decoder
2024-03-06 23:11:10 +05:00
parent c18c2d0f32
commit fd9dc5d545
8 changed files with 1809 additions and 1398 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -178,6 +178,15 @@
@section('footer')
<script type="text/javascript">
$(document).ready(function () {
var lang = `{{session()->get('locale')}}`
var titleColName = 'name';
console.log(lang);
if (lang === 'est') {
titleColName = 'name_est'
} else if (lang === 'ru') {
titleColName = 'name_ru'
}
// form dataTable
var form_table = $('#form_table').DataTable({
@@ -196,7 +205,15 @@
{"width": "20%", "targets": 4}
],
columns: [
{data: 'name', name: 'name'},
{
data: titleColName,
name: titleColName,
createdCell: function (td, cellData, rowData, row, col) {
if (td.innerHTML.length === 0) {
td.innerHTML = rowData.name
}
},
},
{data: 'description', name: 'description'},
{data: 'created_at', name: 'created_at'},
{data: 'data_count', name: 'data_count', searchable: false},