Skip to content

Commit

Permalink
Merge pull request #27 from cbrianbet/feat/requestor-form
Browse files Browse the repository at this point in the history
Requester id used to create requests
  • Loading branch information
cbrianbet authored Nov 20, 2024
2 parents a2f7b1a + 4bec101 commit 5c5671a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/components/Cards/CardRequesterRequestDetails.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,14 @@
<p class="text-blueGray-700 text-sm font-bold">
Supporting Documents
</p>
<CardRequestDocuments requestDocs={files.filter((file)=> file.FileURL.includes('/supporting-documents/'))}/>
<CardRequestDocuments requestDocs={files.filter((file)=> file.Folder ==='supporting-documents')}/>
</div>
{#if data.Status.toLowerCase() === 'complete'}
<div class="px-6 py-6 border-t border-blueGray-200">
<p class="text-blueGray-700 text-sm font-bold">
Request Outputs
</p>
<CardRequestDocuments requestDocs={files.filter((file)=> !file.FileURL.includes('/supporting-documents/'))}/>
<CardRequestDocuments requestDocs={files.filter((file)=> !file.Folder !=='supporting-documents')}/>
</div>
{/if}
Expand Down
6 changes: 4 additions & 2 deletions src/views/user/UserRequestForm.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script>
import Swal from 'sweetalert2';
import {auth} from "../../authentication/AuthStore";
const env = process.env.config;
let files = [];
Expand Down Expand Up @@ -34,8 +35,9 @@
}
let datedue = new Date(deadline).toISOString()
// TODO: Use id of user
let requestor_id = '79191307-1516-4b32-84bb-d0ebf8967d2d'
let requestor_id = null;
auth.id.subscribe((value) => requestor_id = value)
try {
let response = await fetch(`${env.API_ENDPOINT}/request/create`, {
method: 'POST',
Expand Down

0 comments on commit 5c5671a

Please sign in to comment.