Skip to content

Commit

Permalink
Write name for user access
Browse files Browse the repository at this point in the history
  • Loading branch information
FyreByrd committed Dec 4, 2024
1 parent 443412e commit bc8105e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts">
import * as m from '$lib/paraglide/messages';
import { ProductTransitionType } from 'sil.appbuilder.portal.common/prisma';
import { getTimeDateString } from '$lib/timeUtils';
import { ProductTransitionType } from 'sil.appbuilder.portal.common/prisma';
export let product: {
Id: string;
Expand Down Expand Up @@ -85,7 +85,6 @@
{#if ![2, 3, 4].includes(transition.TransitionType)}
{transition.AllowedUserNames || m.appName()}
{/if}
<!-- TODO: handle username for Project Access transition types -->
</td>
<td>{transition.Command ?? ''}</td>
<td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
import { enhance } from '$app/forms';
import { page } from '$app/stores';
import IconContainer from '$lib/components/IconContainer.svelte';
import ProductDetails from '$lib/components/ProductDetails.svelte';
import { i18n } from '$lib/i18n';
import { getIcon } from '$lib/icons/productDefinitionIcon';
import langtags from '$lib/langtags.json';
import * as m from '$lib/paraglide/messages';
import { getRelativeTime, getTimeDateString } from '$lib/timeUtils';
import { ProductTransitionType, RoleId } from 'sil.appbuilder.portal.common/prisma';
import { getRelativeTime } from '$lib/timeUtils';
import { RoleId } from 'sil.appbuilder.portal.common/prisma';
import { superForm } from 'sveltekit-superforms';
import type { PageData } from './$types';
import ProductDetails from '$lib/components/ProductDetails.svelte';
const langtagmap = new Map(langtags.map((tag) => [tag.tag, /* tag.localname ?? */ tag.name]));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ export async function POST({ params, request, fetch }) {
await DatabaseWrites.productTransitions.createMany({
data: products.map((p) => ({
ProductId: p.Id,
AllowedUserNames: '',
AllowedUserNames: user[0].Name,
TransitionType: ProductTransitionType.ProjectAccess,
InitialState: 'Project ' + use,
WorkflowUserId: user[0].WorkflowUserId,
Expand Down

0 comments on commit bc8105e

Please sign in to comment.