Línea 228... |
Línea 228... |
228 |
'accept': 'application/json',
|
228 |
'accept': 'application/json',
|
229 |
'method': 'get',
|
229 |
'method': 'get',
|
230 |
'url': action,
|
230 |
'url': action,
|
231 |
}).done(function(response) {
|
231 |
}).done(function(response) {
|
232 |
if (response['success']) {
|
232 |
if (response['success']) {
|
- |
|
233 |
const lastDate = new Date(Date.parse(response['data']['last_date'] + " 00:00:00"));
|
- |
|
234 |
|
233 |
$("#rows").html('');
|
235 |
$("#rows").html('');
|
234 |
sections = [];
|
236 |
sections = [];
|
235 |
$('#form-main').attr('action', action);
|
237 |
$('#form-main').attr('action', action);
|
236 |
$('#form-main #form-name').val(response['data']['name']);
|
238 |
$('#form-main #form-name').val(response['data']['name']);
|
237 |
$('#form-main #job_description_id').val(response['data']['job_description_id']).trigger('change');
|
239 |
$('#form-main #job_description_id').val(response['data']['job_description_id']).trigger('change');
|
238 |
$('#form-main #location_search').val(response['data']['location_search']);
|
240 |
$('#form-main #location_search').val(response['data']['location_search']);
|
239 |
$('#form-main #job_category_id').val(response['data']['job_category_id']).trigger('change');
|
241 |
$('#form-main #job_category_id').val(response['data']['job_category_id']).trigger('change');
|
240 |
$('#form-main #industry_id').val(response['data']['industry_id']).trigger('change');
|
242 |
$('#form-main #industry_id').val(response['data']['industry_id']).trigger('change');
|
241 |
$('#form-main #last_date').val(response['data']['last_date']).trigger('change');
|
243 |
$('#form-main #last_date').val(
|
- |
|
244 |
lastDate.getDate() + "/" + String(lastDate.getMonth() + 1).padStart(2, '0') + "/" + lastDate.getFullYear();
|
- |
|
245 |
).trigger('change');
|
242 |
$('#form-main #form-status').val(response['data']['status']);
|
246 |
$('#form-main #form-status').val(response['data']['status']);
|
243 |
CKEDITOR.instances['description'].setData(response['data']['description']);
|
247 |
CKEDITOR.instances['description'].setData(response['data']['description']);
|
244 |
$('#row-lists').hide();
|
248 |
$('#row-lists').hide();
|
245 |
$('#row-form').show();
|
249 |
$('#row-form').show();
|