Skip to content
Snippets Groups Projects
Commit b2986eb7 authored by Florian Azizian's avatar Florian Azizian
Browse files

FEAT #5661 start status administration MVC

parent 6ab62c6d
No related branches found
No related tags found
No related merge requests found
...@@ -28,22 +28,25 @@ ...@@ -28,22 +28,25 @@
<p> <p>
<label for="can_be_searched">{{lang.can_be_searched}}</label> <label for="can_be_searched">{{lang.can_be_searched}}</label>
<textarea name="can_be_searched" id="can_be_searched" [(ngModel)]="status.can_be_searched" ></textarea> <input type="radio" name="can_be_searched" class="check" value="Y" [(ngModel)]="status.can_be_searched">Oui
<input type="radio" name="can_be_searched" class="check" value="N" [(ngModel)]="status.can_be_searched">Non
</p> </p>
<p> <p>
<label for="can_be_modified">{{lang.can_be_modified}}</label> <label for="can_be_modified">{{lang.can_be_modified}}</label>
<textarea name="can_be_modified" id="can_be_modified" [(ngModel)]="status.can_be_modified" ></textarea> <input type="radio" name="can_be_modified" class="check" value="Y" [(ngModel)]="status.can_be_modified"checked="checked">Oui
<input type="radio" name="can_be_modified" class="check" value="N" [(ngModel)]="status.can_be_modified">Non
</p> </p>
<p> <p>
<label for="is_folder_status">{{lang.is_folder_status}}</label> <label for="is_folder_status">{{lang.is_folder_status}}</label>
<textarea name="is_folder_status" id="is_folder_status" [(ngModel)]="status.is_folder_status" ></textarea> <input type="radio" name="is_folder_status" class="check" value="Y" [(ngModel)]="status.is_folder_status">Oui
<input type="radio" name="is_folder_status" class="check" value="N" [(ngModel)]="status.is_folder_status">Non
</p> </p>
<p> <p>
<label for="img_related">{{lang.img_related}}</label> <label for="img_filename">{{lang.img_related}}</label>
<textarea name="img_related" id="img_related" [(ngModel)]="status.img_related" ></textarea> <textarea name="img_filename" id="img_filename" [(ngModel)]="status.img_filename" ></textarea>
</p> </p>
<p class="button" style="text-align:center"> <p class="button" style="text-align:center">
......
...@@ -22,11 +22,11 @@ var StatusAdministrationComponent = (function () { ...@@ -22,11 +22,11 @@ var StatusAdministrationComponent = (function () {
this.mode = null; this.mode = null;
this.status = { this.status = {
id: null, id: null,
description: null, label_status: null,
can_be_searched: null, can_be_searched: null,
can_be_modified: null, can_be_modified: null,
is_folder_status: null, is_folder_status: null,
img_related: null img_filename: null
}; };
this.lang = ""; this.lang = "";
this.resultInfo = ""; this.resultInfo = "";
......
...@@ -18,11 +18,11 @@ export class StatusAdministrationComponent implements OnInit { ...@@ -18,11 +18,11 @@ export class StatusAdministrationComponent implements OnInit {
type : string; type : string;
status : any = { status : any = {
id : null, id : null,
description : null, label_status : null,
can_be_searched : null, can_be_searched : null,
can_be_modified : null, can_be_modified : null,
is_folder_status : null, is_folder_status : null,
img_related : null img_filename : null
}; };
paramDateTemp : string; paramDateTemp : string;
lang : any = ""; lang : any = "";
......
...@@ -73,7 +73,7 @@ class StatusController ...@@ -73,7 +73,7 @@ class StatusController
->withJson(['errors' => $errors]); ->withJson(['errors' => $errors]);
} }
$aArgs = $request->getQueryParams(); $aArgs = $request->getParams();
$return = StatusModel::create($aArgs); $return = StatusModel::create($aArgs);
...@@ -107,7 +107,7 @@ class StatusController ...@@ -107,7 +107,7 @@ class StatusController
->withJson(['errors' => $errors]); ->withJson(['errors' => $errors]);
} }
$aArgs = $request->getQueryParams(); $aArgs = $request->getParams();
$return = StatusModel::update($aArgs); $return = StatusModel::update($aArgs);
......
...@@ -170,6 +170,7 @@ class LangModelAbstract ...@@ -170,6 +170,7 @@ class LangModelAbstract
'yes' => _YES, 'yes' => _YES,
'no' => _NO, 'no' => _NO,
'modify_status' => _MODIFY_STATUS, 'modify_status' => _MODIFY_STATUS,
'deleteConfirm' => _REALLY_DELETE,
]; ];
return $aLang; return $aLang;
} }
......
...@@ -22,7 +22,7 @@ class StatusModelAbstract extends \Apps_Table_Service ...@@ -22,7 +22,7 @@ class StatusModelAbstract extends \Apps_Table_Service
public static function getList() public static function getList()
{ {
$aReturn = static::select([ $aReturn = static::select([
'select' => '*', 'select' => empty($aArgs['select']) ? ['*'] : $aArgs['select'],
'table' => ['status'], 'table' => ['status'],
]); ]);
...@@ -88,4 +88,4 @@ class StatusModelAbstract extends \Apps_Table_Service ...@@ -88,4 +88,4 @@ class StatusModelAbstract extends \Apps_Table_Service
return $aReturn; return $aReturn;
} }
} }
\ No newline at end of file
...@@ -109,7 +109,7 @@ $app->get('/administration/status', \Core\Controllers\StatusController::class . ...@@ -109,7 +109,7 @@ $app->get('/administration/status', \Core\Controllers\StatusController::class .
$app->get('/status/lang', \Core\Controllers\StatusController::class . ':getLang'); $app->get('/status/lang', \Core\Controllers\StatusController::class . ':getLang');
$app->get('/status/{id}', \Core\Controllers\StatusController::class . ':getById'); $app->get('/status/{id}', \Core\Controllers\StatusController::class . ':getById');
$app->post('/status', \Core\Controllers\StatusController::class . ':create'); $app->post('/status', \Core\Controllers\StatusController::class . ':create');
$app->put('/status', \Core\Controllers\StatusController::class . ':update'); $app->put('/status/{id}', \Core\Controllers\StatusController::class . ':update');
$app->delete('/status/{id}', \Core\Controllers\StatusController::class . ':delete'); $app->delete('/status/{id}', \Core\Controllers\StatusController::class . ':delete');
//docserver //docserver
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment