File tree Expand file tree Collapse file tree 8 files changed +20
-140
lines changed
PreviewEmailTemplate/__snapshots__
PreviewNHSAppTemplate/__snapshots__
PreviewSMSTemplate/__snapshots__
components/molecules/PreviewTemplateDetails Expand file tree Collapse file tree 8 files changed +20
-140
lines changed Original file line number Diff line number Diff line change @@ -845,27 +845,6 @@ exports[`Preview email form renders matches snapshot when navigating from edit s
845845 test-template-email
846846 </h1 >
847847 </div >
848- <div
849- class = " nhsuk-warning-callout nhsuk-u-padding-4 nhsuk-u-margin-bottom-6 nhsuk-u-reading-width warning_callout"
850- >
851- <strong
852- class = " nhsuk-tag nhsuk-tag--green nhsuk-u-margin-right-2 nhsuk-u-margin-bottom-3"
853- >
854- Draft
855- </strong >
856- <p >
857- You cannot edit or delete this template because it's used in a message plan that's in production.
858- </p >
859- <p >
860- <a
861- data-testid = " copy-link"
862- href = " /copy-template/template-id"
863- >
864- Copy this template
865- </a >
866- to create a draft with the same content.
867- </p >
868- </div >
869848 <div
870849 class = " nhsuk-width-container nhsuk-u-margin-bottom-6 nhsuk-body-m"
871850 >
@@ -1274,27 +1253,6 @@ exports[`Preview email form renders matches snapshot when navigating from manage
12741253 test-template-email
12751254 </h1 >
12761255 </div >
1277- <div
1278- class = " nhsuk-warning-callout nhsuk-u-padding-4 nhsuk-u-margin-bottom-6 nhsuk-u-reading-width warning_callout"
1279- >
1280- <strong
1281- class = " nhsuk-tag nhsuk-tag--green nhsuk-u-margin-right-2 nhsuk-u-margin-bottom-3"
1282- >
1283- Draft
1284- </strong >
1285- <p >
1286- You cannot edit or delete this template because it's used in a message plan that's in production.
1287- </p >
1288- <p >
1289- <a
1290- data-testid = " copy-link"
1291- href = " /copy-template/template-id"
1292- >
1293- Copy this template
1294- </a >
1295- to create a draft with the same content.
1296- </p >
1297- </div >
12981256 <div
12991257 class = " nhsuk-width-container nhsuk-u-margin-bottom-6 nhsuk-body-m"
13001258 >
Original file line number Diff line number Diff line change @@ -773,27 +773,6 @@ exports[`Preview nhs app form renders matches snapshot when navigating from edit
773773 test-template-nhs app
774774 </h1 >
775775 </div >
776- <div
777- class = " nhsuk-warning-callout nhsuk-u-padding-4 nhsuk-u-margin-bottom-6 nhsuk-u-reading-width warning_callout"
778- >
779- <strong
780- class = " nhsuk-tag nhsuk-tag--green nhsuk-u-margin-right-2 nhsuk-u-margin-bottom-3"
781- >
782- Draft
783- </strong >
784- <p >
785- You cannot edit or delete this template because it's used in a message plan that's in production.
786- </p >
787- <p >
788- <a
789- data-testid = " copy-link"
790- href = " /copy-template/template-id"
791- >
792- Copy this template
793- </a >
794- to create a draft with the same content.
795- </p >
796- </div >
797776 <div
798777 class = " nhsuk-width-container nhsuk-u-margin-bottom-6 nhsuk-body-m"
799778 >
@@ -1154,27 +1133,6 @@ exports[`Preview nhs app form renders matches snapshot when navigating from mana
11541133 test-template-nhs app
11551134 </h1 >
11561135 </div >
1157- <div
1158- class = " nhsuk-warning-callout nhsuk-u-padding-4 nhsuk-u-margin-bottom-6 nhsuk-u-reading-width warning_callout"
1159- >
1160- <strong
1161- class = " nhsuk-tag nhsuk-tag--green nhsuk-u-margin-right-2 nhsuk-u-margin-bottom-3"
1162- >
1163- Draft
1164- </strong >
1165- <p >
1166- You cannot edit or delete this template because it's used in a message plan that's in production.
1167- </p >
1168- <p >
1169- <a
1170- data-testid = " copy-link"
1171- href = " /copy-template/template-id"
1172- >
1173- Copy this template
1174- </a >
1175- to create a draft with the same content.
1176- </p >
1177- </div >
11781136 <div
11791137 class = " nhsuk-width-container nhsuk-u-margin-bottom-6 nhsuk-body-m"
11801138 >
Original file line number Diff line number Diff line change @@ -770,27 +770,6 @@ exports[`Review sms form renders matches snapshot when navigating from edit scre
770770 test-template-sms
771771 </h1 >
772772 </div >
773- <div
774- class = " nhsuk-warning-callout nhsuk-u-padding-4 nhsuk-u-margin-bottom-6 nhsuk-u-reading-width warning_callout"
775- >
776- <strong
777- class = " nhsuk-tag nhsuk-tag--green nhsuk-u-margin-right-2 nhsuk-u-margin-bottom-3"
778- >
779- Draft
780- </strong >
781- <p >
782- You cannot edit or delete this template because it's used in a message plan that's in production.
783- </p >
784- <p >
785- <a
786- data-testid = " copy-link"
787- href = " /copy-template/template-id"
788- >
789- Copy this template
790- </a >
791- to create a draft with the same content.
792- </p >
793- </div >
794773 <div
795774 class = " nhsuk-width-container nhsuk-u-margin-bottom-6 nhsuk-body-m"
796775 >
@@ -1149,27 +1128,6 @@ exports[`Review sms form renders matches snapshot when navigating from manage te
11491128 test-template-sms
11501129 </h1 >
11511130 </div >
1152- <div
1153- class = " nhsuk-warning-callout nhsuk-u-padding-4 nhsuk-u-margin-bottom-6 nhsuk-u-reading-width warning_callout"
1154- >
1155- <strong
1156- class = " nhsuk-tag nhsuk-tag--green nhsuk-u-margin-right-2 nhsuk-u-margin-bottom-3"
1157- >
1158- Draft
1159- </strong >
1160- <p >
1161- You cannot edit or delete this template because it's used in a message plan that's in production.
1162- </p >
1163- <p >
1164- <a
1165- data-testid = " copy-link"
1166- href = " /copy-template/template-id"
1167- >
1168- Copy this template
1169- </a >
1170- to create a draft with the same content.
1171- </p >
1172- </div >
11731131 <div
11741132 class = " nhsuk-width-container nhsuk-u-margin-bottom-6 nhsuk-body-m"
11751133 >
Original file line number Diff line number Diff line change @@ -1057,16 +1057,6 @@ exports[`PreviewLetterTemplate component matches snapshot when template status i
10571057 letter
10581058 </h1 >
10591059 </div >
1060- <div
1061- class = " nhsuk-warning-callout nhsuk-u-padding-4 nhsuk-u-margin-bottom-6 nhsuk-u-reading-width warning_callout"
1062- >
1063- <strong
1064- class = " nhsuk-tag nhsuk-u-margin-right-2 nhsuk-u-margin-bottom-3"
1065- />
1066- <p >
1067- You cannot delete this template because it's used in a message plan that's in production.
1068- </p >
1069- </div >
10701060 <div
10711061 class = " nhsuk-width-container nhsuk-u-margin-bottom-6 nhsuk-body-m"
10721062 >
Original file line number Diff line number Diff line change @@ -30,7 +30,11 @@ export default function PreviewTemplateDetailsEmail({
3030 return (
3131 < >
3232 < DetailsHeader templateName = { template . name } />
33- { features . routing && < LockedTemplateWarning template = { template } /> }
33+
34+ { features . routing && template . templateStatus === 'SUBMITTED' && (
35+ < LockedTemplateWarning template = { template } />
36+ ) }
37+
3438 < Container
3539 className = { concatClassNames ( 'nhsuk-u-margin-bottom-6' , 'nhsuk-body-m' ) }
3640 >
Original file line number Diff line number Diff line change @@ -42,7 +42,11 @@ export default function PreviewTemplateDetailsLetter({
4242 return (
4343 < >
4444 < DetailsHeader templateName = { template . name } />
45- { features . routing && < LockedTemplateWarning template = { template } /> }
45+
46+ { features . routing && template . templateStatus === 'SUBMITTED' && (
47+ < LockedTemplateWarning template = { template } />
48+ ) }
49+
4650 < Container
4751 className = { concatClassNames ( 'nhsuk-u-margin-bottom-6' , 'nhsuk-body-m' ) }
4852 >
Original file line number Diff line number Diff line change @@ -29,7 +29,11 @@ export default function PreviewTemplateDetailsNhsApp({
2929 return (
3030 < >
3131 < DetailsHeader templateName = { template . name } />
32- { features . routing && < LockedTemplateWarning template = { template } /> }
32+
33+ { features . routing && template . templateStatus === 'SUBMITTED' && (
34+ < LockedTemplateWarning template = { template } />
35+ ) }
36+
3337 < Container
3438 className = { concatClassNames ( 'nhsuk-u-margin-bottom-6' , 'nhsuk-body-m' ) }
3539 >
Original file line number Diff line number Diff line change @@ -29,7 +29,11 @@ export default function PreviewTemplateDetailsSms({
2929 return (
3030 < >
3131 < DetailsHeader templateName = { template . name } />
32- { features . routing && < LockedTemplateWarning template = { template } /> }
32+
33+ { features . routing && template . templateStatus === 'SUBMITTED' && (
34+ < LockedTemplateWarning template = { template } />
35+ ) }
36+
3337 < Container
3438 className = { concatClassNames ( 'nhsuk-u-margin-bottom-6' , 'nhsuk-body-m' ) }
3539 >
You can’t perform that action at this time.
0 commit comments