superdesk/superdesk-client-core

View on GitHub
scripts/apps/vocabularies/services/SchemaFactory.ts

Summary

Maintainability
A
0 mins
Test Coverage
import {gettext} from 'core/utils';

SchemaFactory.$inject = [];
export function SchemaFactory() {
    var colorScheme = {
        name: {type: 'text', label: gettext('Name')},
        qcode: {type: 'text', label: gettext('QCode')},
        color: {type: 'color', label: gettext('Color')},
        short: {type: 'short', label: gettext('List Name'), maxlength: 2},
    };

    return {
        urgency: colorScheme,
        priority: colorScheme,
    };
}