Add linkedinUrl and job titles to table views (#809)
* Add linedinUrl and job titles to table views * Keep address in the end * Add mock data
This commit is contained in:
@ -6,6 +6,8 @@ import { peopleCityFamilyState } from '../states/peopleCityFamilyState';
|
||||
import { peopleCompanyFamilyState } from '../states/peopleCompanyFamilyState';
|
||||
import { peopleCreatedAtFamilyState } from '../states/peopleCreatedAtFamilyState';
|
||||
import { peopleEmailFamilyState } from '../states/peopleEmailFamilyState';
|
||||
import { peopleJobTitleFamilyState } from '../states/peopleJobTitleFamilyState';
|
||||
import { peopleLinkedinUrlFamilyState } from '../states/peopleLinkedinUrlFamilyState';
|
||||
import { peopleNameCellFamilyState } from '../states/peopleNamesFamilyState';
|
||||
import { peoplePhoneFamilyState } from '../states/peoplePhoneFamilyState';
|
||||
|
||||
@ -56,6 +58,25 @@ export function useSetPeopleEntityTable() {
|
||||
set(peopleCreatedAtFamilyState(person.id), person.createdAt);
|
||||
}
|
||||
|
||||
const currentJobTitle = snapshot
|
||||
.getLoadable(peopleJobTitleFamilyState(person.id))
|
||||
.valueOrThrow();
|
||||
|
||||
if (currentJobTitle !== person.jobTitle) {
|
||||
set(peopleJobTitleFamilyState(person.id), person.jobTitle ?? null);
|
||||
}
|
||||
|
||||
const currentLinkedinUrl = snapshot
|
||||
.getLoadable(peopleLinkedinUrlFamilyState(person.id))
|
||||
.valueOrThrow();
|
||||
|
||||
if (currentLinkedinUrl !== person.linkedinUrl) {
|
||||
set(
|
||||
peopleLinkedinUrlFamilyState(person.id),
|
||||
person.linkedinUrl ?? null,
|
||||
);
|
||||
}
|
||||
|
||||
const currentNameCell = snapshot
|
||||
.getLoadable(peopleNameCellFamilyState(person.id))
|
||||
.valueOrThrow();
|
||||
|
||||
Reference in New Issue
Block a user