[DEV-302] Fix custom filed error message padding (#1190)

* add en translation

* add margin

* add i18n to error

* add minor changes

* add en translations
This commit is contained in:
Guillermo Giuliana 2022-04-25 18:16:07 -03:00 committed by GitHub
parent f2adb160be
commit 41d7aa5406
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 13 additions and 7 deletions

View File

@ -63,7 +63,7 @@ class AdminPanelCustomFieldForm extends React.Component {
return (
<Message showMessage={showErrorMessage} onCloseMessage={this.onCloseMessage.bind(this, "showErrorMessage")} type="error">
{error}
{i18n(error)}
</Message>
);
}

View File

@ -26,5 +26,6 @@
&__buttons {
display: flex;
justify-content: space-between;
margin-top: 20px;
}
}

View File

@ -412,7 +412,10 @@ export default {
'INVALID_SUPERVISED_USERS': 'Invalid supervised users',
'SUPERVISOR_CAN_NOT_SUPERVISE_HIMSELF': 'Supervisor can not supervise himself',
'NAME_ALREADY_USED': 'Name already used',
'PAGESIZE_ERROR': 'Invalid page size',
'INVALID_PAGE_SIZE': 'Invalid page size',
'INVALID_CUSTOM_FIELD_TYPE': 'Invalid custom field type',
'INVALID_CUSTOM_FIELD_OPTIONS': 'Invalid custom field options',
'CUSTOM_FIELD_ALREADY_EXISTS': 'Custom field already exists',
//MESSAGES
'SIGNUP_SUCCESS': 'You have registered successfully in our support system.',

View File

@ -19,6 +19,7 @@ use Respect\Validation\Validator as DataValidator;
*
* @apiUse NO_PERMISSION
* @apiUse INVALID_PAGE
* @apiUse INVALID_PAGE_SIZE
*
* @apiSuccess {Object} data Information about a tickets and quantity of pages.
* @apiSuccess {[Ticket](#api-Data_Structures-ObjectTicket)[]} data.tickets Array of new tickets of the current page.
@ -41,7 +42,7 @@ class GetNewTicketsStaffController extends Controller {
],
'pageSize' => [
'validation' => DataValidator::oneOf(DataValidator::intVal()->between(5, 50),DataValidator::nullType()),
'error' => ERRORS::PAGESIZE_ERROR
'error' => ERRORS::INVALID_PAGE_SIZE
]
]
];

View File

@ -19,6 +19,7 @@ use Respect\Validation\Validator as DataValidator;
*
* @apiUse NO_PERMISSION
* @apiUse INVALID_PAGE
* @apiUse INVALID_PAGE_SIZE
*
* @apiSuccess {Object} data Information about a tickets and quantity of pages.
* @apiSuccess {[Ticket](#api-Data_Structures-ObjectTicket)[]} data.tickets Array of tickets assigned to the staff of the current page.
@ -40,8 +41,8 @@ class GetTicketStaffController extends Controller {
'error' => ERRORS::INVALID_PAGE
],
'pageSize' => [
'validation' => DataValidator::oneOf(DataValidator::intVal()->between(5, 50),DataValidator::nullType()),
'error' => ERRORS::PAGESIZE_ERROR
'validation' => DataValidator::oneOf(DataValidator::intVal()->between(5, 50),DataValidator::nullType()),
'error' => ERRORS::INVALID_PAGE_SIZE
]
]
];

View File

@ -101,7 +101,7 @@ class SearchController extends Controller {
],
'pageSize' => [
'validation' => DataValidator::oneOf(DataValidator::intVal()->between(5, 50),DataValidator::nullType()),
'error' => ERRORS::PAGESIZE_ERROR
'error' => ERRORS::INVALID_PAGE_SIZE
]
]
];

View File

@ -410,5 +410,5 @@ class ERRORS {
const INVALID_SUPERVISED_USERS = 'INVALID_SUPERVISED_USERS';
const INVALID_USER_SEARCH_OPTION = 'INVALID_USER_SEARCH_OPTION';
const TICKET_CONTENT_CANNOT_BE_EDITED = 'TICKET_CONTENT_CANNOT_BE_EDITED';
const PAGESIZE_ERROR = 'PAGESIZE_ERROR';
const INVALID_PAGE_SIZE = 'INVALID_PAGE_SIZE';
}