v.2.24
1. Редактор карты зала.
This commit is contained in:
@@ -109,7 +109,8 @@ class POSTRoomMap extends HRCCommand implements HRCCommandInterface
|
||||
isset($input['width']) &&
|
||||
isset($input['height']) &&
|
||||
isset($input['x']) &&
|
||||
isset($input['y'])) {
|
||||
isset($input['y']) &&
|
||||
isset($input['type'])) {
|
||||
$table = Tables::where('place_id', $input['place_id'])->where('table_id', $input['table_id'])->where('name', $input['name'])->first();
|
||||
if (isset($table)) {
|
||||
return [
|
||||
@@ -124,6 +125,7 @@ class POSTRoomMap extends HRCCommand implements HRCCommandInterface
|
||||
$table_height = $input['height'];
|
||||
$table_x = $input['x'];
|
||||
$table_y = $input['y'];
|
||||
$table_type = $input['type'];
|
||||
$newTable = new Tables;
|
||||
$newTable->name = $table_name;
|
||||
$newTable->table_id = $table_id;
|
||||
@@ -132,6 +134,7 @@ class POSTRoomMap extends HRCCommand implements HRCCommandInterface
|
||||
$newTable->height = $table_height;
|
||||
$newTable->x = $table_x;
|
||||
$newTable->y = $table_y;
|
||||
$newTable->type = $table_type;
|
||||
$newTable->save();
|
||||
return [
|
||||
'status' => 'success',
|
||||
@@ -147,7 +150,8 @@ class POSTRoomMap extends HRCCommand implements HRCCommandInterface
|
||||
isset($input['width']) &&
|
||||
isset($input['height']) &&
|
||||
isset($input['x']) &&
|
||||
isset($input['y'])) {
|
||||
isset($input['y']) &&
|
||||
isset($input['type'])) {
|
||||
$table = Tables::where('place_id', $input['place_id'])->where('table_id', $input['table_id'])->first();
|
||||
$table_id = $input['table_id'];
|
||||
$table_place_id = $input['place_id'];
|
||||
@@ -156,6 +160,7 @@ class POSTRoomMap extends HRCCommand implements HRCCommandInterface
|
||||
$table_height = $input['height'];
|
||||
$table_x = $input['x'];
|
||||
$table_y = $input['y'];
|
||||
$table_type = $input['type'];
|
||||
$table = Tables::find($table['id']);
|
||||
$table->name = $table_name;
|
||||
$table->table_id = $table_id;
|
||||
@@ -164,6 +169,7 @@ class POSTRoomMap extends HRCCommand implements HRCCommandInterface
|
||||
$table->height = $table_height;
|
||||
$table->x = $table_x;
|
||||
$table->y = $table_y;
|
||||
$table->type = $table_type;
|
||||
$table->save();
|
||||
return [
|
||||
'status' => 'success',
|
||||
@@ -196,6 +202,7 @@ class POSTRoomMap extends HRCCommand implements HRCCommandInterface
|
||||
$table_height = $item['height'];
|
||||
$table_x = $item['x'];
|
||||
$table_y = $item['y'];
|
||||
$table_type = $item['type'];
|
||||
$newTable = new Tables;
|
||||
$newTable->name = $table_name;
|
||||
$newTable->table_id = $table_id;
|
||||
@@ -204,6 +211,7 @@ class POSTRoomMap extends HRCCommand implements HRCCommandInterface
|
||||
$newTable->height = $table_height;
|
||||
$newTable->x = $table_x;
|
||||
$newTable->y = $table_y;
|
||||
$newTable->type = $table_type;
|
||||
$newTable->save();
|
||||
}
|
||||
return [
|
||||
|
||||
Reference in New Issue
Block a user