Browse Source

fix(nc-gui): calendar toolbar

pull/7611/head
DarkPhoenix2704 9 months ago
parent
commit
1a0b288f7c
  1. 26
      packages/nc-gui/components/dlg/ViewCreate.vue
  2. 2
      packages/nc-gui/components/smartsheet/toolbar/CalendarRange.vue
  3. 14
      packages/nc-gui/components/smartsheet/toolbar/FieldsMenu.vue

26
packages/nc-gui/components/dlg/ViewCreate.vue

@ -1,10 +1,20 @@
<script setup lang="ts"> <script setup lang="ts">
import type { ComponentPublicInstance } from '@vue/runtime-core' import type {ComponentPublicInstance} from '@vue/runtime-core'
import type { Form as AntForm, SelectProps } from 'ant-design-vue' import {capitalize} from '@vue/runtime-core'
import { capitalize } from '@vue/runtime-core' import type {Form as AntForm, SelectProps} from 'ant-design-vue'
import {CalendarType, FormType, GalleryType, GridType, KanbanType, MapType, TableType} from 'nocodb-sdk' import {
import { UITypes, ViewTypes, isSystemColumn } from 'nocodb-sdk' CalendarType,
import { computed, message, nextTick, onBeforeMount, reactive, ref, useApi, useI18n, useVModel, watch } from '#imports' FormType,
GalleryType,
GridType,
isSystemColumn,
KanbanType,
MapType,
TableType,
UITypes,
ViewTypes
} from 'nocodb-sdk'
import {computed, message, nextTick, onBeforeMount, reactive, ref, useApi, useI18n, useVModel, watch} from '#imports'
interface Props { interface Props {
modelValue: boolean modelValue: boolean
@ -22,6 +32,7 @@ interface Props {
interface Emits { interface Emits {
(event: 'update:modelValue', value: boolean): void (event: 'update:modelValue', value: boolean): void
(event: 'created', value: GridType | KanbanType | GalleryType | FormType | MapType | CalendarType): void (event: 'created', value: GridType | KanbanType | GalleryType | FormType | MapType | CalendarType): void
} }
@ -354,7 +365,8 @@ onMounted(async () => {
</template> </template>
</template> </template>
</div> </div>
<a v-if="!form.copy_from_id" href="https://docs.nocodb.com/views/view-types/calendar/" target="_blank" class="text-sm !no-underline !hover:text-brand-500 text-brand-500 "> <a v-if="!form.copy_from_id" href="https://docs.nocodb.com/views/view-types/calendar/" target="_blank"
class="text-sm !no-underline !hover:text-brand-500 text-brand-500 ">
Go to Docs Go to Docs
</a> </a>
</div> </div>

2
packages/nc-gui/components/smartsheet/toolbar/CalendarRange.vue

@ -19,7 +19,7 @@ const {eventBus} = useSmartsheetStoreOrThrow()
const meta = inject(MetaInj, ref()) const meta = inject(MetaInj, ref())
const { $e, $api } = useNuxtApp() const {$e, $api} = useNuxtApp()
const activeView = inject(ActiveViewInj, ref()) const activeView = inject(ActiveViewInj, ref())

14
packages/nc-gui/components/smartsheet/toolbar/FieldsMenu.vue

@ -1,18 +1,17 @@
<script setup lang="ts"> <script setup lang="ts">
import {CalendarType, ColumnType, GalleryType, KanbanType} from 'nocodb-sdk' import {CalendarType, ColumnType, GalleryType, isVirtualCol, KanbanType, UITypes, ViewTypes} from 'nocodb-sdk'
import { UITypes, ViewTypes, isVirtualCol } from 'nocodb-sdk'
import Draggable from 'vuedraggable' import Draggable from 'vuedraggable'
import type { SelectProps } from 'ant-design-vue' import type {SelectProps} from 'ant-design-vue'
import { import {
ActiveViewInj, ActiveViewInj,
FieldsInj,
IsLockedInj,
IsPublicInj,
computed, computed,
FieldsInj,
iconMap, iconMap,
inject, inject,
IsLockedInj,
IsPublicInj,
ref, ref,
resolveComponent, resolveComponent,
useMenuCloseOnEsc, useMenuCloseOnEsc,
@ -310,7 +309,8 @@ useMenuCloseOnEsc(open)
<!-- Fields --> <!-- Fields -->
<span v-if="!isMobileMode" class="text-capitalize text-sm font-medium"> <span v-if="!isMobileMode" class="text-capitalize text-sm font-medium">
<template v-if="activeView?.type === ViewTypes.KANBAN || activeView?.type === ViewTypes.GALLERY || activeView?.type === ViewTypes.CALENDAR"> <template
v-if="activeView?.type === ViewTypes.KANBAN || activeView?.type === ViewTypes.GALLERY || activeView?.type === ViewTypes.CALENDAR">
{{ $t('title.editCards') }} {{ $t('title.editCards') }}
</template> </template>
<template v-else> <template v-else>

Loading…
Cancel
Save