From 3bb7d98462c659206a9a8a2c8dce7402d80ecd09 Mon Sep 17 00:00:00 2001 From: Tomas <tomasysh@gmail.com> Date: 星期二, 07 十二月 2021 14:55:43 +0800 Subject: [PATCH] fixed: 補上 #1320628 遺漏的檔案 --- PAMapp/assets/ts/storageRequests.ts | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/PAMapp/assets/ts/storageRequests.ts b/PAMapp/assets/ts/storageRequests.ts index 46549ae..4b499a5 100644 --- a/PAMapp/assets/ts/storageRequests.ts +++ b/PAMapp/assets/ts/storageRequests.ts @@ -8,3 +8,16 @@ export function setRequestsToStorage(myRequests: AppointmentRequests): void { localStorage.setItem('myRequests', JSON.stringify(myRequests)); } + +export function getRequestQuestionFromStorage(): string[] { + const requestQuestions = localStorage.getItem('myRequestQuestion'); + return requestQuestions ? JSON.parse(requestQuestions) : []; +} + +export function setRequestQuestionToStorage(myQuestion: string[]): void { + localStorage.setItem('myRequestQuestion', JSON.stringify(myQuestion)); +} + +export function removeRequestQuestionFromStorage(): void { + localStorage.removeItem('myRequestQuestion'); +} -- Gitblit v1.8.0