Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chunter: user status (#1608) #1692

Merged
merged 8 commits into from
May 12, 2022
Merged

Chunter: user status (#1608) #1692

merged 8 commits into from
May 12, 2022

Conversation

budaeva
Copy link
Contributor

@budaeva budaeva commented May 6, 2022

Signed-off-by: budaeva [email protected]

closes #1608

budaeva added 2 commits May 6, 2022 21:08
@budaeva budaeva requested a review from BykhovDenis May 6, 2022 14:20
@@ -38,6 +39,7 @@ import contact from './plugin'

export const DOMAIN_CONTACT = 'contact' as Domain
export const DOMAIN_CHANNEL = 'channel' as Domain
export const DOMAIN_STATUS = 'status' as Domain
Copy link
Member

Choose a reason for hiding this comment

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

We really need new domain for it?

client.createDoc(contact.class.Status, space, {
attachedTo: employeeId,
attachedToClass: contact.class.Employee,
collection: 'statuses',
Copy link
Member

Choose a reason for hiding this comment

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

Please add this collection to employee interface


$: today = new Date(Date.now())
$: dueDateMs = statusDueDate
$: isOverdue = dueDateMs !== undefined && dueDateMs !== null && dueDateMs < today.getTime()
Copy link
Member

Choose a reason for hiding this comment

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

Why dueDateMs can be null?


export let statusDueDate: Timestamp | undefined

$: today = new Date(Date.now())
Copy link
Member

Choose a reason for hiding this comment

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

Why we need this? Please look packages/ui/Timesince for example

@@ -29,3 +29,14 @@ export async function getChannelProviders (): Promise<Map<Ref<ChannelProvider>,
}
return map
}

export function formatDate (dueDateMs: Timestamp | undefined): string {
Copy link
Member

Choose a reason for hiding this comment

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

It should only format timestamp, undefined should be handled before call


export function formatDate (dueDateMs: Timestamp | undefined): string {
return dueDateMs === undefined || dueDateMs === null
? 'no exp'
Copy link
Member

Choose a reason for hiding this comment

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

It should be IntlString I think

checkOverdue()
})

async function checkOverdue () {
Copy link
Member

Choose a reason for hiding this comment

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

Worker should be doing it

Signed-off-by: budaeva <[email protected]>
@BykhovDenis BykhovDenis merged commit d0cba23 into main May 12, 2022
@BykhovDenis BykhovDenis deleted the user-status-1608 branch May 12, 2022 07:05
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.

Chunter: User status
2 participants