- saving progress;
This commit is contained in:
@@ -2,14 +2,17 @@ import { __ } from '@wordpress/i18n';
|
||||
|
||||
const getBandoLabel = (status) => {
|
||||
switch (status) {
|
||||
case 'publish':
|
||||
case 'PUBLISH':
|
||||
return __('Pubblicato', 'gepafin');
|
||||
|
||||
case 'draft':
|
||||
case 'READY_TO_PUBLISH':
|
||||
return __('Pronto', 'gepafin');
|
||||
|
||||
case 'DRAFT':
|
||||
return __('Bozza', 'gepafin');
|
||||
|
||||
case 'closed':
|
||||
return __('Chiuso', 'gepafin');
|
||||
case 'EXPIRED':
|
||||
return __('Scaduto', 'gepafin');
|
||||
|
||||
default:
|
||||
return '';
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
const getBandoSeverity = (status) => {
|
||||
switch (status) {
|
||||
case 'publish':
|
||||
case 'PUBLISH':
|
||||
return 'success';
|
||||
|
||||
case 'draft':
|
||||
case 'READY_TO_PUBLISH':
|
||||
return 'info';
|
||||
|
||||
case 'DRAFT':
|
||||
return 'warning';
|
||||
|
||||
case 'closed':
|
||||
case 'EXPIRED':
|
||||
return 'closed';
|
||||
|
||||
default:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const getDateFromISOstring = (value, options = {}) => {
|
||||
const optionsMerged = options || { day: '2-digit', month: '2-digit', year: 'numeric', dateStyle: 'short' }
|
||||
return Intl.DateTimeFormat('it-IT', optionsMerged).format(new Date(value))
|
||||
const optionsMerged = options || { day: '2-digit', month: '2-digit', year: 'numeric', hour12: false }
|
||||
return value ? Intl.DateTimeFormat('it-IT', optionsMerged).format(new Date(value)) : value;
|
||||
}
|
||||
|
||||
export default getDateFromISOstring;
|
||||
Reference in New Issue
Block a user