feat: refactoring casl permission checks for recursive nested operations (#778)

* feat: nested casl abilities

* fix: remove unused packages

* Fixes

* Fix createMany broken

* Fix lint

* Fix lint

* Fix lint

* Fix lint

* Fixes

* Fix CommentThread

* Fix bugs

* Fix lint

* Fix bugs

* Fixed auto routing

* Fixed app path

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
This commit is contained in:
Jérémy M
2023-07-26 01:37:22 +02:00
committed by GitHub
parent 92b9e987a5
commit 51cfc0d82c
69 changed files with 1192 additions and 883 deletions

View File

@ -48,9 +48,9 @@ export function EditableCellDoubleTextEditMode({
setSecondInternalValue(secondValue);
}, [firstValue, secondValue]);
function handleOnChange(firstValue: string, secondValue: string): void {
setFirstInternalValue(firstValue);
setSecondInternalValue(secondValue);
function handleOnChange(newFirstValue: string, newSecondValue: string): void {
setFirstInternalValue(newFirstValue);
setSecondInternalValue(newSecondValue);
}
const [focusPosition, setFocusPosition] = useState<'left' | 'right'>('left');
@ -142,18 +142,18 @@ export function EditableCellDoubleTextEditMode({
autoFocus
placeholder={firstValuePlaceholder}
ref={firstValueInputRef}
value={firstValue}
value={firstInternalValue}
onChange={(event: ChangeEvent<HTMLInputElement>) => {
handleOnChange(event.target.value, secondValue);
handleOnChange(event.target.value, secondInternalValue);
}}
/>
<StyledInput
autoComplete="off"
placeholder={secondValuePlaceholder}
ref={secondValueInputRef}
value={secondValue}
value={secondInternalValue}
onChange={(event: ChangeEvent<HTMLInputElement>) => {
handleOnChange(firstValue, event.target.value);
handleOnChange(firstInternalValue, event.target.value);
}}
/>
</StyledContainer>

View File

@ -14,7 +14,6 @@ export function EditableCellPhone({ value, placeholder, onSubmit }: OwnProps) {
<EditableCell
editModeContent={
<InplaceInputTextEditMode
autoComplete="off"
autoFocus
placeholder={placeholder || ''}
value={value}

View File

@ -32,7 +32,6 @@ export function EditableCellText({
autoFocus
value={value}
onSubmit={(newText) => onSubmit?.(newText)}
autoComplete="off"
/>
}
nonEditModeContent={

View File

@ -27,7 +27,6 @@ export function EditableCellURL({
editModeContent={
<InplaceInputTextEditMode
placeholder={placeholder}
autoComplete="off"
autoFocus
value={url}
onSubmit={(newURL) => onSubmit?.(newURL)}

View File

@ -56,7 +56,6 @@ export function EditableCellChip({
placeholder={placeholder || ''}
autoFocus
value={inputValue}
autoComplete="off"
onSubmit={(newValue) => onSubmit?.(newValue)}
/>
}