Skip to content

Commit f95b8f3

Browse files
authored
Dev (#288)
* dont make updated at private for users * fixme workaround to clear filters on filterMode change * generate entity filters map * use nano for cursors * notes * css * attempt at custom filter - debounce not working * css * css * notes * fix debounce and show dynamic custom options * gen * react hooks lint * proper body background and broken filter select * fix select - must be basic data * entityfilters sort * update * combobox style update - date filter render update * badge group rendering update * ignore hook linter for debounced values * update * css and elements for proper date ranges and badges * hide filter label * state update * semantic layout for actions proper sizes
1 parent 7ba9b36 commit f95b8f3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1320
-231
lines changed

bin/project

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1056,6 +1056,8 @@ x.gen() {
10561056

10571057
wait_without_error || err Failed jobs
10581058

1059+
x.test.xo
1060+
10591061
{
10601062
x.gen.pregen
10611063
x.gen.client-server

db/migrations/0000002_init.up.sql

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,6 @@ comment on column users.role_rank is '"properties":private';
122122

123123
comment on column users.scopes is '"type":models.Scopes';
124124

125-
comment on column users.updated_at is '"properties":private';
126-
127125
alter table user_api_keys
128126
add column user_id uuid not null unique;
129127

e2e/client/gen/model/dbUser.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export interface DbUser {
1818
hasPersonalNotifications: boolean
1919
lastName?: string | null
2020
scopes: Scopes
21+
updatedAt: Date
2122
userID: DbUserID
2223
username: string
2324
}

e2e/client/gen/model/user.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export interface User {
2626
role: Role
2727
scopes: Scopes
2828
teams?: DbTeam[] | null
29+
updatedAt: Date
2930
userID: DbUserID
3031
username: string
3132
}

entityFilters.gen.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -459,6 +459,11 @@
459459
"db": "last_name",
460460
"nullable": true
461461
},
462+
"updatedAt": {
463+
"type": "date-time",
464+
"db": "updated_at",
465+
"nullable": false
466+
},
462467
"username": {
463468
"type": "string",
464469
"db": "username",

frontend/.eslintrc.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
"extends": [
88
"plugin:react/recommended",
99
"plugin:@typescript-eslint/recommended",
10-
"plugin:prettier/recommended",
11-
"plugin:react-hooks/recommended"
10+
"plugin:prettier/recommended"
1211
],
1312
"parser": "@typescript-eslint/parser",
1413
"parserOptions": {
@@ -23,9 +22,12 @@
2322
"react",
2423
"@typescript-eslint",
2524
"jest-dom",
25+
"react-hooks",
2626
"react-refresh"
2727
],
2828
"rules": {
29+
"react-hooks/rules-of-hooks": "error",
30+
"react-hooks/exhaustive-deps": "warn",
2931
"prettier/prettier": "error",
3032
"react/no-unknown-property": [
3133
"error",
@@ -51,7 +53,6 @@
5153
"prefer-template": "error",
5254
"react/jsx-uses-react": "off",
5355
"react/react-in-jsx-scope": "off",
54-
"react-hooks/exhaustive-deps": "off",
5556
"react/prop-types": "off"
5657
},
5758
"ignorePatterns": [

frontend/TODO.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Remove client-validator. Will use rhf and ajv for everything

frontend/src/App.tsx

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ import { AppTourProvider } from 'src/tours/AppTourProvider'
2626
import DemoGeneratedForm from 'src/views/DemoGeneratedForm/DemoGeneratedForm'
2727
import DemoMantineReactTable from 'src/views/DemoMantineReactTable/DemoMantineReactTable'
2828

29+
import 'src/utils/dayjs'
30+
2931
function ErrorFallback({ error }: any) {
3032
return (
3133
<div role="alert">
@@ -35,12 +37,6 @@ function ErrorFallback({ error }: any) {
3537
)
3638
}
3739

38-
import utc from 'dayjs/plugin/utc'
39-
import relativeTime from 'dayjs/plugin/relativeTime'
40-
import dayjs from 'dayjs'
41-
dayjs.extend(utc)
42-
dayjs.extend(relativeTime)
43-
4440
const Layout = React.lazy(() => import('./components/Layout/Layout'))
4541
const LandingPage = React.lazy(() => import('./views/LandingPage/LandingPage'))
4642
const UserPermissionsPage = React.lazy(() => import('src/views/Settings/UserPermissionsPage/UserPermissionsPage'))
@@ -72,10 +68,6 @@ const routes = Object.freeze({
7268
})
7369

7470
export default function App() {
75-
useEffect(() => {
76-
document.body.style.background = 'none !important' // body was preventing flashes
77-
}, [])
78-
7971
const { verifyNotificationPermission } = useNotificationAPI()
8072
const [notificationWarningSent, setNotificationWarningSent] = useState(false)
8173

0 commit comments

Comments
 (0)