-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Conversation
Signed-off-by: budaeva <[email protected]>
Signed-off-by: budaeva <[email protected]>
models/contact/src/index.ts
Outdated
@@ -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 |
There was a problem hiding this comment.
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', |
There was a problem hiding this comment.
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() |
There was a problem hiding this comment.
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()) |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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' |
There was a problem hiding this comment.
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 () { |
There was a problem hiding this comment.
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]>
Signed-off-by: budaeva <[email protected]>
Signed-off-by: budaeva <[email protected]>
Signed-off-by: budaeva <[email protected]>
Signed-off-by: budaeva <[email protected]>
Signed-off-by: budaeva <[email protected]>
Signed-off-by: budaeva [email protected]
closes #1608