Skip to content

Commit

Permalink
fixed cfp link and added stats for admin
Browse files Browse the repository at this point in the history
  • Loading branch information
noam-honig committed Jul 12, 2023
1 parent 9cd41c5 commit 695598f
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 13 deletions.
22 changes: 10 additions & 12 deletions src/components/cfp-small.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,13 @@ export default function CfpSmall({
}}
>
<div

style={{
font: 'var(--vvd-typography-base-extended-bold)',
display: 'flex',
justifyContent: 'space-between',
}}
>
<span onClick={select}>

{cfp.conferenceName}{' '}
</span>
<span onClick={select}>{cfp.conferenceName} </span>
<div>
<a href={cfp.link} target="_blank">
<vwc-icon name="open-line" connotation="accent"></vwc-icon>
Expand All @@ -68,13 +64,15 @@ export default function CfpSmall({
}}
>
CFP: {formatDate(cfp.cfpDate)}
<vwc-icon
name="open-line"
connotation="accent"
style={{
paddingLeft: '8px',
}}
></vwc-icon>
<a href={cfp.cfpLink}>
<vwc-icon
name="open-line"
connotation="accent"
style={{
paddingLeft: '8px',
}}
></vwc-icon>
</a>
</div>
</div>
</div>
Expand Down
4 changes: 4 additions & 0 deletions src/components/users.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ export function Users() {
<vwc-data-grid-cell cell-type="columnheader" role="columnheader">
Username
</vwc-data-grid-cell>
<vwc-data-grid-cell cell-type="columnheader" role="columnheader">
selection
</vwc-data-grid-cell>
<vwc-data-grid-cell cell-type="columnheader" role="columnheader">
admin
</vwc-data-grid-cell>
Expand All @@ -31,6 +34,7 @@ export function Users() {
return (
<vwc-data-grid-row key={user.id}>
<vwc-data-grid-cell>{user.name}</vwc-data-grid-cell>
<vwc-data-grid-cell>{user.interactions}</vwc-data-grid-cell>
<vwc-data-grid-cell
onClick={() => userRepo.save({ ...user, admin: !user.admin })}
>
Expand Down
10 changes: 9 additions & 1 deletion src/shared/user.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { Entity, Fields } from 'remult'
import { Entity, Fields, remult } from 'remult'
import { Roles } from './roles'
import { CFP } from './cfp'

Check failure on line 3 in src/shared/user.ts

View workflow job for this annotation

GitHub Actions / build

'CFP' is declared but its value is never read.
import { UserSelection } from './UserSelection'

@Entity('users', {
allowApiCrud: Roles.admin,
Expand All @@ -19,4 +21,10 @@ export class User {

@Fields.createdAt()
createdAt = new Date()

@Fields.integer<User>({
serverExpression: async (self) =>
remult.repo(UserSelection).count({ userId: self.id }),
})
interactions = 0
}

0 comments on commit 695598f

Please sign in to comment.