Skip to content

Commit

Permalink
stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
olemp committed Dec 12, 2024
1 parent c28b54e commit 333eedf
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion client/components/EventList/DurationDisplay/types.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ import { EventObject, TimeEntry } from 'types'
export interface IDurationDisplayProps extends HTMLProps<HTMLDivElement> {
displayFormat?: string
event: TimeEntry | EventObject
}
}
5 changes: 4 additions & 1 deletion client/components/ProjectTag/ProjectTag.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,16 @@ import { useProjectTag } from './useProjectTag'
import ReactMarkdown from 'react-markdown'

/**
* A tag for a project. The tag can be copied to the clipboard and favorited.
*
* @category Reusable Component
*/
export const ProjectTag: ReusableComponent<IProjectTagProps> = (props) => {
const { t } = useTranslation()
const { hasOutlookCategory, addOutlookCategory, onTagCopied, colorPresets } =
useProjectTag(props)
return (
<InteractionTag className={ProjectTag.className}>
<InteractionTag className={ProjectTag.className} size={props.size}>
<CopyToClipboard text={props.project?.tag} onCopy={onTagCopied}>
<InteractionTagPrimary
hasSecondaryAction={props.enableFavoriting}
Expand Down Expand Up @@ -82,6 +84,7 @@ export const ProjectTag: ReusableComponent<IProjectTagProps> = (props) => {
ProjectTag.displayName = 'ProjectLink'
ProjectTag.className = styles.projectTag
ProjectTag.defaultProps = {
size: 'medium',
outlookCategoriesHref:
'https://outlook.office.com/mail/options/general/categories'
}
3 changes: 2 additions & 1 deletion client/components/ProjectTag/types.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { InteractionTagProps } from '@fluentui/react-tags-preview'
import { HTMLProps } from 'react'
import { Project } from 'types'

/**
* Props for the ProjectLink component.
*/
export interface IProjectTagProps extends HTMLProps<HTMLDivElement> {
export interface IProjectTagProps extends Omit<HTMLProps<HTMLDivElement>, 'size'>, Pick<InteractionTagProps, 'size'> {
/**
* The project to link to.
*/
Expand Down
4 changes: 4 additions & 0 deletions client/graphql-client/fragments/timeentry-fragment.gql
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,8 @@ fragment TimeEntryFragment on TimeEntry {
resource {
id
}
role {
name
hourlyRate
}
}
5 changes: 4 additions & 1 deletion server/graphql/resolvers/reports/types.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable max-classes-per-file */
import 'reflect-metadata'
import { Field, Float, ID, InputType, ObjectType } from 'type-graphql'
import { Customer, Project, User } from '../types'
import { Customer, Project, ProjectRole, User } from '../types'

/**
* @category GraphQL ObjectType
Expand Down Expand Up @@ -61,6 +61,9 @@ export class TimeEntry {

@Field(() => User)
resource: User

@Field(() => ProjectRole)
role: ProjectRole
}

/**
Expand Down

0 comments on commit 333eedf

Please sign in to comment.