create-safest-tools 0.4.1 → 0.4.2
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.
- package/package.json +1 -1
- package/template/console/reports/ReportDrawer.tsx +9 -0
- package/template/console/reports/types.ts +3 -0
- package/template/package.json +2 -2
- package/template/public/console/auth-shell.js +270 -263
- package/template/src/index.ts +8 -2
- package/template/src/report-workflow.ts +36 -2
- package/template/worker-configuration.d.ts +3 -3
package/package.json
CHANGED
|
@@ -39,6 +39,14 @@ function AnswerValue({ answer }: { answer: ReportAnswer }) {
|
|
|
39
39
|
: <span className="answer-text">{value}</span>;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
+
function reporterEmailValue(report: ReportDetailRecord): string {
|
|
43
|
+
if (report.reporterEmail) return report.reporterEmail;
|
|
44
|
+
if (report.reporterContactStatus === "redacted") return "Redacted by the retention policy";
|
|
45
|
+
if (report.reporterContactStatus === "restricted") return "Restricted for this role";
|
|
46
|
+
if (report.reporterContactStatus === "unavailable") return "Temporarily unavailable";
|
|
47
|
+
return "Not provided";
|
|
48
|
+
}
|
|
49
|
+
|
|
42
50
|
function deliveryLabel(state: string): string {
|
|
43
51
|
if (state === "suppressed") return "Not sent";
|
|
44
52
|
if (state === "queued" || state === "pending" || state === "sending" || state === "delivering") return "Queued";
|
|
@@ -147,6 +155,7 @@ function DetailContent({ report, actorId, generatedAt, actionCodes, claimReports
|
|
|
147
155
|
<Fact label="Channel">{readable(report.source || "unknown")}</Fact>
|
|
148
156
|
<Fact label="Submitted">{dateTime(report.submittedAt || report.receivedAt)}</Fact>
|
|
149
157
|
<Fact label="Language">{report.locale || "—"}</Fact>
|
|
158
|
+
<Fact label="Reporter email">{reporterEmailValue(report)}</Fact>
|
|
150
159
|
</dl><div className="answer-list">
|
|
151
160
|
{answers.length ? answers.map((answer) => <article className="answer-record" key={answer.fieldKey}><div><strong>{answer.label || readable(answer.fieldKey)}</strong>{answer.required ? <small>Required question</small> : null}</div><AnswerValue answer={answer} /></article>) : <EmptyLine>This form did not contain additional questions.</EmptyLine>}
|
|
152
161
|
</div></section>
|
|
@@ -183,6 +183,9 @@ export interface ReportDetailRecord {
|
|
|
183
183
|
customerUrl?: string;
|
|
184
184
|
ownerReference?: string;
|
|
185
185
|
reporterReference?: string;
|
|
186
|
+
reporterEmail?: string | null;
|
|
187
|
+
reporterContactMode?: string;
|
|
188
|
+
reporterContactStatus?: "available" | "not_provided" | "redacted" | "restricted" | "unavailable";
|
|
186
189
|
policyTitle?: string;
|
|
187
190
|
policyVersionId?: string;
|
|
188
191
|
queuePolicyVersionId?: string;
|
package/template/package.json
CHANGED