Complete Fix view work (#2272)
* Fix views * Make view sorts and view filters functional * Complete Company table view fix * Fix model creation * Start fixing board * Complete work
This commit is contained in:
@ -28,7 +28,7 @@ import { getLogoUrlFromDomainName } from '~/utils';
|
||||
import { CompanyNameEditableField } from '../../modules/companies/editable-field/components/CompanyNameEditableField';
|
||||
import { ShowPageContainer } from '../../modules/ui/layout/page/ShowPageContainer';
|
||||
|
||||
import { companyShowFieldDefinition } from './constants/companyShowFieldDefinition';
|
||||
import { companyShowFieldDefinitions } from './constants/companyShowFieldDefinitions';
|
||||
|
||||
export const CompanyShow = () => {
|
||||
const companyId = useParams().companyId ?? '';
|
||||
@ -90,7 +90,7 @@ export const CompanyShow = () => {
|
||||
avatarType="squared"
|
||||
/>
|
||||
<PropertyBox extraPadding={true}>
|
||||
{companyShowFieldDefinition.map((fieldDefinition) => {
|
||||
{companyShowFieldDefinitions.map((fieldDefinition) => {
|
||||
return (
|
||||
<FieldContext.Provider
|
||||
key={company.id + fieldDefinition.fieldId}
|
||||
|
||||
@ -1,51 +0,0 @@
|
||||
import { FilterDefinitionByEntity } from '@/ui/data/filter/types/FilterDefinitionByEntity';
|
||||
import {
|
||||
IconBuildingSkyscraper,
|
||||
IconCalendarEvent,
|
||||
IconLink,
|
||||
IconMap,
|
||||
IconUser,
|
||||
IconUsers,
|
||||
} from '@/ui/display/icon/index';
|
||||
import { FilterDropdownUserSearchSelect } from '@/users/components/FilterDropdownUserSearchSelect';
|
||||
import { Company } from '~/generated/graphql';
|
||||
|
||||
export const companyAvailableFilters: FilterDefinitionByEntity<Company>[] = [
|
||||
{
|
||||
key: 'name',
|
||||
label: 'Name',
|
||||
Icon: IconBuildingSkyscraper,
|
||||
type: 'text',
|
||||
},
|
||||
{
|
||||
key: 'employees',
|
||||
label: 'Employees',
|
||||
Icon: IconUsers,
|
||||
type: 'number',
|
||||
},
|
||||
{
|
||||
key: 'domainName',
|
||||
label: 'URL',
|
||||
Icon: IconLink,
|
||||
type: 'text',
|
||||
},
|
||||
{
|
||||
key: 'address',
|
||||
label: 'Address',
|
||||
Icon: IconMap,
|
||||
type: 'text',
|
||||
},
|
||||
{
|
||||
key: 'createdAt',
|
||||
label: 'Created at',
|
||||
Icon: IconCalendarEvent,
|
||||
type: 'date',
|
||||
},
|
||||
{
|
||||
key: 'accountOwnerId',
|
||||
label: 'Account owner',
|
||||
Icon: IconUser,
|
||||
type: 'entity',
|
||||
entitySelectComponent: <FilterDropdownUserSearchSelect />,
|
||||
},
|
||||
];
|
||||
@ -20,7 +20,7 @@ import {
|
||||
import { Entity } from '@/ui/input/relation-picker/types/EntityTypeForSelect';
|
||||
import { User } from '~/generated/graphql';
|
||||
|
||||
export const companyShowFieldDefinition: FieldDefinition<FieldMetadata>[] = [
|
||||
export const companyShowFieldDefinitions: FieldDefinition<FieldMetadata>[] = [
|
||||
{
|
||||
fieldId: 'domainName',
|
||||
label: 'Domain name',
|
||||
@ -0,0 +1,52 @@
|
||||
import { FilterDefinitionByEntity } from '@/ui/data/filter/types/FilterDefinitionByEntity';
|
||||
import {
|
||||
IconBuildingSkyscraper,
|
||||
IconCalendarEvent,
|
||||
IconLink,
|
||||
IconMap,
|
||||
IconUser,
|
||||
IconUsers,
|
||||
} from '@/ui/display/icon/index';
|
||||
import { FilterDropdownUserSearchSelect } from '@/users/components/FilterDropdownUserSearchSelect';
|
||||
import { Company } from '~/generated/graphql';
|
||||
|
||||
export const companyTableFilterDefinitions: FilterDefinitionByEntity<Company>[] =
|
||||
[
|
||||
{
|
||||
fieldId: 'name',
|
||||
label: 'Name',
|
||||
Icon: IconBuildingSkyscraper,
|
||||
type: 'text',
|
||||
},
|
||||
{
|
||||
fieldId: 'employees',
|
||||
label: 'Employees',
|
||||
Icon: IconUsers,
|
||||
type: 'number',
|
||||
},
|
||||
{
|
||||
fieldId: 'domainName',
|
||||
label: 'URL',
|
||||
Icon: IconLink,
|
||||
type: 'text',
|
||||
},
|
||||
{
|
||||
fieldId: 'address',
|
||||
label: 'Address',
|
||||
Icon: IconMap,
|
||||
type: 'text',
|
||||
},
|
||||
{
|
||||
fieldId: 'createdAt',
|
||||
label: 'Created at',
|
||||
Icon: IconCalendarEvent,
|
||||
type: 'date',
|
||||
},
|
||||
{
|
||||
fieldId: 'accountOwnerId',
|
||||
label: 'Account owner',
|
||||
Icon: IconUser,
|
||||
type: 'entity',
|
||||
entitySelectComponent: <FilterDropdownUserSearchSelect />,
|
||||
},
|
||||
];
|
||||
@ -7,29 +7,29 @@ import {
|
||||
IconUsers,
|
||||
} from '@/ui/display/icon/index';
|
||||
|
||||
export const companyAvailableSorts: SortDefinition[] = [
|
||||
export const companyTableSortDefinitions: SortDefinition[] = [
|
||||
{
|
||||
key: 'name',
|
||||
fieldId: 'name',
|
||||
label: 'Name',
|
||||
Icon: IconBuildingSkyscraper,
|
||||
},
|
||||
{
|
||||
key: 'employees',
|
||||
fieldId: 'employees',
|
||||
label: 'Employees',
|
||||
Icon: IconUsers,
|
||||
},
|
||||
{
|
||||
key: 'domainName',
|
||||
fieldId: 'domainName',
|
||||
label: 'Url',
|
||||
Icon: IconLink,
|
||||
},
|
||||
{
|
||||
key: 'address',
|
||||
fieldId: 'address',
|
||||
label: 'Address',
|
||||
Icon: IconMap,
|
||||
},
|
||||
{
|
||||
key: 'createdAt',
|
||||
fieldId: 'createdAt',
|
||||
label: 'Creation',
|
||||
Icon: IconCalendarEvent,
|
||||
},
|
||||
Reference in New Issue
Block a user