Browse Source

feat(nc-gui): some more issue fix

pull/7753/head
DarkPhoenix2704 9 months ago
parent
commit
9d0d42cea5
  1. 2
      packages/nc-gui/components/nc/DateWeekSelector.vue
  2. 2
      packages/nc-gui/components/nc/MonthYearSelector.vue
  3. 1
      packages/nc-gui/components/smartsheet/calendar/Cell.vue
  4. 1
      packages/nc-gui/components/smartsheet/calendar/DayView/DateField.vue
  5. 1
      packages/nc-gui/components/smartsheet/calendar/DayView/DateTimeField.vue
  6. 1
      packages/nc-gui/components/smartsheet/calendar/MonthView.vue
  7. 2
      packages/nc-gui/components/smartsheet/calendar/RecordCard.vue
  8. 21
      packages/nc-gui/components/smartsheet/calendar/SideMenu.vue
  9. 4
      packages/nc-gui/components/smartsheet/calendar/SideRecordCard.vue
  10. 4
      packages/nc-gui/components/smartsheet/calendar/VRecordCard.vue
  11. 1
      packages/nc-gui/components/smartsheet/calendar/WeekView/DateField.vue
  12. 1
      packages/nc-gui/components/smartsheet/calendar/WeekView/DateTimeField.vue
  13. 2
      packages/nc-gui/components/smartsheet/calendar/index.vue

2
packages/nc-gui/components/nc/DateWeekSelector.vue

@ -165,7 +165,7 @@ const paginate = (action: 'next' | 'prev') => {
'text-xs': size === 'small', 'text-xs': size === 'small',
'text-sm': size === 'medium', 'text-sm': size === 'medium',
}" }"
class="font-bold text-gray-700" class="text-gray-700"
>{{ currentMonthYear }}</span >{{ currentMonthYear }}</span
> >
<NcTooltip> <NcTooltip>

2
packages/nc-gui/components/nc/MonthYearSelector.vue

@ -95,7 +95,7 @@ const compareYear = (date1: dayjs.Dayjs, date2: dayjs.Dayjs) => {
<span>{{ $t('labels.previous') }}</span> <span>{{ $t('labels.previous') }}</span>
</template> </template>
</NcTooltip> </NcTooltip>
<span class="font-bold text-gray-700">{{ isYearPicker ? $t('labels.selectYear') : pageDate.year() }}</span> <span class="text-gray-700">{{ isYearPicker ? $t('labels.selectYear') : pageDate.year() }}</span>
<NcTooltip> <NcTooltip>
<NcButton size="small" type="secondary" @click="paginate('next')"> <NcButton size="small" type="secondary" @click="paginate('next')">
<component :is="iconMap.doubleRightArrow" class="h-4 w-4" /> <component :is="iconMap.doubleRightArrow" class="h-4 w-4" />

1
packages/nc-gui/components/smartsheet/calendar/Cell.vue

@ -356,6 +356,7 @@ const parseValue = (value: any, col: ColumnType): string => {
<template> <template>
<span <span
class="before:content-['•'] !first:before:content-[''] !first:before:px-0 before:px-1"
:class="{ :class="{
'font-bold': bold, 'font-bold': bold,
'italic': italic, 'italic': italic,

1
packages/nc-gui/components/smartsheet/calendar/DayView/DateField.vue

@ -235,6 +235,7 @@ const newRecord = () => {
</template> </template>
<template v-for="(field, id) in fieldsWithoutDisplay" :key="id"> <template v-for="(field, id) in fieldsWithoutDisplay" :key="id">
<LazySmartsheetCalendarCell <LazySmartsheetCalendarCell
v-if="!isRowEmpty(record, field!)"
v-model="record.row[field!.title!]" v-model="record.row[field!.title!]"
:bold="getFieldStyle(field).bold" :bold="getFieldStyle(field).bold"
:column="field" :column="field"

1
packages/nc-gui/components/smartsheet/calendar/DayView/DateTimeField.vue

@ -1003,6 +1003,7 @@ const newRecord = (hour: dayjs.Dayjs) => {
</template> </template>
<template v-for="(field, id) in fieldsWithoutDisplay" :key="id"> <template v-for="(field, id) in fieldsWithoutDisplay" :key="id">
<LazySmartsheetCalendarCell <LazySmartsheetCalendarCell
v-if="!isRowEmpty(record, field!)"
v-model="record.row[field!.title!]" v-model="record.row[field!.title!]"
:bold="getFieldStyle(field).bold" :bold="getFieldStyle(field).bold"
:column="field" :column="field"

1
packages/nc-gui/components/smartsheet/calendar/MonthView.vue

@ -806,6 +806,7 @@ const addRecord = (date: dayjs.Dayjs) => {
</template> </template>
<template v-for="(field, id) in fieldsWithoutDisplay" :key="id"> <template v-for="(field, id) in fieldsWithoutDisplay" :key="id">
<LazySmartsheetCalendarCell <LazySmartsheetCalendarCell
v-if="!isRowEmpty(record, field!)"
v-model="record.row[field!.title!]" v-model="record.row[field!.title!]"
:bold="getFieldStyle(field).bold" :bold="getFieldStyle(field).bold"
:column="field" :column="field"

2
packages/nc-gui/components/smartsheet/calendar/RecordCard.vue

@ -77,7 +77,7 @@ const emit = defineEmits(['resize-start'])
:class="{ :class="{
'pr-7': position === 'leftRounded', 'pr-7': position === 'leftRounded',
}" }"
class="text-sm pr-3 mr-3 break-word space-x-2 whitespace-nowrap gap-2 overflow-hidden text-ellipsis w-full truncate text-gray-800" class="text-sm pr-3 mr-3 break-word whitespace-nowrap overflow-hidden text-ellipsis w-full truncate text-gray-800"
> >
<slot /> <slot />
</span> </span>

21
packages/nc-gui/components/smartsheet/calendar/SideMenu.vue

@ -1,6 +1,6 @@
<script lang="ts" setup> <script lang="ts" setup>
import type { VNodeRef } from '@vue/runtime-core' import type { VNodeRef } from '@vue/runtime-core'
import { UITypes, isVirtualCol } from 'nocodb-sdk' import { UITypes } from 'nocodb-sdk'
import dayjs from 'dayjs' import dayjs from 'dayjs'
import { type Row, computed, iconMap, isRowEmpty, ref } from '#imports' import { type Row, computed, iconMap, isRowEmpty, ref } from '#imports'
@ -348,7 +348,7 @@ onUnmounted(() => {
<component :is="iconMap.search" class="h-4 w-4 mr-1 text-gray-500" /> <component :is="iconMap.search" class="h-4 w-4 mr-1 text-gray-500" />
</template> </template>
</a-input> </a-input>
<NcSelect v-model:value="sideBarFilterOption" class="min-w-38 !text-gray-800" data-testid="nc-calendar-sidebar-filter"> <NcSelect v-model:value="sideBarFilterOption" class="min-w-38 !text-gray-600" data-testid="nc-calendar-sidebar-filter">
<a-select-option v-for="option in options" :key="option.value" :value="option.value" class="!text-gray-600"> <a-select-option v-for="option in options" :key="option.value" :value="option.value" class="!text-gray-600">
<div class="flex items-center justify-between gap-2"> <div class="flex items-center justify-between gap-2">
<div class="truncate flex-1"> <div class="truncate flex-1">
@ -433,22 +433,7 @@ onUnmounted(() => {
@dragover.prevent @dragover.prevent
> >
<template v-if="!isRowEmpty(record, displayField)"> <template v-if="!isRowEmpty(record, displayField)">
<div :class="{}"> <LazySmartsheetCalendarCell v-model="record.row[displayField!.title!]" :column="displayField" />
<LazySmartsheetVirtualCell
v-if="isVirtualCol(displayField)"
v-model="record.row[displayField.title]"
:column="displayField"
:row="record"
/>
<LazySmartsheetCell
v-else
v-model="record.row[displayField.title]"
:column="displayField"
:edit-enabled="false"
:read-only="true"
/>
</div>
</template> </template>
</LazySmartsheetCalendarSideRecordCard> </LazySmartsheetCalendarSideRecordCard>
</LazySmartsheetRow> </LazySmartsheetRow>

4
packages/nc-gui/components/smartsheet/calendar/SideRecordCard.vue

@ -29,8 +29,8 @@ const props = withDefaults(defineProps<Props>(), {
}" }"
class="block h-10 w-1 rounded" class="block h-10 w-1 rounded"
></span> ></span>
<div class="flex text-ellipsis gap-1 flex-col"> <div class="flex gap-1 flex-col">
<span class="text-sm max-w-40 truncate text-gray-800"> <span class="text-sm max-w-56 truncate text-gray-800">
<slot /> <slot />
</span> </span>
<span v-if="showDate" class="text-xs text-gray-500">{{ fromDate }} {{ toDate ? ` - ${toDate}` : '' }}</span> <span v-if="showDate" class="text-xs text-gray-500">{{ fromDate }} {{ toDate ? ` - ${toDate}` : '' }}</span>

4
packages/nc-gui/components/smartsheet/calendar/VRecordCard.vue

@ -70,9 +70,7 @@ const emit = defineEmits(['resize-start'])
<div v-if="position === 'bottomRounded' || position === 'none'" class="ml-3">....</div> <div v-if="position === 'bottomRounded' || position === 'none'" class="ml-3">....</div>
<span <span class="pl-1 pr-1 text-sm h-[80%] text-gray-800 leading-7 break-all whitespace-normal truncate w-full overflow-y-hidden">
class="pl-1 pr-1 text-sm h-[80%] text-gray-800 leading-7 space-x-2 break-all whitespace-normal truncate w-full overflow-y-hidden"
>
<slot /> <slot />
</span> </span>

1
packages/nc-gui/components/smartsheet/calendar/WeekView/DateField.vue

@ -601,6 +601,7 @@ const addRecord = (date: dayjs.Dayjs) => {
</template> </template>
<template v-for="(field, index) in fieldsWithoutDisplay" :key="index"> <template v-for="(field, index) in fieldsWithoutDisplay" :key="index">
<LazySmartsheetCalendarCell <LazySmartsheetCalendarCell
v-if="!isRowEmpty(record, field!)"
v-model="record.row[field!.title!]" v-model="record.row[field!.title!]"
:bold="getFieldStyle(field).bold" :bold="getFieldStyle(field).bold"
:column="field" :column="field"

1
packages/nc-gui/components/smartsheet/calendar/WeekView/DateTimeField.vue

@ -838,6 +838,7 @@ const addRecord = (date: dayjs.Dayjs) => {
</template> </template>
<template v-for="(field, id) in fieldsWithoutDisplay" :key="id"> <template v-for="(field, id) in fieldsWithoutDisplay" :key="id">
<LazySmartsheetCalendarCell <LazySmartsheetCalendarCell
v-if="!isRowEmpty(record, field!)"
v-model="record.row[field!.title!]" v-model="record.row[field!.title!]"
:bold="getFieldStyle(field).bold" :bold="getFieldStyle(field).bold"
:column="field" :column="field"

2
packages/nc-gui/components/smartsheet/calendar/index.vue

@ -321,6 +321,7 @@ const headerText = computed(() => {
<LazySmartsheetExpandedForm <LazySmartsheetExpandedForm
v-if="expandedFormRow && expandedFormDlg" v-if="expandedFormRow && expandedFormDlg"
v-model="expandedFormDlg" v-model="expandedFormDlg"
close-after-save
:meta="meta" :meta="meta"
:row="expandedFormRow" :row="expandedFormRow"
:state="expandedFormRowState" :state="expandedFormRowState"
@ -332,6 +333,7 @@ const headerText = computed(() => {
<LazySmartsheetExpandedForm <LazySmartsheetExpandedForm
v-if="expandedFormOnRowIdDlg" v-if="expandedFormOnRowIdDlg"
v-model="expandedFormOnRowIdDlg" v-model="expandedFormOnRowIdDlg"
close-after-save
:meta="meta" :meta="meta"
:row="{ row: {}, oldRow: {}, rowMeta: {} }" :row="{ row: {}, oldRow: {}, rowMeta: {} }"
:row-id="route.query.rowId" :row-id="route.query.rowId"

Loading…
Cancel
Save