From dc333a5fc8727e02a779a93c0f780e97b72ff577 Mon Sep 17 00:00:00 2001 From: Timur Ercan Date: Mon, 6 Mar 2023 18:04:56 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20order=20recipient=20by=20id=20to?= =?UTF-8?q?=20avoid=20order=20change=20in=20ui=20on=20reload?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/lib/query/getDocument.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/lib/query/getDocument.ts b/packages/lib/query/getDocument.ts index 9e61ae8ea..db658794c 100644 --- a/packages/lib/query/getDocument.ts +++ b/packages/lib/query/getDocument.ts @@ -18,7 +18,11 @@ export const getDocument = async ( userId: user.id, }, include: { - Recipient: true, + Recipient: { + orderBy: { + id: "asc", + }, + }, Field: { include: { Recipient: true, Signature: true } }, }, });