From 5440245b74eabab2aec4d5f7ee9f76f6da41a0eb Mon Sep 17 00:00:00 2001 From: PolariTOON <36267812+PolariTOON@users.noreply.github.com> Date: Thu, 1 Dec 2022 16:40:26 +0100 Subject: [PATCH] feat: Add the expiration alert to the qualification block --- react/Viewer/Panel/Qualification.jsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/react/Viewer/Panel/Qualification.jsx b/react/Viewer/Panel/Qualification.jsx index 6babca8c79..a100b77e97 100644 --- a/react/Viewer/Panel/Qualification.jsx +++ b/react/Viewer/Panel/Qualification.jsx @@ -1,6 +1,8 @@ import React, { useRef, useState, createRef, useMemo, useEffect } from 'react' import PropTypes from 'prop-types' +import { models } from 'cozy-client' + import List from '../../MuiCozyTheme/List' import { withViewerLocales } from '../hoc/withViewerLocales' import { @@ -14,6 +16,9 @@ import ActionMenuWrapper from './ActionMenuWrapper' import QualificationListItemDate from './QualificationListItemDate' import QualificationListItemInformation from './QualificationListItemInformation' import QualificationListItemOther from './QualificationListItemOther' +import Expiration from './Expiration' + +const { isExpiringSoon } = models.paper const makeQualificationListItemComp = metadataName => { if (knownDateMetadataNames.includes(metadataName)) { @@ -64,6 +69,9 @@ const Qualification = ({ file }) => { return (