diff --git a/config/packages/api_platform.yaml b/config/packages/api_platform.yaml index 4b2b414..c686cc6 100644 --- a/config/packages/api_platform.yaml +++ b/config/packages/api_platform.yaml @@ -5,6 +5,8 @@ api_platform: stateless: true cache_headers: vary: ['Content-Type', 'Authorization', 'Origin'] + pagination_client_items_per_page: true + pagination_maximum_items_per_page: 100 formats: json: ['application/json'] jsonld: ['application/ld+json'] diff --git a/frontend/components/ui/UiDataTable.vue b/frontend/components/ui/UiDataTable.vue new file mode 100644 index 0000000..e385879 --- /dev/null +++ b/frontend/components/ui/UiDataTable.vue @@ -0,0 +1,233 @@ + + + diff --git a/frontend/components/ui/UiDateInput.vue b/frontend/components/ui/UiDateInput.vue index b756cb8..e4f54f7 100644 --- a/frontend/components/ui/UiDateInput.vue +++ b/frontend/components/ui/UiDateInput.vue @@ -14,8 +14,9 @@ :value="modelValue ?? ''" :disabled="disabled" v-bind="attrs" - class="border-b border-primary-700 justify-self-start text-xl text-primary-700 py-[6px] uppercase bg-transparent appearance-none h-[34px]" + class="w-full min-w-0 border-b border-primary-700 justify-self-start text-primary-700 bg-transparent appearance-none" :class="[ + sizeClass, isEmpty ? 'text-neutral-400' : 'text-primary-700', disabled ? 'cursor-not-allowed' : 'cursor-pointer', inputClass @@ -36,12 +37,14 @@ const props = withDefaults( label?: string modelValue: string | null | undefined disabled?: boolean + size?: 'default' | 'compact' wrapperClass?: string labelClass?: string inputClass?: string }>(), { disabled: false, + size: 'default', wrapperClass: '', labelClass: '', inputClass: '' @@ -54,6 +57,11 @@ const emit = defineEmits<{ const attrs = useAttrs() const isEmpty = computed(() => !props.modelValue) +const sizeClass = computed(() => + props.size === 'compact' + ? 'text-sm h-8 font-normal normal-case tracking-normal' + : 'text-xl py-[6px] uppercase h-[34px]' +) const onInput = (event: Event) => { const target = event.target as HTMLInputElement diff --git a/frontend/components/ui/UiSelect.vue b/frontend/components/ui/UiSelect.vue index ecc2c71..2ab9730 100644 --- a/frontend/components/ui/UiSelect.vue +++ b/frontend/components/ui/UiSelect.vue @@ -13,15 +13,16 @@ :value="modelValue ?? ''" :disabled="disabled || loading" v-bind="attrs" - class="border-b border-primary-700 justify-self-start text-xl text-primary-700 py-[6px] bg-transparent" + class="w-full min-w-0 border-b border-primary-700 justify-self-start text-primary-700 bg-transparent" :class="[ + sizeClass, isEmpty ? 'text-neutral-400' : 'text-primary-700', disabled || loading ? 'cursor-not-allowed' : 'cursor-pointer', selectClass ]" @change="onChange" > -