import { AppointmentRequests } from "./models/appointment.model";
|
|
export function getRequestsFromStorage(): AppointmentRequests {
|
const requests = localStorage.getItem('myRequests');
|
return requests ? JSON.parse(requests) : null;
|
}
|
|
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');
|
}
|