多维表格
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
1.5 KiB

Nc feat/type conversions rebased (#8680) * feat: created inferTypes.ts * chore: switch to sdk types * feat: convert string to given type * feat: convert string to rating * fix: handle the case with multiple . * feat: numeric decimal type conversion in postgres * feat: add cast for non text fields * refactor: move type casts to separate file * feat: add casts for date, date-time and time * doc: added function docs * feat: added cast for year and rating * feat: added cast for duration * fix: cast for multi-select * fix: cast for multi-select * fix: cast for year * feat: date conversion on best effort basis * fix: single line text to select * fix: any field to select * lint: simplified expressions * fix: user conversion * fix: user conversion * fix: date time conversion * test: added test cases for type casts * fix: SLT to User field * fix: SLT to Long text, single select and multiselect * chore: handle True/False & TRUE/FALSE in checkbox * lint: fixed eslint issues * chore: remove system fields as destination type when converting a field * feat: show warning when changing column type * fix: toned down edit modal * test: click on update button during warning popup * test: update selector * test: fix type change flag * fix: handle date format * chore: auto focus update button * fix: parameterize columnName and other values * chore: removed number of digits limit for hour * test: fix add-edit modal label * fix: fixed missing column reference * fix: handle missing date format * fix: handle missing date format * test: fix save routine mux * test: fix barCode & QRCode save * refactor: combined uiType filters * fix: sanitise column name * refactor: switch to some instead of find * feat: created inferTypes.ts * chore: switch to sdk types * feat: convert string to given type * feat: numeric decimal type conversion in postgres * feat: add cast for non text fields * refactor: move type casts to separate file * feat: add casts for date, date-time and time * doc: added function docs * feat: added cast for year and rating * feat: added cast for duration * fix: cast for multi-select * fix: cast for multi-select * fix: cast for year * feat: date conversion on best effort basis * fix: single line text to select * fix: user conversion * fix: date time conversion * fix: SLT to User field * fix: SLT to Long text, single select and multiselect * chore: handle True/False & TRUE/FALSE in checkbox * lint: fixed eslint issues * feat: show warning when changing column type * fix: toned down edit modal * test: click on update button during warning popup * fix: handle date format * chore: auto focus update button * fix: parameterize columnName and other values * chore: removed number of digits limit for hour * fix: handle missing date format * fix: handle missing date format * test: fix save routine mux * fix: revert removing verify * fix: sanitise column name * fix: pass context * tests: remove duplicate statement * fix: add context bypass for list method * fix: disable type conversion for Formula, BarCode, QrCode * fix: render confirm modal sing useDialog to avoid accidental closing * refactor: construct context using column while getting colOptions data --------- Co-authored-by: rohittp <tprohit9@gmail.com> Co-authored-by: Pranav C <pranavxc@gmail.com>
6 months ago
<script setup lang="ts">
const props = defineProps<{
visible?: boolean
saving?: boolean
}>()
const emit = defineEmits(['submit', 'cancel', 'update:visible'])
const visible = useVModel(props, 'visible', emit)
</script>
<template>
<NcModal v-model:visible="visible" size="small" :show-separator="false" :centered="false">
<template #header>
<div class="flex flex-row items-center gap-x-2">Field Type Change</div>
</template>
Nc feat/type conversions rebased (#8680) * feat: created inferTypes.ts * chore: switch to sdk types * feat: convert string to given type * feat: convert string to rating * fix: handle the case with multiple . * feat: numeric decimal type conversion in postgres * feat: add cast for non text fields * refactor: move type casts to separate file * feat: add casts for date, date-time and time * doc: added function docs * feat: added cast for year and rating * feat: added cast for duration * fix: cast for multi-select * fix: cast for multi-select * fix: cast for year * feat: date conversion on best effort basis * fix: single line text to select * fix: any field to select * lint: simplified expressions * fix: user conversion * fix: user conversion * fix: date time conversion * test: added test cases for type casts * fix: SLT to User field * fix: SLT to Long text, single select and multiselect * chore: handle True/False & TRUE/FALSE in checkbox * lint: fixed eslint issues * chore: remove system fields as destination type when converting a field * feat: show warning when changing column type * fix: toned down edit modal * test: click on update button during warning popup * test: update selector * test: fix type change flag * fix: handle date format * chore: auto focus update button * fix: parameterize columnName and other values * chore: removed number of digits limit for hour * test: fix add-edit modal label * fix: fixed missing column reference * fix: handle missing date format * fix: handle missing date format * test: fix save routine mux * test: fix barCode & QRCode save * refactor: combined uiType filters * fix: sanitise column name * refactor: switch to some instead of find * feat: created inferTypes.ts * chore: switch to sdk types * feat: convert string to given type * feat: numeric decimal type conversion in postgres * feat: add cast for non text fields * refactor: move type casts to separate file * feat: add casts for date, date-time and time * doc: added function docs * feat: added cast for year and rating * feat: added cast for duration * fix: cast for multi-select * fix: cast for multi-select * fix: cast for year * feat: date conversion on best effort basis * fix: single line text to select * fix: user conversion * fix: date time conversion * fix: SLT to User field * fix: SLT to Long text, single select and multiselect * chore: handle True/False & TRUE/FALSE in checkbox * lint: fixed eslint issues * feat: show warning when changing column type * fix: toned down edit modal * test: click on update button during warning popup * fix: handle date format * chore: auto focus update button * fix: parameterize columnName and other values * chore: removed number of digits limit for hour * fix: handle missing date format * fix: handle missing date format * test: fix save routine mux * fix: revert removing verify * fix: sanitise column name * fix: pass context * tests: remove duplicate statement * fix: add context bypass for list method * fix: disable type conversion for Formula, BarCode, QrCode * fix: render confirm modal sing useDialog to avoid accidental closing * refactor: construct context using column while getting colOptions data --------- Co-authored-by: rohittp <tprohit9@gmail.com> Co-authored-by: Pranav C <pranavxc@gmail.com>
6 months ago
<div class="flex flex-col" @click.stop>
<div
class="text-gray-800"
:class="{
'mb-3': $slots['entity-preview'],
}"
>
<div class="flex item-center gap-2">
<GeneralIcon id="nc-selected-item-icon" icon="alertTriangle" class="h-10 w-10 text-yellow-500" />
Nc feat/type conversions rebased (#8680) * feat: created inferTypes.ts * chore: switch to sdk types * feat: convert string to given type * feat: convert string to rating * fix: handle the case with multiple . * feat: numeric decimal type conversion in postgres * feat: add cast for non text fields * refactor: move type casts to separate file * feat: add casts for date, date-time and time * doc: added function docs * feat: added cast for year and rating * feat: added cast for duration * fix: cast for multi-select * fix: cast for multi-select * fix: cast for year * feat: date conversion on best effort basis * fix: single line text to select * fix: any field to select * lint: simplified expressions * fix: user conversion * fix: user conversion * fix: date time conversion * test: added test cases for type casts * fix: SLT to User field * fix: SLT to Long text, single select and multiselect * chore: handle True/False & TRUE/FALSE in checkbox * lint: fixed eslint issues * chore: remove system fields as destination type when converting a field * feat: show warning when changing column type * fix: toned down edit modal * test: click on update button during warning popup * test: update selector * test: fix type change flag * fix: handle date format * chore: auto focus update button * fix: parameterize columnName and other values * chore: removed number of digits limit for hour * test: fix add-edit modal label * fix: fixed missing column reference * fix: handle missing date format * fix: handle missing date format * test: fix save routine mux * test: fix barCode & QRCode save * refactor: combined uiType filters * fix: sanitise column name * refactor: switch to some instead of find * feat: created inferTypes.ts * chore: switch to sdk types * feat: convert string to given type * feat: numeric decimal type conversion in postgres * feat: add cast for non text fields * refactor: move type casts to separate file * feat: add casts for date, date-time and time * doc: added function docs * feat: added cast for year and rating * feat: added cast for duration * fix: cast for multi-select * fix: cast for multi-select * fix: cast for year * feat: date conversion on best effort basis * fix: single line text to select * fix: user conversion * fix: date time conversion * fix: SLT to User field * fix: SLT to Long text, single select and multiselect * chore: handle True/False & TRUE/FALSE in checkbox * lint: fixed eslint issues * feat: show warning when changing column type * fix: toned down edit modal * test: click on update button during warning popup * fix: handle date format * chore: auto focus update button * fix: parameterize columnName and other values * chore: removed number of digits limit for hour * fix: handle missing date format * fix: handle missing date format * test: fix save routine mux * fix: revert removing verify * fix: sanitise column name * fix: pass context * tests: remove duplicate statement * fix: add context bypass for list method * fix: disable type conversion for Formula, BarCode, QrCode * fix: render confirm modal sing useDialog to avoid accidental closing * refactor: construct context using column while getting colOptions data --------- Co-authored-by: rohittp <tprohit9@gmail.com> Co-authored-by: Pranav C <pranavxc@gmail.com>
6 months ago
This action cannot be undone. Converting data types may result in data loss. Proceed with caution!
</div>
</div>
<slot name="entity-preview"></slot>
<div class="flex flex-row gap-x-2 mt-2.5 pt-2.5 justify-end">
<NcButton size="small" type="secondary" @click="visible = false">
Nc feat/type conversions rebased (#8680) * feat: created inferTypes.ts * chore: switch to sdk types * feat: convert string to given type * feat: convert string to rating * fix: handle the case with multiple . * feat: numeric decimal type conversion in postgres * feat: add cast for non text fields * refactor: move type casts to separate file * feat: add casts for date, date-time and time * doc: added function docs * feat: added cast for year and rating * feat: added cast for duration * fix: cast for multi-select * fix: cast for multi-select * fix: cast for year * feat: date conversion on best effort basis * fix: single line text to select * fix: any field to select * lint: simplified expressions * fix: user conversion * fix: user conversion * fix: date time conversion * test: added test cases for type casts * fix: SLT to User field * fix: SLT to Long text, single select and multiselect * chore: handle True/False & TRUE/FALSE in checkbox * lint: fixed eslint issues * chore: remove system fields as destination type when converting a field * feat: show warning when changing column type * fix: toned down edit modal * test: click on update button during warning popup * test: update selector * test: fix type change flag * fix: handle date format * chore: auto focus update button * fix: parameterize columnName and other values * chore: removed number of digits limit for hour * test: fix add-edit modal label * fix: fixed missing column reference * fix: handle missing date format * fix: handle missing date format * test: fix save routine mux * test: fix barCode & QRCode save * refactor: combined uiType filters * fix: sanitise column name * refactor: switch to some instead of find * feat: created inferTypes.ts * chore: switch to sdk types * feat: convert string to given type * feat: numeric decimal type conversion in postgres * feat: add cast for non text fields * refactor: move type casts to separate file * feat: add casts for date, date-time and time * doc: added function docs * feat: added cast for year and rating * feat: added cast for duration * fix: cast for multi-select * fix: cast for multi-select * fix: cast for year * feat: date conversion on best effort basis * fix: single line text to select * fix: user conversion * fix: date time conversion * fix: SLT to User field * fix: SLT to Long text, single select and multiselect * chore: handle True/False & TRUE/FALSE in checkbox * lint: fixed eslint issues * feat: show warning when changing column type * fix: toned down edit modal * test: click on update button during warning popup * fix: handle date format * chore: auto focus update button * fix: parameterize columnName and other values * chore: removed number of digits limit for hour * fix: handle missing date format * fix: handle missing date format * test: fix save routine mux * fix: revert removing verify * fix: sanitise column name * fix: pass context * tests: remove duplicate statement * fix: add context bypass for list method * fix: disable type conversion for Formula, BarCode, QrCode * fix: render confirm modal sing useDialog to avoid accidental closing * refactor: construct context using column while getting colOptions data --------- Co-authored-by: rohittp <tprohit9@gmail.com> Co-authored-by: Pranav C <pranavxc@gmail.com>
6 months ago
{{ $t('general.cancel') }}
</NcButton>
<NcButton
key="submit"
autofocus
size="small"
Nc feat/type conversions rebased (#8680) * feat: created inferTypes.ts * chore: switch to sdk types * feat: convert string to given type * feat: convert string to rating * fix: handle the case with multiple . * feat: numeric decimal type conversion in postgres * feat: add cast for non text fields * refactor: move type casts to separate file * feat: add casts for date, date-time and time * doc: added function docs * feat: added cast for year and rating * feat: added cast for duration * fix: cast for multi-select * fix: cast for multi-select * fix: cast for year * feat: date conversion on best effort basis * fix: single line text to select * fix: any field to select * lint: simplified expressions * fix: user conversion * fix: user conversion * fix: date time conversion * test: added test cases for type casts * fix: SLT to User field * fix: SLT to Long text, single select and multiselect * chore: handle True/False & TRUE/FALSE in checkbox * lint: fixed eslint issues * chore: remove system fields as destination type when converting a field * feat: show warning when changing column type * fix: toned down edit modal * test: click on update button during warning popup * test: update selector * test: fix type change flag * fix: handle date format * chore: auto focus update button * fix: parameterize columnName and other values * chore: removed number of digits limit for hour * test: fix add-edit modal label * fix: fixed missing column reference * fix: handle missing date format * fix: handle missing date format * test: fix save routine mux * test: fix barCode & QRCode save * refactor: combined uiType filters * fix: sanitise column name * refactor: switch to some instead of find * feat: created inferTypes.ts * chore: switch to sdk types * feat: convert string to given type * feat: numeric decimal type conversion in postgres * feat: add cast for non text fields * refactor: move type casts to separate file * feat: add casts for date, date-time and time * doc: added function docs * feat: added cast for year and rating * feat: added cast for duration * fix: cast for multi-select * fix: cast for multi-select * fix: cast for year * feat: date conversion on best effort basis * fix: single line text to select * fix: user conversion * fix: date time conversion * fix: SLT to User field * fix: SLT to Long text, single select and multiselect * chore: handle True/False & TRUE/FALSE in checkbox * lint: fixed eslint issues * feat: show warning when changing column type * fix: toned down edit modal * test: click on update button during warning popup * fix: handle date format * chore: auto focus update button * fix: parameterize columnName and other values * chore: removed number of digits limit for hour * fix: handle missing date format * fix: handle missing date format * test: fix save routine mux * fix: revert removing verify * fix: sanitise column name * fix: pass context * tests: remove duplicate statement * fix: add context bypass for list method * fix: disable type conversion for Formula, BarCode, QrCode * fix: render confirm modal sing useDialog to avoid accidental closing * refactor: construct context using column while getting colOptions data --------- Co-authored-by: rohittp <tprohit9@gmail.com> Co-authored-by: Pranav C <pranavxc@gmail.com>
6 months ago
type="primary"
html-type="submit"
:loading="saving"
data-testid="nc-delete-modal-delete-btn"
@click="emit('submit')"
>
Update
<template #loading> Saving... </template>
</NcButton>
</div>
</div>
</NcModal>
Nc feat/type conversions rebased (#8680) * feat: created inferTypes.ts * chore: switch to sdk types * feat: convert string to given type * feat: convert string to rating * fix: handle the case with multiple . * feat: numeric decimal type conversion in postgres * feat: add cast for non text fields * refactor: move type casts to separate file * feat: add casts for date, date-time and time * doc: added function docs * feat: added cast for year and rating * feat: added cast for duration * fix: cast for multi-select * fix: cast for multi-select * fix: cast for year * feat: date conversion on best effort basis * fix: single line text to select * fix: any field to select * lint: simplified expressions * fix: user conversion * fix: user conversion * fix: date time conversion * test: added test cases for type casts * fix: SLT to User field * fix: SLT to Long text, single select and multiselect * chore: handle True/False & TRUE/FALSE in checkbox * lint: fixed eslint issues * chore: remove system fields as destination type when converting a field * feat: show warning when changing column type * fix: toned down edit modal * test: click on update button during warning popup * test: update selector * test: fix type change flag * fix: handle date format * chore: auto focus update button * fix: parameterize columnName and other values * chore: removed number of digits limit for hour * test: fix add-edit modal label * fix: fixed missing column reference * fix: handle missing date format * fix: handle missing date format * test: fix save routine mux * test: fix barCode & QRCode save * refactor: combined uiType filters * fix: sanitise column name * refactor: switch to some instead of find * feat: created inferTypes.ts * chore: switch to sdk types * feat: convert string to given type * feat: numeric decimal type conversion in postgres * feat: add cast for non text fields * refactor: move type casts to separate file * feat: add casts for date, date-time and time * doc: added function docs * feat: added cast for year and rating * feat: added cast for duration * fix: cast for multi-select * fix: cast for multi-select * fix: cast for year * feat: date conversion on best effort basis * fix: single line text to select * fix: user conversion * fix: date time conversion * fix: SLT to User field * fix: SLT to Long text, single select and multiselect * chore: handle True/False & TRUE/FALSE in checkbox * lint: fixed eslint issues * feat: show warning when changing column type * fix: toned down edit modal * test: click on update button during warning popup * fix: handle date format * chore: auto focus update button * fix: parameterize columnName and other values * chore: removed number of digits limit for hour * fix: handle missing date format * fix: handle missing date format * test: fix save routine mux * fix: revert removing verify * fix: sanitise column name * fix: pass context * tests: remove duplicate statement * fix: add context bypass for list method * fix: disable type conversion for Formula, BarCode, QrCode * fix: render confirm modal sing useDialog to avoid accidental closing * refactor: construct context using column while getting colOptions data --------- Co-authored-by: rohittp <tprohit9@gmail.com> Co-authored-by: Pranav C <pranavxc@gmail.com>
6 months ago
</template>