Skip to content

Commit 1b7aebc

Browse files
authored
Merge pull request #129 from edsonmartins/develop
fix: ajustar resource
2 parents fb6623f + 11e4920 commit 1b7aebc

File tree

2 files changed

+16
-5
lines changed

2 files changed

+16
-5
lines changed

src/components/editors/ArchbaseAsyncSelect.tsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -467,11 +467,14 @@ export function ArchbaseAsyncSelect<T, ID, O>({
467467
<ComboboxDropdown>
468468
<Combobox.Options>
469469
<CustomSelectScrollArea mah={280}>
470-
{filteredOptions.slice(0, limit ? limit : filteredOptions.length).map((option) => (
471-
<Combobox.Option value={option.value} key={option.key}>
472-
{ItemComponent ? <ItemComponent {...option} /> : option.label}
473-
</Combobox.Option>
474-
))}
470+
{filteredOptions.slice(0, limit ? limit : filteredOptions.length).map((option) => {
471+
const {key, ...rest} = option
472+
return (
473+
<Combobox.Option value={option.value} key={option.key}>
474+
{ItemComponent ? <ItemComponent {...rest} /> : option.label}
475+
</Combobox.Option>
476+
)
477+
})}
475478
</CustomSelectScrollArea>
476479
</Combobox.Options>
477480
</ComboboxDropdown>

src/components/security/SecurityDomain.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ import { v4 as uuidv4 } from 'uuid'
22
import { SecurityType } from './SecurityType';
33
import { IsBoolean, IsEmail, IsNotEmpty, IsOptional } from '@components/validator';
44

5+
export enum TipoRecurso {
6+
VIEW = 'VIEW',
7+
API = 'API'
8+
}
9+
510
export class AccessScheduleDto {
611
id: string;
712
code: string;
@@ -271,6 +276,8 @@ export class ResourceDto {
271276
@IsBoolean()
272277
active: boolean
273278

279+
type: TipoRecurso
280+
274281
isNewResource: boolean
275282

276283
constructor(data: any) {
@@ -285,6 +292,7 @@ export class ResourceDto {
285292
this.description = data.description || ''
286293
this.actions = data.actions || []
287294
this.active = data.active || false
295+
this.type = data.type || TipoRecurso.VIEW
288296
this.isNewResource = data.isNewResource || false
289297
}
290298

0 commit comments

Comments
 (0)