mirror of
https://github.com/fosrl/pangolin.git
synced 2026-01-29 06:10:47 +00:00
Merge pull request #1730 from Pallavikumarimdb/fix/shareable-link-resource-URI
Update shareable link resource URI to use NiceId instead of resourceId
This commit is contained in:
@@ -63,6 +63,7 @@ function queryAccessTokens(
|
||||
description: resourceAccessToken.description,
|
||||
createdAt: resourceAccessToken.createdAt,
|
||||
resourceName: resources.name,
|
||||
resourceNiceId: resources.niceId,
|
||||
siteName: sites.name
|
||||
};
|
||||
|
||||
|
||||
@@ -98,6 +98,7 @@ export default function CreateShareLinkForm({
|
||||
{
|
||||
resourceId: number;
|
||||
name: string;
|
||||
niceId: string;
|
||||
resourceUrl: string;
|
||||
}[]
|
||||
>([]);
|
||||
@@ -160,6 +161,7 @@ export default function CreateShareLinkForm({
|
||||
.map((r) => ({
|
||||
resourceId: r.resourceId,
|
||||
name: r.name,
|
||||
niceId: r.niceId,
|
||||
resourceUrl: `${r.ssl ? "https://" : "http://"}${toUnicode(r.fullDomain || "")}/`
|
||||
}))
|
||||
);
|
||||
@@ -233,6 +235,7 @@ export default function CreateShareLinkForm({
|
||||
accessTokenId: token.accessTokenId,
|
||||
resourceId: token.resourceId,
|
||||
resourceName: values.resourceName,
|
||||
resourceNiceId: resource ? resource.niceId : "",
|
||||
title: token.title,
|
||||
createdAt: token.createdAt,
|
||||
expiresAt: token.expiresAt
|
||||
|
||||
@@ -39,6 +39,7 @@ export type ShareLinkRow = {
|
||||
accessTokenId: string;
|
||||
resourceId: number;
|
||||
resourceName: string;
|
||||
resourceNiceId: string;
|
||||
title: string | null;
|
||||
createdAt: number;
|
||||
expiresAt: number | null;
|
||||
@@ -120,7 +121,7 @@ export default function ShareLinksTable({
|
||||
cell: ({ row }) => {
|
||||
const r = row.original;
|
||||
return (
|
||||
<Link href={`/${orgId}/settings/resources/${r.resourceId}`}>
|
||||
<Link href={`/${orgId}/settings/resources/${r.resourceNiceId}`}>
|
||||
<Button variant="outline" size="sm">
|
||||
{r.resourceName}
|
||||
<ArrowUpRight className="ml-2 h-4 w-4" />
|
||||
|
||||
Reference in New Issue
Block a user