/** * @copyright Copyright (c) 2019 Georg Ehrke * * @author Georg Ehrke * * @license AGPL-3.0-or-later * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . * */ import { translate as t } from '@nextcloud/l10n' import { getDefaultCategories } from '../defaults/defaultCategories.js' /** * Gets all supported RFC properties * * @return {{color: {readableName: *, icon: string, multiple: boolean, info: *}, timeTransparency: {readableName: *, defaultValue: string, icon: string, multiple: boolean, options: *[], info: *}, description: {readableName: *, icon: string, placeholder: *, defaultNumberOfRows: number}, location: {readableName: *, icon: string, placeholder: *}, categories: {readableName: *, icon: string, multiple: boolean, options: *, tagPlaceholder: *, placeholder: *, info: *}, accessClass: {readableName: *, defaultValue: string, icon: string, options: *[], multiple: boolean, info: *}, status: {readableName: *, defaultValue: string, icon: string, options: *[], multiple: boolean, info: *}, locations: {readableName: *, defaultValue: string, icon: string, options: *[], multiple: boolean, info: *}, articles: {readableName: *, defaultValue: string, icon: string, options: *[], multiple: boolean, info: *}}} */ const getRFCProperties = () => { return { /** * https://tools.ietf.org/html/rfc5545#section-3.8.1.3 */ accessClass: { readableName: t('calendar', 'When shared show'), icon: 'Eye', options: [ { value: 'PUBLIC', label: t('calendar', 'When shared show full event') }, { value: 'CONFIDENTIAL', label: t('calendar', 'When shared show only busy') }, { value: 'PRIVATE', label: t('calendar', 'When shared hide this event') }, ], multiple: false, info: t('calendar', 'The visibility of this event in shared calendars.'), defaultValue: 'PUBLIC', }, /** * https://tools.ietf.org/html/rfc5545#section-3.8.1.7 */ location: { readableName: t('calendar', 'Location'), placeholder: t('calendar', 'Choisir le lieu'), icon: 'MapMarker', }, /** * https://tools.ietf.org/html/rfc5545#section-3.8.1.5 */ description: { readableName: t('calendar', 'Description'), placeholder: t('calendar', 'Choisir les soins'), icon: 'TextBoxOutline', defaultNumberOfRows: 2, }, /** * https://tools.ietf.org/html/rfc5545#section-3.8.1.11 */ status: { readableName: t('calendar', 'Status'), icon: 'Check', options: [ { value: 'CONFIRMED', label: t('calendar', 'Confirmed') }, { value: 'TENTATIVE', label: t('calendar', 'Tentative') }, { value: 'CANCELLED', label: t('calendar', 'Canceled') }, ], multiple: false, info: t('calendar', 'Confirmation about the overall status of the event.'), defaultValue: 'CONFIRMED', }, /** * https://tools.ietf.org/html/rfc5545#section-3.8.2.7 */ timeTransparency: { readableName: t('calendar', 'Show as'), icon: 'Briefcase', multiple: false, info: t('calendar', 'Take this event into account when calculating free-busy information.'), options: [ { value: 'TRANSPARENT', label: t('calendar', 'Free') }, { value: 'OPAQUE', label: t('calendar', 'Busy') }, ], defaultValue: 'TRANSPARENT', }, /** * https://tools.ietf.org/html/rfc5545#section-3.8.1.2 */ categories: { readableName: t('calendar', 'Categories'), icon: 'Tag', multiple: true, info: t('calendar', 'Categories help you to structure and organize your events.'), placeholder: t('calendar', 'Search or add categories'), tagPlaceholder: t('calendar', 'Add this as a new category'), options: getDefaultCategories(), }, /** * https://tools.ietf.org/html/rfc7986#section-5.9 */ color: { readableName: t('calendar', 'Custom color'), icon: 'EyedropperVariant', multiple: false, info: t('calendar', 'Special color of this event. Overrides the calendar-color.'), }, locations: { readableName: t('calendar', 'Locations'), icon: 'Tag', searchable: true, multiple: false, info: t('calendar', 'Choisir le lieu du soin.'), placeholder: t('calendar', 'Choisir un lieu'), tagPlaceholder: t('calendar', 'Choisir un lieu'), options: [], }, clients: { readableName: t('calendar', 'Clients'), icon: 'Human', searchable: true, multiple: false, info: t('calendar', 'Choisir le donneur d\'ordre.'), placeholder: t('calendar', 'Choisir un client'), tagPlaceholder: t('calendar', 'Choisir un client'), options: [], }, client: { readableName: t('calendar', 'Choisir un client'), placeholder: t('calendar', 'Choisir un client'), icon: 'Human', }, embalmers: { readableName: t('calendar', 'Embalmers'), icon: 'Human', searchable: true, multiple: false, info: t('calendar', 'Thanatopracteur from Gestion'), placeholder: t('calendar', 'Choose thanatopracteur'), tagPlaceholder: t('calendar', 'Choose thanatopracteur'), options: [], }, embalmer: { readableName: t('calendar', 'Embalmer'), placeholder: t('calendar', 'Add a thanatopracteur'), icon: 'Human', }, articles: { readableName: t('calendar', 'Articles'), icon: 'TextBoxOutline', searchable: true, multiple: true, info: t('calendar', 'Choisir les soins à appliquer.'), placeholder: t('calendar', 'Choisir les soins'), tagPlaceholder: t('calendar', 'Choisir les soins'), options: [], }, } } export { getRFCProperties, }