Browse Source

feat(nc-gui): some more issue fix

pull/7753/head
DarkPhoenix2704 8 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-sm': size === 'medium',
}"
class="font-bold text-gray-700"
class="text-gray-700"
>{{ currentMonthYear }}</span
>
<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>
</template>
</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>
<NcButton size="small" type="secondary" @click="paginate('next')">
<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>
<span
class="before:content-['•'] !first:before:content-[''] !first:before:px-0 before:px-1"
:class="{
'font-bold': bold,
'italic': italic,

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

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

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

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

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

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

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

@ -77,7 +77,7 @@ const emit = defineEmits(['resize-start'])
:class="{
'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 />
</span>

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

@ -1,6 +1,6 @@
<script lang="ts" setup>
import type { VNodeRef } from '@vue/runtime-core'
import { UITypes, isVirtualCol } from 'nocodb-sdk'
import { UITypes } from 'nocodb-sdk'
import dayjs from 'dayjs'
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" />
</template>
</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">
<div class="flex items-center justify-between gap-2">
<div class="truncate flex-1">
@ -433,22 +433,7 @@ onUnmounted(() => {
@dragover.prevent
>
<template v-if="!isRowEmpty(record, displayField)">
<div :class="{}">
<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>
<LazySmartsheetCalendarCell v-model="record.row[displayField!.title!]" :column="displayField" />
</template>
</LazySmartsheetCalendarSideRecordCard>
</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"
></span>
<div class="flex text-ellipsis gap-1 flex-col">
<span class="text-sm max-w-40 truncate text-gray-800">
<div class="flex gap-1 flex-col">
<span class="text-sm max-w-56 truncate text-gray-800">
<slot />
</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>
<span
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"
>
<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">
<slot />
</span>

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

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

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

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

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

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

Loading…
Cancel
Save