Commit 672a4003 authored by Florian Azizian's avatar Florian Azizian

Merge branch 'develop' into 'master'

Develop

See merge request maarch/MaarchCourrier!172
parents 92e0afde 74c3357b
...@@ -448,11 +448,11 @@ ...@@ -448,11 +448,11 @@
<id>admin_custom_fields</id> <id>admin_custom_fields</id>
<name>_ADMIN_CUSTOM_FIELDS</name> <name>_ADMIN_CUSTOM_FIELDS</name>
<comment>_ADMIN_CUSTOM_FIELDS</comment> <comment>_ADMIN_CUSTOM_FIELDS</comment>
<servicepage>/administration/custom_fields</servicepage> <servicepage>/administration/customFields</servicepage>
<servicetype>admin</servicetype> <servicetype>admin</servicetype>
<category>organisation</category> <category>organisation</category>
<system_service>false</system_service> <system_service>false</system_service>
<style>fa fa-user</style> <style>fas fa-code</style>
<enabled>true</enabled> <enabled>true</enabled>
<angular>true</angular> <angular>true</angular>
</SERVICE> </SERVICE>
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
"devDependencies": { "devDependencies": {
"@angular-devkit/build-angular": "^0.803.0", "@angular-devkit/build-angular": "^0.803.0",
"@angular/animations": "^8.2.3", "@angular/animations": "^8.2.3",
"@angular/cdk": "^8.1.4", "@angular/cdk": "^8.2.0",
"@angular/cli": "^8.3.0", "@angular/cli": "^8.3.0",
"@angular/common": "^8.2.3", "@angular/common": "^8.2.3",
"@angular/compiler": "^8.2.3", "@angular/compiler": "^8.2.3",
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
"@angular/core": "^8.2.3", "@angular/core": "^8.2.3",
"@angular/forms": "^8.2.3", "@angular/forms": "^8.2.3",
"@angular/http": "^7.2.15", "@angular/http": "^7.2.15",
"@angular/material": "^8.1.4", "@angular/material": "^8.2.0",
"@angular/platform-browser": "^8.2.3", "@angular/platform-browser": "^8.2.3",
"@angular/platform-browser-dynamic": "^8.2.3", "@angular/platform-browser-dynamic": "^8.2.3",
"@angular/platform-server": "^8.2.3", "@angular/platform-server": "^8.2.3",
......
...@@ -128,9 +128,10 @@ $app->get('/contactsFilling', \Contact\controllers\ContactController::class . ': ...@@ -128,9 +128,10 @@ $app->get('/contactsFilling', \Contact\controllers\ContactController::class . ':
$app->put('/contactsFilling', \Contact\controllers\ContactController::class . ':updateFilling'); $app->put('/contactsFilling', \Contact\controllers\ContactController::class . ':updateFilling');
//CustomFields //CustomFields
$app->get('/customFields', \CustomField\controllers\CustomFieldController::class . ':get');
$app->post('/customFields', \CustomField\controllers\CustomFieldController::class . ':create'); $app->post('/customFields', \CustomField\controllers\CustomFieldController::class . ':create');
$app->put('/customFields/{id}', \CustomField\controllers\CustomFieldController::class . ':update'); $app->put('/customFields/{id}', \CustomField\controllers\CustomFieldController::class . ':update');
$app->delete('/customFields/{id}', \Contact\controllers\ContactController::class . ':delete'); $app->delete('/customFields/{id}', \CustomField\controllers\CustomFieldController::class . ':delete');
//Docservers //Docservers
$app->get('/docservers', \Docserver\controllers\DocserverController::class . ':get'); $app->get('/docservers', \Docserver\controllers\DocserverController::class . ':get');
...@@ -192,7 +193,7 @@ $app->delete('/folders/{id}', \Folder\controllers\FolderController::class . ':de ...@@ -192,7 +193,7 @@ $app->delete('/folders/{id}', \Folder\controllers\FolderController::class . ':de
$app->get('/folders/{id}/resources', \Folder\controllers\FolderController::class . ':getResourcesById'); $app->get('/folders/{id}/resources', \Folder\controllers\FolderController::class . ':getResourcesById');
$app->post('/folders/{id}/resources', \Folder\controllers\FolderController::class . ':addResourcesById'); $app->post('/folders/{id}/resources', \Folder\controllers\FolderController::class . ':addResourcesById');
$app->delete('/folders/{id}/resources', \Folder\controllers\FolderController::class . ':removeResourcesById'); $app->delete('/folders/{id}/resources', \Folder\controllers\FolderController::class . ':removeResourcesById');
$app->get('/folders/{id}/resources/{resId}/events', \Folder\controllers\FolderController::class . ':getEventsFromFolder'); $app->get('/folders/{id}/resources/{resId}/baskets', \Folder\controllers\FolderController::class . ':getBasketsFromFolder');
$app->get('/folders/{id}/filters', \Folder\controllers\FolderController::class . ':getFilters'); $app->get('/folders/{id}/filters', \Folder\controllers\FolderController::class . ':getFilters');
$app->put('/folders/{id}/sharing', \Folder\controllers\FolderController::class . ':sharing'); $app->put('/folders/{id}/sharing', \Folder\controllers\FolderController::class . ':sharing');
......
...@@ -1251,7 +1251,7 @@ INSERT INTO actions_groupbaskets (id_action, where_clause, group_id, basket_id, ...@@ -1251,7 +1251,7 @@ INSERT INTO actions_groupbaskets (id_action, where_clause, group_id, basket_id,
INSERT INTO actions_groupbaskets (id_action, where_clause, group_id, basket_id, used_in_basketlist, used_in_action_page, default_action_list) VALUES (507, '', 'AGENT', 'EenvBasket', 'Y', 'N', 'N'); INSERT INTO actions_groupbaskets (id_action, where_clause, group_id, basket_id, used_in_basketlist, used_in_action_page, default_action_list) VALUES (507, '', 'AGENT', 'EenvBasket', 'Y', 'N', 'N');
INSERT INTO actions_groupbaskets (id_action, where_clause, group_id, basket_id, used_in_basketlist, used_in_action_page, default_action_list) VALUES (529, '', 'AGENT', 'EenvBasket', 'Y', 'N', 'N'); INSERT INTO actions_groupbaskets (id_action, where_clause, group_id, basket_id, used_in_basketlist, used_in_action_page, default_action_list) VALUES (529, '', 'AGENT', 'EenvBasket', 'Y', 'N', 'N');
INSERT INTO actions_groupbaskets (id_action, where_clause, group_id, basket_id, used_in_basketlist, used_in_action_page, default_action_list) VALUES (100, '', 'AGENT', 'SuiviParafBasket', 'Y', 'Y', 'Y'); INSERT INTO actions_groupbaskets (id_action, where_clause, group_id, basket_id, used_in_basketlist, used_in_action_page, default_action_list) VALUES (100, '', 'AGENT', 'SuiviParafBasket', 'Y', 'Y', 'Y');
INSERT INTO actions_groupbaskets (id_action, where_clause, group_id, basket_id, used_in_basketlist, used_in_action_page, default_action_list) VALUES (527, '', 'AGENT', 'MyBasket', 'N', 'Y', 'N'); INSERT INTO actions_groupbaskets (id_action, where_clause, group_id, basket_id, used_in_basketlist, used_in_action_page, default_action_list) VALUES (527, '', 'AGENT', 'MyBasket', 'Y', 'Y', 'N');
INSERT INTO actions_groupbaskets (id_action, where_clause, group_id, basket_id, used_in_basketlist, used_in_action_page, default_action_list) VALUES (100, '', 'AGENT', 'AR_Create', 'Y', 'Y', 'Y'); INSERT INTO actions_groupbaskets (id_action, where_clause, group_id, basket_id, used_in_basketlist, used_in_action_page, default_action_list) VALUES (100, '', 'AGENT', 'AR_Create', 'Y', 'Y', 'Y');
INSERT INTO actions_groupbaskets (id_action, where_clause, group_id, basket_id, used_in_basketlist, used_in_action_page, default_action_list) VALUES (528, '', 'AGENT', 'AR_Create', 'Y', 'N', 'N'); INSERT INTO actions_groupbaskets (id_action, where_clause, group_id, basket_id, used_in_basketlist, used_in_action_page, default_action_list) VALUES (528, '', 'AGENT', 'AR_Create', 'Y', 'N', 'N');
INSERT INTO actions_groupbaskets (id_action, where_clause, group_id, basket_id, used_in_basketlist, used_in_action_page, default_action_list) VALUES (100, '', 'AGENT', 'AR_AlreadySend', 'Y', 'Y', 'Y'); INSERT INTO actions_groupbaskets (id_action, where_clause, group_id, basket_id, used_in_basketlist, used_in_action_page, default_action_list) VALUES (100, '', 'AGENT', 'AR_AlreadySend', 'Y', 'Y', 'Y');
...@@ -1266,7 +1266,7 @@ INSERT INTO actions_groupbaskets (id_action, where_clause, group_id, basket_id, ...@@ -1266,7 +1266,7 @@ INSERT INTO actions_groupbaskets (id_action, where_clause, group_id, basket_id,
INSERT INTO actions_groupbaskets (id_action, where_clause, group_id, basket_id, used_in_basketlist, used_in_action_page, default_action_list) VALUES (505, 'closing_date IS NULL', 'RESPONSABLE', 'MyBasket', 'N', 'Y', 'N'); INSERT INTO actions_groupbaskets (id_action, where_clause, group_id, basket_id, used_in_basketlist, used_in_action_page, default_action_list) VALUES (505, 'closing_date IS NULL', 'RESPONSABLE', 'MyBasket', 'N', 'Y', 'N');
INSERT INTO actions_groupbaskets (id_action, where_clause, group_id, basket_id, used_in_basketlist, used_in_action_page, default_action_list) VALUES (506, 'closing_date IS NOT NULL', 'RESPONSABLE', 'MyBasket', 'N', 'Y', 'N'); INSERT INTO actions_groupbaskets (id_action, where_clause, group_id, basket_id, used_in_basketlist, used_in_action_page, default_action_list) VALUES (506, 'closing_date IS NOT NULL', 'RESPONSABLE', 'MyBasket', 'N', 'Y', 'N');
INSERT INTO actions_groupbaskets (id_action, where_clause, group_id, basket_id, used_in_basketlist, used_in_action_page, default_action_list) VALUES (400, '', 'RESPONSABLE', 'MyBasket', 'N', 'Y', 'N'); INSERT INTO actions_groupbaskets (id_action, where_clause, group_id, basket_id, used_in_basketlist, used_in_action_page, default_action_list) VALUES (400, '', 'RESPONSABLE', 'MyBasket', 'N', 'Y', 'N');
INSERT INTO actions_groupbaskets (id_action, where_clause, group_id, basket_id, used_in_basketlist, used_in_action_page, default_action_list) VALUES (527, '', 'RESPONSABLE', 'MyBasket', 'N', 'Y', 'N'); INSERT INTO actions_groupbaskets (id_action, where_clause, group_id, basket_id, used_in_basketlist, used_in_action_page, default_action_list) VALUES (527, '', 'RESPONSABLE', 'MyBasket', 'Y', 'Y', 'N');
INSERT INTO actions_groupbaskets (id_action, where_clause, group_id, basket_id, used_in_basketlist, used_in_action_page, default_action_list) VALUES (100, '', 'RESPONSABLE', 'AR_Create', 'Y', 'Y', 'Y'); INSERT INTO actions_groupbaskets (id_action, where_clause, group_id, basket_id, used_in_basketlist, used_in_action_page, default_action_list) VALUES (100, '', 'RESPONSABLE', 'AR_Create', 'Y', 'Y', 'Y');
INSERT INTO actions_groupbaskets (id_action, where_clause, group_id, basket_id, used_in_basketlist, used_in_action_page, default_action_list) VALUES (528, '', 'RESPONSABLE', 'AR_Create', 'Y', 'N', 'N'); INSERT INTO actions_groupbaskets (id_action, where_clause, group_id, basket_id, used_in_basketlist, used_in_action_page, default_action_list) VALUES (528, '', 'RESPONSABLE', 'AR_Create', 'Y', 'N', 'N');
......
...@@ -26,6 +26,21 @@ use Slim\Http\Response; ...@@ -26,6 +26,21 @@ use Slim\Http\Response;
class CustomFieldController class CustomFieldController
{ {
public function get(Request $request, Response $response)
{
if (!ServiceModel::hasService(['id' => 'admin_custom_fields', 'userId' => $GLOBALS['userId'], 'location' => 'apps', 'type' => 'admin'])) {
return $response->withStatus(403)->withJson(['errors' => 'Service forbidden']);
}
$customFields = CustomFieldModel::get();
foreach ($customFields as $key => $customField) {
$customFields[$key]['values'] = json_decode($customField['values'], true);
}
return $response->withJson(['customFields' => $customFields]);
}
public function create(Request $request, Response $response) public function create(Request $request, Response $response)
{ {
if (!ServiceModel::hasService(['id' => 'admin_custom_fields', 'userId' => $GLOBALS['userId'], 'location' => 'apps', 'type' => 'admin'])) { if (!ServiceModel::hasService(['id' => 'admin_custom_fields', 'userId' => $GLOBALS['userId'], 'location' => 'apps', 'type' => 'admin'])) {
...@@ -47,13 +62,14 @@ class CustomFieldController ...@@ -47,13 +62,14 @@ class CustomFieldController
return $response->withStatus(400)->withJson(['errors' => 'Custom field with this label already exists']); return $response->withStatus(400)->withJson(['errors' => 'Custom field with this label already exists']);
} }
CustomFieldModel::create([ $id = CustomFieldModel::create([
'label' => $body['label'], 'label' => $body['label'],
'type' => $body['type'], 'type' => $body['type'],
'values' => empty($body['values']) ? null : json_encode($body['values']) 'values' => empty($body['values']) ? '[]' : json_encode($body['values']),
'default_value' => $body['default_value']
]); ]);
return $response->withStatus(204); return $response->withStatus(201)->withJson(['customFieldId' => $id]);
} }
public function update(Request $request, Response $response, array $args) public function update(Request $request, Response $response, array $args)
...@@ -82,8 +98,9 @@ class CustomFieldController ...@@ -82,8 +98,9 @@ class CustomFieldController
CustomFieldModel::update([ CustomFieldModel::update([
'set' => [ 'set' => [
'label' => $body['label'], 'label' => $body['label'],
'values' => empty($body['values']) ? null : json_encode($body['values']) 'values' => empty($body['values']) ? '[]' : json_encode($body['values']),
'default_value' => $body['default_value']
], ],
'where' => ['id = ?'], 'where' => ['id = ?'],
'data' => [$args['id']] 'data' => [$args['id']]
......
...@@ -29,7 +29,7 @@ class CustomFieldModel ...@@ -29,7 +29,7 @@ class CustomFieldModel
'table' => ['custom_fields'], 'table' => ['custom_fields'],
'where' => empty($args['where']) ? [] : $args['where'], 'where' => empty($args['where']) ? [] : $args['where'],
'data' => empty($args['data']) ? [] : $args['data'], 'data' => empty($args['data']) ? [] : $args['data'],
'order_by' => empty($args['orderBy']) ? [] : $args['orderBy'], 'order_by' => empty($args['orderBy']) ? ['label'] : $args['orderBy'],
'limit' => empty($args['limit']) ? 0 : $args['limit'] 'limit' => empty($args['limit']) ? 0 : $args['limit']
]); ]);
......
...@@ -74,7 +74,7 @@ class FolderController ...@@ -74,7 +74,7 @@ class FolderController
'countResources' => $count 'countResources' => $count
]; ];
if ($folder['level'] == 0) { if ($folder['level'] == 0) {
$tree[] = $insert; array_splice($tree, 0, 0, [$insert]);
} else { } else {
$found = false; $found = false;
foreach ($tree as $key => $branch) { foreach ($tree as $key => $branch) {
...@@ -207,13 +207,15 @@ class FolderController ...@@ -207,13 +207,15 @@ class FolderController
$data['parent_id'] = null; $data['parent_id'] = null;
$level = 0; $level = 0;
} else { } else {
$folder = FolderController::getScopeFolders(['login' => $GLOBALS['userId'], 'folderId' => $data['parent_id']]); $folderParent = FolderController::getScopeFolders(['login' => $GLOBALS['userId'], 'folderId' => $data['parent_id']]);
if (empty($folder[0])) { if (empty($folderParent[0])) {
return $response->withStatus(400)->withJson(['errors' => 'Parent Folder not found or out of your perimeter']); return $response->withStatus(400)->withJson(['errors' => 'Parent Folder not found or out of your perimeter']);
} }
$level = $folder[0]['level'] + 1; $level = $folderParent[0]['level'] + 1;
} }
FolderController::updateChildren($aArgs['id'], $level);
FolderModel::update([ FolderModel::update([
'set' => [ 'set' => [
'label' => $data['label'], 'label' => $data['label'],
...@@ -520,7 +522,7 @@ class FolderController ...@@ -520,7 +522,7 @@ class FolderController
return $response->withJson(['countResources' => count($foldersResources) - count($resourcesToUnclassify)]); return $response->withJson(['countResources' => count($foldersResources) - count($resourcesToUnclassify)]);
} }
public function getEventsFromFolder(Request $request, Response $response, array $args) public function getBasketsFromFolder(Request $request, Response $response, array $args)
{ {
if (!Validator::numeric()->notEmpty()->validate($args['id'])) { if (!Validator::numeric()->notEmpty()->validate($args['id'])) {
return $response->withStatus(400)->withJson(['errors' => 'Route id is not an integer']); return $response->withStatus(400)->withJson(['errors' => 'Route id is not an integer']);
...@@ -536,11 +538,11 @@ class FolderController ...@@ -536,11 +538,11 @@ class FolderController
} }
$baskets = BasketModel::getWithPreferences([ $baskets = BasketModel::getWithPreferences([
'select' => ['baskets.id', 'baskets.basket_id', 'baskets.basket_name', 'baskets.basket_clause', 'users_baskets_preferences.group_serial_id', 'usergroups.group_desc'], 'select' => ['baskets.id', 'baskets.basket_name', 'baskets.basket_clause', 'users_baskets_preferences.group_serial_id', 'usergroups.group_desc'],
'where' => ['users_baskets_preferences.user_serial_id = ?'], 'where' => ['users_baskets_preferences.user_serial_id = ?'],
'data' => [$GLOBALS['id']] 'data' => [$GLOBALS['id']]
]); ]);
$events = []; $groupsBaskets = [];
$inCheckedBaskets = []; $inCheckedBaskets = [];
$outCheckedBaskets = []; $outCheckedBaskets = [];
foreach ($baskets as $basket) { foreach ($baskets as $basket) {
...@@ -556,19 +558,11 @@ class FolderController ...@@ -556,19 +558,11 @@ class FolderController
} }
} }
$inCheckedBaskets[] = $basket['id']; $inCheckedBaskets[] = $basket['id'];
$group = GroupModel::getById(['id' => $basket['group_serial_id'], 'select' => ['group_id']]); $groupsBaskets[] = ['groupId' => $basket['group_serial_id'], 'groupName' => $basket['group_desc'], 'basketId' => $basket['id'], 'basketName' => $basket['basket_name']];
$groupBasket = GroupBasketModel::get([
'select' => ['list_event'],
'where' => ['group_id = ?', 'basket_id = ?'],
'data' => [$group['group_id'], $basket['basket_id']]
]);
if (!empty($groupBasket[0]['list_event'])) {
$events[] = ['groupId' => $basket['group_serial_id'], 'groupName' => $basket['group_desc'], 'basketId' => $basket['id'], 'basketName' => $basket['basket_name'], 'event' => $groupBasket[0]['list_event']];
}
} }
} }
return $response->withJson(['events' => $events]); return $response->withJson(['groupsBaskets' => $groupsBaskets]);
} }
public function getFilters(Request $request, Response $response, array $args) public function getFilters(Request $request, Response $response, array $args)
...@@ -630,7 +624,7 @@ class FolderController ...@@ -630,7 +624,7 @@ class FolderController
'select' => ['distinct (folders.id)', 'folders.*'], 'select' => ['distinct (folders.id)', 'folders.*'],
'where' => $where, 'where' => $where,
'data' => $data, 'data' => $data,
'orderBy' => ['level', 'label'] 'orderBy' => ['level', 'label desc']
]); ]);
return $folders; return $folders;
...@@ -674,4 +668,27 @@ class FolderController ...@@ -674,4 +668,27 @@ class FolderController
} }
return false; return false;
} }
private static function updateChildren($parentId, $levelParent)
{
$folderChild = FolderModel::getChild(['id' => $parentId]);
if (!empty($folderChild)) {
$level = -1;
foreach ($folderChild as $child) {
$level = $levelParent + 1;
FolderController::updateChildren($child['id'], $level);
}
$idsChildren = array_column($folderChild, 'id');
FolderModel::update([
'set' => [
'level' => $level
],
'where' => ['id in (?)'],
'data' => [$idsChildren]
]);
}
}
} }
...@@ -911,10 +911,9 @@ class ResourceListController ...@@ -911,10 +911,9 @@ class ResourceListController
} elseif ($value['value'] == 'getOpinionLimitDate') { } elseif ($value['value'] == 'getOpinionLimitDate') {
$value['displayValue'] = $resource['opinion_limit_date']; $value['displayValue'] = $resource['opinion_limit_date'];
$display[] = $value; $display[] = $value;
} elseif ($value['value'] == 'getFolders') {
$formattedResources[$key]['folders'] = ResourceListController::getFolders(['resId' => $resource['res_id'], 'userId' => $args['userId']]);
} }
} }
$formattedResources[$key]['folders'] = ResourceListController::getFolders(['resId' => $resource['res_id'], 'userId' => $args['userId']]);
$formattedResources[$key]['display'] = $display; $formattedResources[$key]['display'] = $display;
} }
} }
......
...@@ -194,8 +194,8 @@ define('_ADMIN_TEMPLATES_DESC', 'Manage templates for attachments, notifications ...@@ -194,8 +194,8 @@ define('_ADMIN_TEMPLATES_DESC', 'Manage templates for attachments, notifications
define('_SECURITIES', 'Securities'); define('_SECURITIES', 'Securities');
define('_EMAILSERVER_PARAM', 'Mail server'); define('_EMAILSERVER_PARAM', 'Mail server');
define('_EMAILSERVER_PARAM_DESC', 'Link your mail serveur with application in order to send emails.'); define('_EMAILSERVER_PARAM_DESC', 'Link your mail serveur with application in order to send emails.');
define('_ADMIN_INDEXING_MODELS', 'Indexing models administration'); define('_ADMIN_INDEXING_MODELS', 'Indexing models');
define('_ADMIN_CUSTOM_FIELDS', 'Custom fields administration'); define('_ADMIN_CUSTOM_FIELDS', 'Custom fields');
// SERVICES // SERVICES
define('_REDIRECT_TO_ACTION', 'Redirect to an action'); define('_REDIRECT_TO_ACTION', 'Redirect to an action');
......
...@@ -194,8 +194,8 @@ define('_ADMIN_TEMPLATES_DESC', "Gérer les modèles utilisés pour les pièces ...@@ -194,8 +194,8 @@ define('_ADMIN_TEMPLATES_DESC', "Gérer les modèles utilisés pour les pièces
define('_SECURITIES', 'Sécurités'); define('_SECURITIES', 'Sécurités');
define('_EMAILSERVER_PARAM', 'Serveur e-mail'); define('_EMAILSERVER_PARAM', 'Serveur e-mail');
define('_EMAILSERVER_PARAM_DESC', 'Connecter votre serveur e-mail à Maarch Courrier afin de pouvoir envoyer des courriels.'); define('_EMAILSERVER_PARAM_DESC', 'Connecter votre serveur e-mail à Maarch Courrier afin de pouvoir envoyer des courriels.');
define('_ADMIN_INDEXING_MODELS', 'Administration des modèles d\'indexation'); define('_ADMIN_INDEXING_MODELS', 'Modèles d\'indexation');
define('_ADMIN_CUSTOM_FIELDS', 'Administration des champs personnalisés'); define('_ADMIN_CUSTOM_FIELDS', 'Champs personnalisés');
// SERVICES // SERVICES
define('_REDIRECT_TO_ACTION', 'Rediriger vers une action'); define('_REDIRECT_TO_ACTION', 'Rediriger vers une action');
......
...@@ -193,8 +193,8 @@ define('_ADMIN_TEMPLATES_DESC', 'De modellen die voor de bijlagen gebruikt worde ...@@ -193,8 +193,8 @@ define('_ADMIN_TEMPLATES_DESC', 'De modellen die voor de bijlagen gebruikt worde
define('_SECURITIES', 'Veiligheden'); define('_SECURITIES', 'Veiligheden');
define('_EMAILSERVER_PARAM', '_TO_TRANSLATE'); define('_EMAILSERVER_PARAM', '_TO_TRANSLATE');
define('_EMAILSERVER_PARAM_DESC', '_TO_TRANSLATE'); define('_EMAILSERVER_PARAM_DESC', '_TO_TRANSLATE');
define('_ADMIN_INDEXING_MODELS', 'Indexing models administration'); // translate define('_ADMIN_INDEXING_MODELS', 'Indexing models'); // translate
define('_ADMIN_CUSTOM_FIELDS', 'Custom fields administration'); // translate define('_ADMIN_CUSTOM_FIELDS', 'Custom fields'); // translate
//SERVICES //SERVICES
define('_REDIRECT_TO_ACTION', 'Doorsturen naar een andere actie'); define('_REDIRECT_TO_ACTION', 'Doorsturen naar een andere actie');
......
...@@ -96,6 +96,7 @@ export class RedirectActionComponent implements OnInit { ...@@ -96,6 +96,7 @@ export class RedirectActionComponent implements OnInit {
"three_state": false //no cascade selection "three_state": false //no cascade selection
}, },
'core': { 'core': {
force_text : true,
'themes': { 'themes': {
'name': 'proton', 'name': 'proton',
'responsive': true 'responsive': true
......
...@@ -37,6 +37,7 @@ import { SecuritiesAdministrationComponent } from './security/securit ...@@ -37,6 +37,7 @@ import { SecuritiesAdministrationComponent } from './security/securit
import { SendmailAdministrationComponent } from './sendmail/sendmail-administration.component'; import { SendmailAdministrationComponent } from './sendmail/sendmail-administration.component';
import { ShippingsAdministrationComponent } from './shipping/shippings-administration.component'; import { ShippingsAdministrationComponent } from './shipping/shippings-administration.component';
import { ShippingAdministrationComponent } from './shipping/shipping-administration.component'; import { ShippingAdministrationComponent } from './shipping/shipping-administration.component';
import { CustomFieldsAdministrationComponent } from './customField/custom-fields-administration.component';
import { AppGuard } from '../../service/app.guard'; import { AppGuard } from '../../service/app.guard';
@NgModule({ @NgModule({
...@@ -90,6 +91,7 @@ import { AppGuard } from '../../service/app.guard'; ...@@ -90,6 +91,7 @@ import { AppGuard } from '../../service/app.guard';
{ path: 'administration/shippings', canActivate: [AppGuard], component: ShippingsAdministrationComponent }, { path: 'administration/shippings', canActivate: [AppGuard], component: ShippingsAdministrationComponent },
{ path: 'administration/shippings/new', canActivate: [AppGuard], component: ShippingAdministrationComponent }, { path: 'administration/shippings/new', canActivate: [AppGuard], component: ShippingAdministrationComponent },
{ path: 'administration/shippings/:id', canActivate: [AppGuard], component: ShippingAdministrationComponent }, { path: 'administration/shippings/:id', canActivate: [AppGuard], component: ShippingAdministrationComponent },
{ path: 'administration/customFields', canActivate: [AppGuard], component: CustomFieldsAdministrationComponent },
]), ]),
], ],
exports: [ exports: [
......
...@@ -49,6 +49,7 @@ import { TechnicalAdministrationComponent } from './technical/techni ...@@ -49,6 +49,7 @@ import { TechnicalAdministrationComponent } from './technical/techni
import { ListAdministrationComponent } from './basket/list/list-administration.component'; import { ListAdministrationComponent } from './basket/list/list-administration.component';
import { ShippingsAdministrationComponent } from './shipping/shippings-administration.component'; import { ShippingsAdministrationComponent } from './shipping/shippings-administration.component';
import { ShippingAdministrationComponent } from './shipping/shipping-administration.component'; import { ShippingAdministrationComponent } from './shipping/shipping-administration.component';
import { CustomFieldsAdministrationComponent } from './customField/custom-fields-administration.component';
@NgModule({ @NgModule({
imports: [ imports: [
...@@ -107,7 +108,8 @@ import { ShippingAdministrationComponent } from './shipping/shippin ...@@ -107,7 +108,8 @@ import { ShippingAdministrationComponent } from './shipping/shippin
TemplateAdministrationCheckEntitiesModalComponent, TemplateAdministrationCheckEntitiesModalComponent,
ShippingsAdministrationComponent, ShippingsAdministrationComponent,
ShippingAdministrationComponent, ShippingAdministrationComponent,
AccountLinkComponent AccountLinkComponent,
CustomFieldsAdministrationComponent
], ],
entryComponents: [ entryComponents: [
UsersAdministrationRedirectModalComponent, UsersAdministrationRedirectModalComponent,
......
...@@ -437,6 +437,7 @@ export class BasketAdministrationSettingsModalComponent { ...@@ -437,6 +437,7 @@ export class BasketAdministrationSettingsModalComponent {
"three_state": false //no cascade selection "three_state": false //no cascade selection
}, },
'core': { 'core': {
force_text : true,
'themes': { 'themes': {
'name': 'proton', 'name': 'proton',
'responsive': true 'responsive': true
...@@ -498,6 +499,7 @@ export class BasketAdministrationSettingsModalComponent { ...@@ -498,6 +499,7 @@ export class BasketAdministrationSettingsModalComponent {
"three_state": false //no cascade selection "three_state": false //no cascade selection
}, },
'core': { 'core': {
force_text : true,
'themes': { 'themes': {
'name': 'proton', 'name': 'proton',
'responsive': true 'responsive': true
......
@import '../../../css/vars.scss';
.mat-divider {
padding-top: 10px;
padding-bottom: 10px;
}
.div-list {
padding: 0px;
max-height: 150px;
overflow: auto;
}
.input-form {
color: #666;
width: 500px;
button {
font-size: 30px;
}
.mat-input-element {
color: $primary;
padding-left: 20px;
}
input {
padding-left: 20px;
}
::ng-deep.mat-select-value-text {
padding-left: 20px;
color: $primary;
}
::ng-deep.mat-form-field-label {
left: 20px;
}
::ng-deep.mat-form-field-infix {
padding-bottom: 15px;
}
::ng-deep.mat-form-field-flex {
background: white;
border-radius: 30px;
border: solid 1px $primary;
}
::ng-deep .mat-form-field-underline {
display: none;
}
::ng-deep.mat-form-field-suffix {
margin-right: 20px;
}
::ng-deep.mat-select-arrow-wrapper {
padding-right: 20px;
}
::ng-deep.mat-list-option {
color: rgba(0, 0, 0, 0.54);
}
textarea.cdk-textarea-autosize-measuring {
padding: 4px 0 !important;
}
}
.checkbox-form {
width: 100%;
padding: 0px;
border: solid 1px $primary;
border-radius: 30px;
overflow: hidden;
}
.checkbox-selected-list {
margin-top: 10px;
display: flex;
justify-content: center;
::ng-deep.mat-chip-list-wrapper {
justify-content: center;
}
}
.radio-form {
display: flex;
.mat-radio-button {
flex: 1;
::ng-deep.mat-radio-label-content {
font-weight: normal;
color: rgba(0, 0, 0, 0.54);
}
}
}
.customFielsdPanel {
padding-left: 0px;
::ng-deep.mat-tab-body-wrapper {
padding-left: 0px;
}
}
.mat-expansion-panel-header-description {
flex-direction: row-reverse;
}
.customFieldValues {
box-shadow: none;
border: 1px solid rgba(0,0,0,0.12);
}
.mat-expansion-panel {
margin: 5px;
}
.mat-accordion {
padding: 5px;
}
.mat-tab-group, .mat-tab-body-wrapper, .mat-tab-body-content {
height: 100%;
}
.actionsCustomFields {
display: flex;
align-items: center;
justify-content: center;
}
.actionValuesCustom {
display: flex;
}
.alert-message-info {
margin-top: 30px;
max-width: 100%;
}
.addCustomFieldTypeContainer {
justify-content: center;
display: flex;
align-items: center;
width:60px;
}
.customFieldsTypesItem {
display:flex;
padding-top: 10px;
padding-bottom: 10px;
}
\ No newline at end of file
import { Component, OnInit, ViewChild } from '@angular/core';