Browse Source

fix(nc-gui): record overlap

pull/7753/head
DarkPhoenix2704 9 months ago
parent
commit
b550e8dac5
  1. 8
      packages/nc-gui/components/smartsheet/calendar/MonthView.vue

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

@ -177,7 +177,7 @@ const recordsToDisplay = computed<{
const top = weekIndex * perHeight + spaceBetweenRecords + (recordIndex - 1) * (perRecordHeight + 4)
// The 25 is obtained from the trial and error
const heightRequired = perRecordHeight * recordIndex + spaceBetweenRecords
const heightRequired = perRecordHeight * recordIndex + spaceBetweenRecords + 13
if (heightRequired > perHeight) {
style.display = 'none'
@ -284,7 +284,7 @@ const recordsToDisplay = computed<{
// If the record in 1st week and no record in that date them the top will be 0
// If the record in 1st week and 1 record in that date then the top will be perRecordHeight + spaceBetweenRecords
const top = weekIndex * perHeight + spaceBetweenRecords + Math.max(maxRecordCount - 1, 0) * (perRecordHeight + 4)
const heightRequired = perRecordHeight * maxRecordCount + spaceBetweenRecords
const heightRequired = perRecordHeight * maxRecordCount + spaceBetweenRecords + 13
let position = 'rounded'
// Here we are checking if the startDay is before all the dates shown in UI rather that the current month
@ -761,12 +761,12 @@ const addRecord = (date: dayjs.Dayjs) => {
recordsToDisplay.count[dayjs(day).format('YYYY-MM-DD')]?.overflow &&
!draggingId
"
class="!absolute bottom-1 right-1 text-center w-15 mx-auto z-3 text-gray-500"
class="!absolute bottom-1 right-1 text-center min-w-4.5 mx-auto z-3 text-gray-500"
size="xxsmall"
type="secondary"
@click="viewMore(day)"
>
<span class="text-xs"> + {{ recordsToDisplay.count[dayjs(day).format('YYYY-MM-DD')]?.overflowCount }} more </span>
<span class="text-xs px-0.5"> + {{ recordsToDisplay.count[dayjs(day).format('YYYY-MM-DD')]?.overflowCount }} </span>
</NcButton>
</div>
</div>

Loading…
Cancel
Save