feat(admin): add ability to edit overview section - #1334
Conversation
d5d238c to
639338d
Compare
marcellmueller
left a comment
There was a problem hiding this comment.
Nice work, this is great 🥇
Out of scope for this but I was thinking about the feature flag and think in the future we could improve it via a cookie set by query param or sso role.
I feel like the query param worked well on the public search page - when we search and go to a rec resource page and then hit back it's still there. Though if we set this on an overview page then go back to search and go to another resource we have to manually toggle it. It's a bit cumbersome long term imo as we will all be testing it a lot.
| type: [RecreationAccessCodeDto], | ||
| }) | ||
| recreation_access: RecreationAccessDto[]; | ||
| accessCodes: RecreationAccessCodeDto[]; |
There was a problem hiding this comment.
nit: same as other one, the rest of the dto is snake case
| description: 'List of sub-access codes associated with this access code', | ||
| type: [RecreationSubAccessCodeDto], | ||
| }) | ||
| subAccessCodes: RecreationSubAccessCodeDto[]; |
There was a problem hiding this comment.
nit: the rest of the dto is snake case
| @ValidateNested({ each: true }) | ||
| @Type(() => UpdateRecreationAccessCodeDto) | ||
| @IsOptional() | ||
| accessCodes?: UpdateRecreationAccessCodeDto[]; |
There was a problem hiding this comment.
nit: the rest of the dto is snake case
| @IsArray() | ||
| @IsString({ each: true }) | ||
| @IsOptional() | ||
| subAccessCodes?: string[]; |
There was a problem hiding this comment.
nit: well the rest of the dto is NOT snake case but should probably follow the same style 😆
There was a problem hiding this comment.
i noticed searchTerm in susggestions api has camel case as well.. ill do a follow up pr
| export class OptionsController { | ||
| constructor(private readonly optionsService: OptionsService) {} | ||
|
|
||
| @Get(':type') |
| export const useResourceOptions = () => { | ||
| const regionOptions = useGetRecreationResourceOptions( | ||
| GetOptionsByTypeTypeEnum.Regions, | ||
| ); | ||
| const maintenanceOptions = useGetRecreationResourceOptions( | ||
| GetOptionsByTypeTypeEnum.Maintenance, | ||
| ); | ||
| const controlAccessCodeTypeOptions = useGetRecreationResourceOptions( | ||
| GetOptionsByTypeTypeEnum.ControlAccessCode, | ||
| { | ||
| // Add "None" option to unset control access code | ||
| select: (data) => [{ id: null, label: 'None' }, ...data], | ||
| }, | ||
| ); | ||
| const accessOptions = useGetRecreationResourceOptions( | ||
| GetOptionsByTypeTypeEnum.Access, | ||
| ); | ||
| const recreationStatusOptions = useGetRecreationResourceOptions( | ||
| GetOptionsByTypeTypeEnum.RecreationStatus, | ||
| ); |
There was a problem hiding this comment.
This is a lot of api calls. Do you think we should modify the service to fetch multiple types in the future?
There was a problem hiding this comment.
yea good idea - something that takes a list of type enums and returns
Description
?enable_full_features=true).Steps to enable feature flag
For Chrome Users
Step 1: Show Your Bookmarks Bar
Ctrl+Shift+B(Windows/Linux) orCmd+Shift+B(Mac)Step 2: Add the Bookmark
Toggle Full Features(or any name you prefer)Code to paste:
Step 3: click on the bookmark to toggle bookmark