@@ -226,6 +226,7 @@ export default class ReimbursementRequestService {
226226 * @param accountCodeId the id of the account code the user made
227227 * @param totalCost the total cost of the reimbursement with tax
228228 * @param organizationId the organization the user is currently in
229+ * @param description the description of the reimbursement request
229230 * @returns the created reimbursement request
230231 */
231232 static async createReimbursementRequest (
@@ -237,7 +238,8 @@ export default class ReimbursementRequestService {
237238 acccountCodeId : string ,
238239 totalCost : number ,
239240 organization : Organization ,
240- dateOfExpense ?: Date
241+ dateOfExpense ?: Date ,
242+ description ?: string
241243 ) : Promise < ReimbursementRequest > {
242244 if ( await userHasPermission ( recipient . userId , organization . organizationId , isGuest ) )
243245 throw new AccessDeniedGuestException ( 'create a reimbursement request' ) ;
@@ -278,7 +280,8 @@ export default class ReimbursementRequestService {
278280 }
279281 } ,
280282 identifier : numReimbursementRequests + 1 ,
281- organization : { connect : { organizationId : organization . organizationId } }
283+ organization : { connect : { organizationId : organization . organizationId } } ,
284+ description
282285 }
283286 } ) ;
284287
@@ -356,6 +359,7 @@ export default class ReimbursementRequestService {
356359 * @param receiptPictures the old receipts that haven't been deleted (new receipts must be separately uploaded)
357360 * @param submitter the person editing the reimbursement request
358361 * @param organizationId the organization the user is currently in
362+ * @param description the updated description of the reimbursement request
359363 * @returns the edited reimbursement request
360364 */
361365 static async editReimbursementRequest (
@@ -369,7 +373,8 @@ export default class ReimbursementRequestService {
369373 receiptPictures : ReimbursementReceiptCreateArgs [ ] ,
370374 submitter : User ,
371375 organization : Organization ,
372- dateOfExpense ?: Date
376+ dateOfExpense ?: Date ,
377+ description ?: string
373378 ) : Promise < Reimbursement_Request > {
374379 const oldReimbursementRequest = await prisma . reimbursement_Request . findUnique ( {
375380 where : { reimbursementRequestId : requestId } ,
@@ -408,6 +413,7 @@ export default class ReimbursementRequestService {
408413 where : { reimbursementRequestId : oldReimbursementRequest . reimbursementRequestId } ,
409414 data : {
410415 dateOfExpense : dateOfExpense ?? null ,
416+ description,
411417 indexCodeId,
412418 totalCost,
413419 accountCodeId : accountCode . accountCodeId ,
@@ -498,6 +504,7 @@ export default class ReimbursementRequestService {
498504 * @param reimbursementId The id of the reimbursement to be edited
499505 * @param editor The user editing the reimbursement
500506 * @param amount The new amount of the reimbursement
507+ * @param description The new description of the reimbursement
501508 * @param dateCreated The new date the reimbursement was created
502509 * @param organizationId The organization the user is currently in
503510 * @returns The updated reimbursement
0 commit comments