Skip to content

feat(our-work): add our work page with table, filters and query#3

Open
AmritBhusal wants to merge 3 commits into
developfrom
feature/our-work
Open

feat(our-work): add our work page with table, filters and query#3
AmritBhusal wants to merge 3 commits into
developfrom
feature/our-work

Conversation

@AmritBhusal

@AmritBhusal AmritBhusal commented Jun 12, 2026

Copy link
Copy Markdown

Changes

  • add our works tables and table actions
  • add table filters and search
  • add new route

This PR doesn't introduce any

  • temporary files, auto-generated files or secret keys
  • build works
  • eslint issues
  • typescript issues
  • codegen errors
  • console.log meant for debugging
  • typos
  • unwanted comments
  • conflict markers

@AmritBhusal AmritBhusal requested review from crsstha, shreeyash07 and subinasr and removed request for shreeyash07 and subinasr June 12, 2026 09:02
Comment thread app/Root/config/routes.ts Outdated
index: true,
path: '/our-works',
load: () => import('#views/OurWorks'),
path: '/OurWorks',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need to make change in path revert it back and revert to its children paths

Comment thread app/views/OurWorks/WorksForm/index.tsx Outdated
type FormSchema = ObjectSchema<PartialFormType>;
type FormSchemaFields = ReturnType<FormSchema['fields']>;

const getWorksSchema = (): FormSchema => ({

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need to make this schema a function like in user page.

Comment thread app/views/OurWorks/WorksForm/index.tsx Outdated
const navigate = useRouting();
const alert = useAlert();

const worksSchema = useMemo(() => getWorksSchema(), []);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to this here, you can send workSchema directly to useForm

Comment thread app/views/OurWorks/WorksForm/index.tsx Outdated
showOnHome: false,
};

const pageKeySelector = (item: { key: string }) => item.key as DashboardPage;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you existing keySelector

Comment thread app/views/OurWorks/WorksList/index.tsx Outdated
Comment on lines +34 to +49
function StatusCell({ isActive }: { isActive: boolean }) {
return (
<ListView
layout="inline"
spacing="sm"
>
<span
className={isActive
? 'status-indicator-active'
: 'status-indicator-inactive'}
/>
<span>{isActive ? 'Active' : 'Inactive'}</span>
</ListView>
);
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets create this a separate component and reuse this in users page also

Comment thread app/views/OurWorks/WorksList/index.tsx Outdated
offset,
},
filters: {
isActive: filter.isActive !== undefined ? filter.isActive === 'true' : undefined,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use isNotDefined here

Comment thread app/views/OurWorks/WorksList/index.tsx Outdated
});
const [, deleteExternalDashboard] = useDeleteExternalDashboardMutation();

const pageSize = limit;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

useFilterState gives you page size please look, if not you can assigned above no need to make new const variables

@AmritBhusal AmritBhusal requested a review from shreeyash07 June 15, 2026 08:26
Comment on lines +35 to +45
export interface WorksFilterType {
isActive: string | undefined;
page: string | undefined;
search: string | undefined;
}

const defaultFilter: WorksFilterType = {
isActive: undefined,
page: undefined,
search: undefined,
};

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets use filter type from generated types

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants