allaw-ui 5.5.4 → 5.5.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -160,10 +160,52 @@
|
|
|
160
160
|
.case-card-categories {
|
|
161
161
|
display: flex;
|
|
162
162
|
gap: 8px;
|
|
163
|
-
margin-top: 16px;
|
|
164
163
|
overflow: visible;
|
|
165
164
|
flex-wrap: wrap;
|
|
165
|
+
flex: 1;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.case-card-footer {
|
|
169
|
+
display: flex;
|
|
170
|
+
justify-content: space-between;
|
|
171
|
+
align-items: flex-end;
|
|
166
172
|
width: 100%;
|
|
173
|
+
margin-top: 16px;
|
|
174
|
+
gap: 8px;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.case-card-bottom-right {
|
|
178
|
+
display: flex;
|
|
179
|
+
align-items: center;
|
|
180
|
+
gap: 8px;
|
|
181
|
+
flex-shrink: 0;
|
|
182
|
+
margin-bottom: 2px;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.case-card-document-badge {
|
|
186
|
+
display: flex;
|
|
187
|
+
align-items: center;
|
|
188
|
+
justify-content: center;
|
|
189
|
+
height: 24px;
|
|
190
|
+
border-radius: 6px;
|
|
191
|
+
background-color: #eef5fc;
|
|
192
|
+
padding: 0 10px;
|
|
193
|
+
gap: 8px;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.case-card-document-badge i {
|
|
197
|
+
color: #25beeb;
|
|
198
|
+
font-size: 14px;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.case-card-document-counter {
|
|
202
|
+
color: #456073;
|
|
203
|
+
font-family: "Open Sans", sans-serif;
|
|
204
|
+
font-size: 12px;
|
|
205
|
+
font-weight: 600;
|
|
206
|
+
line-height: 1;
|
|
207
|
+
letter-spacing: 0.3px;
|
|
208
|
+
white-space: nowrap;
|
|
167
209
|
}
|
|
168
210
|
|
|
169
211
|
.case-card-mobile .case-card-next-appointment-label {
|
|
@@ -20,6 +20,9 @@ export interface CaseCardProps {
|
|
|
20
20
|
steps?: number;
|
|
21
21
|
currentStep?: number;
|
|
22
22
|
hideProgressBar?: boolean;
|
|
23
|
+
avatarUrl?: string;
|
|
24
|
+
receivedDocuments?: number;
|
|
25
|
+
totalDocuments?: number;
|
|
23
26
|
}
|
|
24
27
|
declare const CaseCard: React.FC<CaseCardProps>;
|
|
25
28
|
export default CaseCard;
|
|
@@ -3,8 +3,9 @@ import "./CaseCard.css";
|
|
|
3
3
|
import OtherStatusTag from "../../atoms/tags/OtherStatusTag";
|
|
4
4
|
import CardDate from "../../atoms/typography/CardDate";
|
|
5
5
|
import ProgressBar from "../../atoms/progressBars/ProgressBar";
|
|
6
|
+
import AvatarBubble from "../proSwitch/AvatarBubble";
|
|
6
7
|
var CaseCard = function (_a) {
|
|
7
|
-
var clientName = _a.clientName, title = _a.title, _b = _a.notificationCount, notificationCount = _b === void 0 ? 0 : _b, nextAppointment = _a.nextAppointment, categories = _a.categories, variant = _a.variant, _c = _a.categoryLabelLimit, categoryLabelLimit = _c === void 0 ? 20 : _c, _d = _a.isDisabled, isDisabled = _d === void 0 ? false : _d, _e = _a.dateStyle, dateStyle = _e === void 0 ? "hybride" : _e, dateLabel = _a.dateLabel, _f = _a.barColor, barColor = _f === void 0 ? "blue" : _f, _g = _a.showYear, showYear = _g === void 0 ? true : _g, _h = _a.steps, steps = _h === void 0 ? 100 : _h, _j = _a.currentStep, currentStep = _j === void 0 ? 50 : _j, _k = _a.hideProgressBar, hideProgressBar = _k === void 0 ? false : _k;
|
|
8
|
+
var clientName = _a.clientName, title = _a.title, _b = _a.notificationCount, notificationCount = _b === void 0 ? 0 : _b, nextAppointment = _a.nextAppointment, categories = _a.categories, variant = _a.variant, _c = _a.categoryLabelLimit, categoryLabelLimit = _c === void 0 ? 20 : _c, _d = _a.isDisabled, isDisabled = _d === void 0 ? false : _d, _e = _a.dateStyle, dateStyle = _e === void 0 ? "hybride" : _e, dateLabel = _a.dateLabel, _f = _a.barColor, barColor = _f === void 0 ? "blue" : _f, _g = _a.showYear, showYear = _g === void 0 ? true : _g, _h = _a.steps, steps = _h === void 0 ? 100 : _h, _j = _a.currentStep, currentStep = _j === void 0 ? 50 : _j, _k = _a.hideProgressBar, hideProgressBar = _k === void 0 ? false : _k, avatarUrl = _a.avatarUrl, receivedDocuments = _a.receivedDocuments, totalDocuments = _a.totalDocuments;
|
|
8
9
|
var normalizedNotificationCount = Math.max(0, Math.floor(Number.isFinite(notificationCount) ? notificationCount : 0));
|
|
9
10
|
var notificationLabel = normalizedNotificationCount > 99
|
|
10
11
|
? "99+"
|
|
@@ -17,7 +18,19 @@ var CaseCard = function (_a) {
|
|
|
17
18
|
React.createElement("span", { className: "case-card-client-name" }, clientName)),
|
|
18
19
|
!hideProgressBar && (React.createElement("div", { className: "case-card-progress-bar" },
|
|
19
20
|
React.createElement(ProgressBar, { startIcon: false, endIcon: false, steps: steps, isWrapperProgressBar: false, currentStep: currentStep, barColor: barColor }))),
|
|
20
|
-
React.createElement("div", { className: "case-card-
|
|
21
|
+
React.createElement("div", { className: "case-card-footer" },
|
|
22
|
+
React.createElement("div", { className: "case-card-categories" }, categories.map(function (category, index) { return (React.createElement(OtherStatusTag, { key: index, label: category, type: "readonly", labelLimit: categoryLabelLimit })); })),
|
|
23
|
+
(avatarUrl ||
|
|
24
|
+
(receivedDocuments !== undefined &&
|
|
25
|
+
totalDocuments !== undefined)) && (React.createElement("div", { className: "case-card-bottom-right" },
|
|
26
|
+
avatarUrl && (React.createElement(AvatarBubble, { firstName: "", name: "", src: avatarUrl, size: 24, disableHoverAnimation: true, clickable: false })),
|
|
27
|
+
receivedDocuments !== undefined &&
|
|
28
|
+
totalDocuments !== undefined && (React.createElement("div", { className: "case-card-document-badge" },
|
|
29
|
+
React.createElement("i", { className: "allaw-icon-document" }),
|
|
30
|
+
React.createElement("span", { className: "case-card-document-counter" },
|
|
31
|
+
receivedDocuments,
|
|
32
|
+
" / ",
|
|
33
|
+
totalDocuments))))))),
|
|
21
34
|
nextAppointment && variant !== "archived" && (React.createElement("div", { className: "case-card-next-appointment" },
|
|
22
35
|
React.createElement(CardDate, { date: nextAppointment.date, showYear: showYear, variant: dateStyle, label: dateLabel, isDisabled: isDisabled })))));
|
|
23
36
|
};
|