update schedule creation ui and run lint

This commit is contained in:
waleed
2026-03-09 02:18:43 -07:00
parent 4c562c8e04
commit 76981c356f
2 changed files with 23 additions and 15 deletions

View File

@@ -516,7 +516,7 @@ export function ScheduleModal({ open, onOpenChange, workspaceId, schedule }: Sch
{/* Schedule Preview */}
{computedCron && schedulePreview && (
<div className='rounded-[8px] border border-[var(--border-1)] bg-[var(--surface-2)] px-[12px] py-[10px]'>
<div>
{'error' in schedulePreview ? (
<p className='text-[13px] text-[var(--text-error)]'>{schedulePreview.error}</p>
) : (

View File

@@ -598,7 +598,10 @@ export function Table() {
setRenamingColumn(null)
return
}
updateColumnMutation.mutate({ columnName: renamingColumn, updates: { name: renameValue.trim() } })
updateColumnMutation.mutate({
columnName: renamingColumn,
updates: { name: renameValue.trim() },
})
setRenamingColumn(null)
}, [renamingColumn, renameValue])
@@ -606,17 +609,23 @@ export function Table() {
updateColumnMutation.mutate({ columnName, updates: { type: newType } })
}, [])
const handleInsertColumnLeft = useCallback((columnName: string) => {
const index = columnsRef.current.findIndex((c) => c.name === columnName)
if (index === -1) return
addColumnMutation.mutate({ name: generateColumnName(), type: 'string', position: index })
}, [generateColumnName])
const handleInsertColumnLeft = useCallback(
(columnName: string) => {
const index = columnsRef.current.findIndex((c) => c.name === columnName)
if (index === -1) return
addColumnMutation.mutate({ name: generateColumnName(), type: 'string', position: index })
},
[generateColumnName]
)
const handleInsertColumnRight = useCallback((columnName: string) => {
const index = columnsRef.current.findIndex((c) => c.name === columnName)
if (index === -1) return
addColumnMutation.mutate({ name: generateColumnName(), type: 'string', position: index + 1 })
}, [generateColumnName])
const handleInsertColumnRight = useCallback(
(columnName: string) => {
const index = columnsRef.current.findIndex((c) => c.name === columnName)
if (index === -1) return
addColumnMutation.mutate({ name: generateColumnName(), type: 'string', position: index + 1 })
},
[generateColumnName]
)
const handleToggleUnique = useCallback((columnName: string) => {
const column = columnsRef.current.find((c) => c.name === columnName)
@@ -683,7 +692,6 @@ export function Table() {
[columnOptions, activeSortState, handleSortChange, handleSortClear]
)
if (!isLoadingTable && !tableData) {
return (
<div className='flex h-full items-center justify-center'>
@@ -970,8 +978,8 @@ export function Table() {
<ModalBody>
<p className='text-[13px] text-[var(--text-secondary)]'>
Are you sure you want to delete{' '}
<span className='font-medium text-[var(--text-primary)]'>{deletingColumn}</span>?
This will remove all data in this column.{' '}
<span className='font-medium text-[var(--text-primary)]'>{deletingColumn}</span>? This
will remove all data in this column.{' '}
<span className='text-[var(--text-error)]'>This action cannot be undone.</span>
</p>
</ModalBody>