|
|
@ -43,7 +43,7 @@ const { gridViewCols } = useViewColumnsOrThrow() |
|
|
|
|
|
|
|
|
|
|
|
const { fieldsToGroupBy, groupByLimit } = useViewGroupByOrThrow(view) |
|
|
|
const { fieldsToGroupBy, groupByLimit } = useViewGroupByOrThrow(view) |
|
|
|
|
|
|
|
|
|
|
|
const isLoading = ref('') |
|
|
|
const isLoading = ref<'' | 'hideOrShow' | 'setDisplay'>('') |
|
|
|
|
|
|
|
|
|
|
|
const setAsDisplayValue = async () => { |
|
|
|
const setAsDisplayValue = async () => { |
|
|
|
isLoading.value = 'setDisplay' |
|
|
|
isLoading.value = 'setDisplay' |
|
|
@ -94,8 +94,9 @@ const setAsDisplayValue = async () => { |
|
|
|
}) |
|
|
|
}) |
|
|
|
} catch (e) { |
|
|
|
} catch (e) { |
|
|
|
message.error(t('msg.error.primaryColumnUpdateFailed')) |
|
|
|
message.error(t('msg.error.primaryColumnUpdateFailed')) |
|
|
|
|
|
|
|
} finally { |
|
|
|
|
|
|
|
isLoading.value = '' |
|
|
|
} |
|
|
|
} |
|
|
|
isLoading.value = '' |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const sortByColumn = async (direction: 'asc' | 'desc') => { |
|
|
|
const sortByColumn = async (direction: 'asc' | 'desc') => { |
|
|
@ -293,7 +294,8 @@ const hideOrShowField = async () => { |
|
|
|
}, |
|
|
|
}, |
|
|
|
scope: defineViewScope({ view: view.value }), |
|
|
|
scope: defineViewScope({ view: view.value }), |
|
|
|
}) |
|
|
|
}) |
|
|
|
// isLoading.value = false |
|
|
|
|
|
|
|
|
|
|
|
isLoading.value = '' |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const handleDelete = () => { |
|
|
|
const handleDelete = () => { |
|
|
@ -389,12 +391,8 @@ const filterOrGroupByThisField = (event: SmartsheetStoreEvents) => { |
|
|
|
<a-divider v-if="!column?.pv" class="!my-0" /> |
|
|
|
<a-divider v-if="!column?.pv" class="!my-0" /> |
|
|
|
<NcMenuItem v-if="!column?.pv" @click="hideOrShowField"> |
|
|
|
<NcMenuItem v-if="!column?.pv" @click="hideOrShowField"> |
|
|
|
<div v-e="['a:field:hide']" class="nc-column-insert-before nc-header-menu-item"> |
|
|
|
<div v-e="['a:field:hide']" class="nc-column-insert-before nc-header-menu-item"> |
|
|
|
<component |
|
|
|
<GeneralLoader v-if="isLoading === 'hideOrShow'" size="regular" /> |
|
|
|
:is="isHiddenCol ? iconMap.eye : iconMap.eyeSlash" |
|
|
|
<component v-else :is="isHiddenCol ? iconMap.eye : iconMap.eyeSlash" class="text-gray-700 !w-4 !h-4" /> |
|
|
|
v-show="isLoading !== 'hideOrShow'" |
|
|
|
|
|
|
|
class="text-gray-700 !w-3.75 !h-3.75" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
<GeneralLoader v-show="isLoading === 'hideOrShow'" size="large" class="!w-3.75 !h-3.75" /> |
|
|
|
|
|
|
|
<!-- Hide Field --> |
|
|
|
<!-- Hide Field --> |
|
|
|
{{ isHiddenCol ? $t('general.showField') : $t('general.hideField') }} |
|
|
|
{{ isHiddenCol ? $t('general.showField') : $t('general.hideField') }} |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -404,8 +402,8 @@ const filterOrGroupByThisField = (event: SmartsheetStoreEvents) => { |
|
|
|
@click="setAsDisplayValue" |
|
|
|
@click="setAsDisplayValue" |
|
|
|
> |
|
|
|
> |
|
|
|
<div class="nc-column-set-primary nc-header-menu-item item"> |
|
|
|
<div class="nc-column-set-primary nc-header-menu-item item"> |
|
|
|
<GeneralIcon v-show="isLoading !== 'setDisplay'" icon="star" class="text-gray-700 !w-4.25 !h-4.25" /> |
|
|
|
<GeneralLoader v-if="isLoading === 'setDisplay'" size="regular" /> |
|
|
|
<GeneralLoader v-show="isLoading === 'setDisplay'" size="large" class="!w-4.25 !h-4.25" /> |
|
|
|
<GeneralIcon v-else icon="star" class="text-gray-700 !w-4.25 !h-4.25" /> |
|
|
|
|
|
|
|
|
|
|
|
<!-- todo : tooltip --> |
|
|
|
<!-- todo : tooltip --> |
|
|
|
<!-- Set as Display value --> |
|
|
|
<!-- Set as Display value --> |
|
|
|