Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
378696739d | ||
|
|
57f585416a | ||
|
|
b3cdab579b |
No files matched your search
@@ -613,7 +613,7 @@ export const boardRouter = createTRPCRouter({
|
|||||||
boardId: board.id,
|
boardId: board.id,
|
||||||
});
|
});
|
||||||
|
|
||||||
const sortedLayouts = board.layouts.sort((layoutA, layoutB) => layoutA.columnCount - layoutB.columnCount);
|
const sortedLayouts = board.layouts.toSorted((layoutA, layoutB) => layoutA.columnCount - layoutB.columnCount);
|
||||||
// Fallback to biggest if none exists with columnCount bigger than addedLayout.columnCount
|
// Fallback to biggest if none exists with columnCount bigger than addedLayout.columnCount
|
||||||
const layoutToClone =
|
const layoutToClone =
|
||||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||||
@@ -1215,7 +1215,7 @@ export const boardRouter = createTRPCRouter({
|
|||||||
});
|
});
|
||||||
|
|
||||||
return {
|
return {
|
||||||
inherited: dbGroupPermissions.sort((permissionA, permissionB) => {
|
inherited: dbGroupPermissions.toSorted((permissionA, permissionB) => {
|
||||||
return permissionA.group.name.localeCompare(permissionB.group.name);
|
return permissionA.group.name.localeCompare(permissionB.group.name);
|
||||||
}),
|
}),
|
||||||
users: userPermissions
|
users: userPermissions
|
||||||
@@ -1223,7 +1223,7 @@ export const boardRouter = createTRPCRouter({
|
|||||||
user,
|
user,
|
||||||
permission,
|
permission,
|
||||||
}))
|
}))
|
||||||
.sort((permissionA, permissionB) => {
|
.toSorted((permissionA, permissionB) => {
|
||||||
return (permissionA.user.name ?? "").localeCompare(permissionB.user.name ?? "");
|
return (permissionA.user.name ?? "").localeCompare(permissionB.user.name ?? "");
|
||||||
}),
|
}),
|
||||||
groups: dbGroupBoardPermission
|
groups: dbGroupBoardPermission
|
||||||
@@ -1234,7 +1234,7 @@ export const boardRouter = createTRPCRouter({
|
|||||||
},
|
},
|
||||||
permission,
|
permission,
|
||||||
}))
|
}))
|
||||||
.sort((permissionA, permissionB) => {
|
.toSorted((permissionA, permissionB) => {
|
||||||
return permissionA.group.name.localeCompare(permissionB.group.name);
|
return permissionA.group.name.localeCompare(permissionB.group.name);
|
||||||
}),
|
}),
|
||||||
};
|
};
|
||||||
@@ -1586,7 +1586,7 @@ const getFullBoardWithWhereAsync = async (db: Database, where: SQL<unknown>, use
|
|||||||
...otherBoardProperties,
|
...otherBoardProperties,
|
||||||
layouts: layouts
|
layouts: layouts
|
||||||
.map(({ boardId: _, ...layout }) => layout)
|
.map(({ boardId: _, ...layout }) => layout)
|
||||||
.sort((layoutA, layoutB) => layoutA.breakpoint - layoutB.breakpoint),
|
.toSorted((layoutA, layoutB) => layoutA.breakpoint - layoutB.breakpoint),
|
||||||
sections: sections.map(({ collapseStates, ...section }) =>
|
sections: sections.map(({ collapseStates, ...section }) =>
|
||||||
parseSection({
|
parseSection({
|
||||||
...section,
|
...section,
|
||||||
@@ -1604,22 +1604,24 @@ const getFullBoardWithWhereAsync = async (db: Database, where: SQL<unknown>, use
|
|||||||
collapsed: collapseStates.at(0)?.collapsed ?? false,
|
collapsed: collapseStates.at(0)?.collapsed ?? false,
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
items: items.map(({ integrations: itemIntegrations, ...item }) =>
|
items: items
|
||||||
parseItem({
|
.map(({ integrations: itemIntegrations, ...item }) =>
|
||||||
...item,
|
parseItem({
|
||||||
layouts: item.layouts.map((layout) => ({
|
...item,
|
||||||
xOffset: layout.xOffset,
|
layouts: item.layouts.map((layout) => ({
|
||||||
yOffset: layout.yOffset,
|
xOffset: layout.xOffset,
|
||||||
width: layout.width,
|
yOffset: layout.yOffset,
|
||||||
height: layout.height,
|
width: layout.width,
|
||||||
layoutId: layout.layoutId,
|
height: layout.height,
|
||||||
sectionId: layout.sectionId,
|
layoutId: layout.layoutId,
|
||||||
})),
|
sectionId: layout.sectionId,
|
||||||
integrationIds: itemIntegrations.map((item) => item.integration.id),
|
})),
|
||||||
advancedOptions: superjson.parse<BoardItemAdvancedOptions>(item.advancedOptions),
|
integrationIds: itemIntegrations.map((item) => item.integration.id),
|
||||||
options: superjson.parse<Record<string, unknown>>(item.options),
|
advancedOptions: superjson.parse<BoardItemAdvancedOptions>(item.advancedOptions),
|
||||||
}),
|
options: superjson.parse<Record<string, unknown>>(item.options),
|
||||||
),
|
}),
|
||||||
|
)
|
||||||
|
.filter((item) => item !== null),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1635,7 +1637,7 @@ const parseItem = (item: unknown) => {
|
|||||||
const result = outputItemSchema.safeParse(item);
|
const result = outputItemSchema.safeParse(item);
|
||||||
|
|
||||||
if (!result.success) {
|
if (!result.success) {
|
||||||
throw new Error(result.error.message);
|
return null;
|
||||||
}
|
}
|
||||||
return result.data;
|
return result.data;
|
||||||
};
|
};
|
||||||
|
|||||||
Generated
+10
-10
@@ -373,8 +373,8 @@ catalogs:
|
|||||||
specifier: 5.11.0
|
specifier: 5.11.0
|
||||||
version: 5.11.0
|
version: 5.11.0
|
||||||
isomorphic-dompurify:
|
isomorphic-dompurify:
|
||||||
specifier: ^3.15.0
|
specifier: ^3.16.0
|
||||||
version: 3.15.0
|
version: 3.16.0
|
||||||
jotai:
|
jotai:
|
||||||
specifier: ^2.20.0
|
specifier: ^2.20.0
|
||||||
version: 2.20.0
|
version: 2.20.0
|
||||||
@@ -819,7 +819,7 @@ importers:
|
|||||||
version: 13.0.6
|
version: 13.0.6
|
||||||
isomorphic-dompurify:
|
isomorphic-dompurify:
|
||||||
specifier: 'catalog:'
|
specifier: 'catalog:'
|
||||||
version: 3.15.0(@noble/hashes@2.0.1)
|
version: 3.16.0(@noble/hashes@2.0.1)
|
||||||
jotai:
|
jotai:
|
||||||
specifier: 'catalog:'
|
specifier: 'catalog:'
|
||||||
version: 2.20.0(@babel/core@7.29.0)(@babel/template@7.28.6)(@types/react@19.2.16)(react@19.2.7)
|
version: 2.20.0(@babel/core@7.29.0)(@babel/template@7.28.6)(@types/react@19.2.16)(react@19.2.7)
|
||||||
@@ -6349,8 +6349,8 @@ packages:
|
|||||||
dompurify@3.4.5:
|
dompurify@3.4.5:
|
||||||
resolution: {integrity: sha512-OrwIBKsdNSVEeubdJ1HBv/wNENRM9ytAVCv7YXt//A3vPdVMNuACRqK9mXCGCBW2ln7BT/A4X0jXHo2Gu89miA==}
|
resolution: {integrity: sha512-OrwIBKsdNSVEeubdJ1HBv/wNENRM9ytAVCv7YXt//A3vPdVMNuACRqK9mXCGCBW2ln7BT/A4X0jXHo2Gu89miA==}
|
||||||
|
|
||||||
dompurify@3.4.7:
|
dompurify@3.4.8:
|
||||||
resolution: {integrity: sha512-2jBxDJY4RR06tQNy4w5FlFH7kfxsQZlufd0sbv+chfHCxeJwrFw2baUDsSwvBISD4K4RDbd0PTfy3uNXsR6siA==}
|
resolution: {integrity: sha512-yb1cEmaOum7wFvOCSQxyfgVlv5D47Rc30iZWoMpbDIWTnJ6grDDQyu2KFJzB2k7u0pMuJcQ1zphH//fFnw2tjQ==}
|
||||||
|
|
||||||
dot-prop@5.3.0:
|
dot-prop@5.3.0:
|
||||||
resolution: {integrity: sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==}
|
resolution: {integrity: sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==}
|
||||||
@@ -7208,8 +7208,8 @@ packages:
|
|||||||
resolution: {integrity: sha512-6B3tLtFqtQS4ekarvLVMZ+X+VlvQekbe4taUkf/rhVO3d/h0M2rfARm/pXLcPEsjjMsFgrFgSrhQIxcSVrBz8w==}
|
resolution: {integrity: sha512-6B3tLtFqtQS4ekarvLVMZ+X+VlvQekbe4taUkf/rhVO3d/h0M2rfARm/pXLcPEsjjMsFgrFgSrhQIxcSVrBz8w==}
|
||||||
engines: {node: '>=18'}
|
engines: {node: '>=18'}
|
||||||
|
|
||||||
isomorphic-dompurify@3.15.0:
|
isomorphic-dompurify@3.16.0:
|
||||||
resolution: {integrity: sha512-9ZtkbQ8+SgNf6LuDAdu9bq23dVXMIGNM8ZYnyl2MufyZiSD5dqAUJcyjtYZz7B80HuPpEn/f0NCS6zKvavHtfA==}
|
resolution: {integrity: sha512-KzTJsMuVPqPwBOD0F6jKXoV/+v8CSx0rxVp+/67KV6Xbw++0zD/avT3bZsgwR0M5QRMiOE+QqQtoZLEJYy1C4Q==}
|
||||||
engines: {node: ^20.19.0 || ^22.13.0 || >=24.0.0}
|
engines: {node: ^20.19.0 || ^22.13.0 || >=24.0.0}
|
||||||
|
|
||||||
isomorphic-ws@5.0.0:
|
isomorphic-ws@5.0.0:
|
||||||
@@ -13711,7 +13711,7 @@ snapshots:
|
|||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
'@types/trusted-types': 2.0.7
|
'@types/trusted-types': 2.0.7
|
||||||
|
|
||||||
dompurify@3.4.7:
|
dompurify@3.4.8:
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
'@types/trusted-types': 2.0.7
|
'@types/trusted-types': 2.0.7
|
||||||
|
|
||||||
@@ -14562,9 +14562,9 @@ snapshots:
|
|||||||
isexe@3.1.5:
|
isexe@3.1.5:
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
isomorphic-dompurify@3.15.0(@noble/hashes@2.0.1):
|
isomorphic-dompurify@3.16.0(@noble/hashes@2.0.1):
|
||||||
dependencies:
|
dependencies:
|
||||||
dompurify: 3.4.7
|
dompurify: 3.4.8
|
||||||
jsdom: 29.1.1(@noble/hashes@2.0.1)
|
jsdom: 29.1.1(@noble/hashes@2.0.1)
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@noble/hashes'
|
- '@noble/hashes'
|
||||||
|
|||||||
+1
-1
@@ -126,7 +126,7 @@ catalog:
|
|||||||
glob: ^13.0.6
|
glob: ^13.0.6
|
||||||
ical.js: ^2.2.1
|
ical.js: ^2.2.1
|
||||||
ioredis: 5.11.0
|
ioredis: 5.11.0
|
||||||
isomorphic-dompurify: ^3.15.0
|
isomorphic-dompurify: ^3.16.0
|
||||||
jotai: ^2.20.0
|
jotai: ^2.20.0
|
||||||
jsdom: ^29.1.1
|
jsdom: ^29.1.1
|
||||||
json5: ^2.2.3
|
json5: ^2.2.3
|
||||||
|
|||||||
Reference in new issue
Block a user