Merged PR 1036: update build id to store version number
update build id to store version number Related work items: #9877
This commit is contained in:
@@ -271,6 +271,7 @@ let MakeRepresentation = (props) => {
|
||||
/>
|
||||
);
|
||||
break;
|
||||
case "interestedparty":
|
||||
case t(
|
||||
"myrepresentations:capacity-options-arr-interested"
|
||||
).toLowerCase():
|
||||
|
||||
@@ -56,12 +56,24 @@ const RepAgent = (props) => {
|
||||
>
|
||||
{t("myrepresentations:kind-of-rep-label")}
|
||||
</label>
|
||||
<Field
|
||||
name="representationType"
|
||||
component={RenderPickList}
|
||||
datafieldname="representationType"
|
||||
optionsArr={appellantApplicantRepresentationArr}
|
||||
/>
|
||||
{typeof props.representationType == "undefined" ||
|
||||
typeof formObj.representationForm.values
|
||||
.representationType == "undefined" ? (
|
||||
<Field
|
||||
name="representationType"
|
||||
component={RenderPickList}
|
||||
datafieldname="representationType"
|
||||
optionsArr={appellantApplicantRepresentationArr}
|
||||
/>
|
||||
) : (
|
||||
<label className="govuk-label govuk-body-m">
|
||||
Representation Type:{" "}
|
||||
{
|
||||
formObj.representationForm.values
|
||||
.representationType
|
||||
}{" "}
|
||||
</label>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
{/* <div className="govuk-grid-row">
|
||||
|
||||
@@ -56,13 +56,12 @@ const RepAppellant = (props) => {
|
||||
className="govuk-label govuk-body-m"
|
||||
htmlFor="representationType"
|
||||
>
|
||||
{t(
|
||||
"myrepresentations:representation-from-an-agent-heading"
|
||||
)}
|
||||
?
|
||||
{t("myrepresentations:kind-of-rep-label")}
|
||||
</label>
|
||||
|
||||
{typeof props.representationType == "undefined" ? (
|
||||
{typeof props.representationType == "undefined" ||
|
||||
typeof formObj.representationForm.values
|
||||
.representationType == "undefined" ? (
|
||||
<Field
|
||||
name="representationType"
|
||||
component={RenderPickList}
|
||||
@@ -70,7 +69,13 @@ const RepAppellant = (props) => {
|
||||
optionsArr={appellantApplicantRepresentationArr}
|
||||
/>
|
||||
) : (
|
||||
<p>{props.representationType}</p>
|
||||
<label className="govuk-label govuk-body-m">
|
||||
Representation Type:{" "}
|
||||
{
|
||||
formObj.representationForm.values
|
||||
.representationType
|
||||
}{" "}
|
||||
</label>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
@@ -90,79 +95,103 @@ const RepAppellant = (props) => {
|
||||
</div>
|
||||
</div> */}
|
||||
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-form-group">
|
||||
<p className="govuk-body">
|
||||
{t("myrepresentations:enter-comment-label")}
|
||||
</p>
|
||||
<fieldset
|
||||
className="govuk-fieldset"
|
||||
aria-describedby="commentBox-hint"
|
||||
>
|
||||
<div id="commentBox-hint" className="govuk-hint">
|
||||
{t("myrepresentations:comments-set-out-label")}:
|
||||
</div>
|
||||
<div className="govuk-form-group">
|
||||
<Field
|
||||
name="representationComments"
|
||||
id="representationComments"
|
||||
component={RenderRichMultiline}
|
||||
type="text"
|
||||
rows="5"
|
||||
className="govuk-textarea govuk-input--width-30"
|
||||
aria-describedby={props.name + "-hint"}
|
||||
/>
|
||||
{RepresentationGuidanceText(
|
||||
formObj.representationForm.values.appealType
|
||||
)}
|
||||
</div>
|
||||
<div className="govuk-form-group govuk-!-margin-bottom-9">
|
||||
<FileUploadField
|
||||
name={"representationDocuments"}
|
||||
label={t("myrepresentations:add-files-label")}
|
||||
ticketnumber={props.props.caseReference}
|
||||
hint={"sdsd"}
|
||||
fileList={[]}
|
||||
setFilesForRepresentation={[]}
|
||||
containerID={
|
||||
props.props.props.accountDetails.containerID
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
{props.currentView.caseReference.hasOwnProperty(
|
||||
"repDetails"
|
||||
) &&
|
||||
props.currentView.caseReference.repDetails.filesList
|
||||
.length > 0 ? (
|
||||
<div className="govuk-form-group govuk-!-margin-bottom-9">
|
||||
{props.currentView.caseReference.repDetails.filesList.map(
|
||||
(blob, i) => (
|
||||
<div
|
||||
key={blob.name + "_" + i}
|
||||
className="govuk-!-margin-bottom-5 fileThumb "
|
||||
>
|
||||
<img
|
||||
src={getThumbnailIconByExtension(
|
||||
blob.name
|
||||
)}
|
||||
alt={blob.name}
|
||||
width="50"
|
||||
/>
|
||||
|
||||
<span className="govuk-body govuk-!-font-size-14 govuk-!-padding-left-5">
|
||||
{blob.name} (
|
||||
{bytesToSize(blob.size)})
|
||||
</span>
|
||||
</div>
|
||||
)
|
||||
{(typeof props.representationType != "undefined" ||
|
||||
typeof formObj.representationForm.values.representationType !=
|
||||
"undefined") && (
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-form-group">
|
||||
<p className="govuk-body">
|
||||
{t("myrepresentations:enter-comment-label")}
|
||||
</p>
|
||||
<fieldset
|
||||
className="govuk-fieldset"
|
||||
aria-describedby="commentBox-hint"
|
||||
>
|
||||
<div id="commentBox-hint" className="govuk-hint">
|
||||
{t("myrepresentations:comments-set-out-label")}:
|
||||
</div>
|
||||
<div className="govuk-form-group">
|
||||
<Field
|
||||
name="representationComments"
|
||||
id="representationComments"
|
||||
component={RenderRichMultiline}
|
||||
type="text"
|
||||
rows="5"
|
||||
className="govuk-textarea govuk-input--width-30"
|
||||
aria-describedby={props.name + "-hint"}
|
||||
/>
|
||||
{formObj.representationForm.values.appealType ==
|
||||
"846040004" ? (
|
||||
<p className="govuk-hint govuk-!-font-size-14 govuk-!-margin-top-5">
|
||||
{t(
|
||||
"myrepresentations:questionnaire-publish-policy-label"
|
||||
)}{" "}
|
||||
<a href="https://gov.wales/planning-and-environment-decisions-wales-publishing-policy-html">
|
||||
https://gov.wales/planning-and-environment-decisions-wales-publishing-policy-html
|
||||
</a>
|
||||
</p>
|
||||
) : (
|
||||
<p className="govuk-hint govuk-!-font-size-14 govuk-!-margin-top-5">
|
||||
{t(
|
||||
"myrepresentations:publish-policy-label"
|
||||
)}{" "}
|
||||
<a href="https://gov.wales/planning-and-environment-decisions-wales-publishing-policy-html">
|
||||
https://gov.wales/planning-and-environment-decisions-wales-publishing-policy-html
|
||||
</a>
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
) : (
|
||||
""
|
||||
)}
|
||||
</fieldset>
|
||||
</div>{" "}
|
||||
</div>
|
||||
<div className="govuk-form-group govuk-!-margin-bottom-9">
|
||||
<FileUploadField
|
||||
name={"representationDocuments"}
|
||||
label={t(
|
||||
"myrepresentations:add-files-label"
|
||||
)}
|
||||
ticketnumber={props.props.caseReference}
|
||||
hint={"sdsd"}
|
||||
fileList={[]}
|
||||
setFilesForRepresentation={[]}
|
||||
containerID={
|
||||
props.props.props.accountDetails
|
||||
.containerID
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
{props.currentView.caseReference.hasOwnProperty(
|
||||
"repDetails"
|
||||
) &&
|
||||
props.currentView.caseReference.repDetails.filesList
|
||||
.length > 0 ? (
|
||||
<div className="govuk-form-group govuk-!-margin-bottom-9">
|
||||
{props.currentView.caseReference.repDetails.filesList.map(
|
||||
(blob, i) => (
|
||||
<div
|
||||
key={blob.name + "_" + i}
|
||||
className="govuk-!-margin-bottom-5 fileThumb "
|
||||
>
|
||||
<img
|
||||
src={getThumbnailIconByExtension(
|
||||
blob.name
|
||||
)}
|
||||
alt={blob.name}
|
||||
width="50"
|
||||
/>
|
||||
|
||||
<span className="govuk-body govuk-!-font-size-14 govuk-!-padding-left-5">
|
||||
{blob.name} (
|
||||
{bytesToSize(blob.size)})
|
||||
</span>
|
||||
</div>
|
||||
)
|
||||
)}
|
||||
</div>
|
||||
) : (
|
||||
""
|
||||
)}
|
||||
</fieldset>
|
||||
</div>{" "}
|
||||
</div>
|
||||
)}
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-button-group">
|
||||
<button
|
||||
|
||||
@@ -1128,32 +1128,32 @@ export function FileUploadField(props) {
|
||||
);
|
||||
}
|
||||
|
||||
export const RepresentationGuidanceText = (appealType) => {
|
||||
let { t } = useTranslation();
|
||||
// export const RepresentationGuidanceText = (appealType) => {
|
||||
// let { t } = useTranslation();
|
||||
|
||||
console.log(appealType);
|
||||
switch (appealType) {
|
||||
case "846040004": //has/cas
|
||||
return (
|
||||
<p className="govuk-hint govuk-!-font-size-14 govuk-!-margin-top-5">
|
||||
{t("myrepresentations:questionnaire-publish-policy-label")}{" "}
|
||||
<a href="https://gov.wales/planning-and-environment-decisions-wales-publishing-policy-html">
|
||||
https://gov.wales/planning-and-environment-decisions-wales-publishing-policy-html
|
||||
</a>
|
||||
</p>
|
||||
);
|
||||
break;
|
||||
default:
|
||||
return (
|
||||
<p className="govuk-hint govuk-!-font-size-14 govuk-!-margin-top-5">
|
||||
{t("myrepresentations:publish-policy-label")}{" "}
|
||||
<a href="https://gov.wales/planning-and-environment-decisions-wales-publishing-policy-html">
|
||||
https://gov.wales/planning-and-environment-decisions-wales-publishing-policy-html
|
||||
</a>
|
||||
</p>
|
||||
);
|
||||
break;
|
||||
}
|
||||
// console.log(appealType);
|
||||
// switch (appealType) {
|
||||
// case "846040004": //has/cas
|
||||
// return (
|
||||
// <p className="govuk-hint govuk-!-font-size-14 govuk-!-margin-top-5">
|
||||
// {t("myrepresentations:questionnaire-publish-policy-label")}{" "}
|
||||
// <a href="https://gov.wales/planning-and-environment-decisions-wales-publishing-policy-html">
|
||||
// https://gov.wales/planning-and-environment-decisions-wales-publishing-policy-html
|
||||
// </a>
|
||||
// </p>
|
||||
// );
|
||||
// break;
|
||||
// default:
|
||||
// return (
|
||||
// <p className="govuk-hint govuk-!-font-size-14 govuk-!-margin-top-5">
|
||||
// {t("myrepresentations:publish-policy-label")}{" "}
|
||||
// <a href="https://gov.wales/planning-and-environment-decisions-wales-publishing-policy-html">
|
||||
// https://gov.wales/planning-and-environment-decisions-wales-publishing-policy-html
|
||||
// </a>
|
||||
// </p>
|
||||
// );
|
||||
// break;
|
||||
// }
|
||||
|
||||
return guidanceString;
|
||||
};
|
||||
// return guidanceString;
|
||||
// };
|
||||
|
||||
@@ -36,7 +36,7 @@ const RepInterestedPartyPerson = (props) => {
|
||||
<div className="govuk-grid-row">
|
||||
<h2 className="govuk-heading-m ">
|
||||
{t(
|
||||
"myrepresentations:representation-from-an-interested-party-heading"
|
||||
"myrepresentations:representation-from-an-interested-person-heading"
|
||||
)}
|
||||
</h2>
|
||||
<div className="govuk-form-group">
|
||||
@@ -44,82 +44,104 @@ const RepInterestedPartyPerson = (props) => {
|
||||
className="govuk-label govuk-body-m"
|
||||
htmlFor="representationType"
|
||||
>
|
||||
{t(
|
||||
"myrepresentations:representation-from-an-agent-heading"
|
||||
)}
|
||||
?
|
||||
{t("myrepresentations:kind-of-rep-label")}
|
||||
</label>
|
||||
<Field
|
||||
name="representationType"
|
||||
component={RenderPickList}
|
||||
datafieldname="representationType"
|
||||
validate={[required]}
|
||||
optionsArr={interestedPersonRepresentationArr}
|
||||
errorMsg={t("newappeal:select-an-option-label")}
|
||||
/>
|
||||
{typeof props.representationType == undefined ||
|
||||
typeof formObj.representationForm.values
|
||||
.representationType == "undefined" ? (
|
||||
<Field
|
||||
name="representationType"
|
||||
component={RenderPickList}
|
||||
datafieldname="representationType"
|
||||
validate={[required]}
|
||||
optionsArr={interestedPersonRepresentationArr}
|
||||
errorMsg={t("newappeal:select-an-option-label")}
|
||||
/>
|
||||
) : (
|
||||
<label className="govuk-label govuk-body-m">
|
||||
Representation Type:{" "}
|
||||
{
|
||||
formObj.representationForm.values
|
||||
.representationType
|
||||
}{" "}
|
||||
</label>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-form-group">
|
||||
<Field
|
||||
name="representationOnBehalfOf"
|
||||
datafieldname="representationOnBehalfOf"
|
||||
// label="In what capacity do you wish to make representations on this case?"
|
||||
options={["Yes", "No"]}
|
||||
id="representationOnBehalfOf"
|
||||
className="govuk-radios__input"
|
||||
errorMsg={t("newappeal:select-an-option-label")}
|
||||
component={RenderCondtionalRadioList}
|
||||
validate={[required]}
|
||||
legend={
|
||||
"Are you acting on behalf of a company, group or organisation?"
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-form-group">
|
||||
<p className="govuk-body">
|
||||
{t("myrepresentations:enter-comment-label")}
|
||||
</p>
|
||||
<fieldset
|
||||
className="govuk-fieldset"
|
||||
aria-describedby="commentBox-hint"
|
||||
>
|
||||
<div id="commentBox-hint" className="govuk-hint">
|
||||
{t("myrepresentations:comments-set-out-label")}:
|
||||
</div>
|
||||
{(typeof props.representationType != "undefined" ||
|
||||
typeof formObj.representationForm.values.representationType !=
|
||||
"undefined") && (
|
||||
<>
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-form-group">
|
||||
<Field
|
||||
name="representationComments"
|
||||
id="representationComments"
|
||||
component={RenderRichMultiline}
|
||||
type="text"
|
||||
rows="5"
|
||||
className="govuk-textarea govuk-input--width-30"
|
||||
aria-describedby={props.name + "-hint"}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="govuk-form-group govuk-!-margin-bottom-9">
|
||||
<FileUploadField
|
||||
name={"representationDocuments"}
|
||||
label={t("myrepresentations:add-files-label")}
|
||||
ticketnumber={props.props.caseReference}
|
||||
hint={"sdsd"}
|
||||
fileList={[]}
|
||||
setFilesForRepresentation={[]}
|
||||
containerID={
|
||||
props.props.props.accountDetails.containerID
|
||||
name="representationOnBehalfOf"
|
||||
datafieldname="representationOnBehalfOf"
|
||||
// label="In what capacity do you wish to make representations on this case?"
|
||||
options={["Yes", "No"]}
|
||||
id="representationOnBehalfOf"
|
||||
className="govuk-radios__input"
|
||||
errorMsg={t("newappeal:select-an-option-label")}
|
||||
component={RenderCondtionalRadioList}
|
||||
validate={[required]}
|
||||
legend={
|
||||
"Are you acting on behalf of a company, group or organisation?"
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>{" "}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-form-group">
|
||||
<p className="govuk-body">
|
||||
{t("myrepresentations:enter-comment-label")}
|
||||
</p>
|
||||
<fieldset
|
||||
className="govuk-fieldset"
|
||||
aria-describedby="commentBox-hint"
|
||||
>
|
||||
<div
|
||||
id="commentBox-hint"
|
||||
className="govuk-hint"
|
||||
>
|
||||
{t(
|
||||
"myrepresentations:comments-set-out-label"
|
||||
)}
|
||||
:
|
||||
</div>
|
||||
<div className="govuk-form-group">
|
||||
<Field
|
||||
name="representationComments"
|
||||
id="representationComments"
|
||||
component={RenderRichMultiline}
|
||||
type="text"
|
||||
rows="5"
|
||||
className="govuk-textarea govuk-input--width-30"
|
||||
aria-describedby={props.name + "-hint"}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="govuk-form-group govuk-!-margin-bottom-9">
|
||||
<FileUploadField
|
||||
name={"representationDocuments"}
|
||||
label={t(
|
||||
"myrepresentations:add-files-label"
|
||||
)}
|
||||
ticketnumber={props.props.caseReference}
|
||||
hint={"sdsd"}
|
||||
fileList={[]}
|
||||
setFilesForRepresentation={[]}
|
||||
containerID={
|
||||
props.props.props.accountDetails
|
||||
.containerID
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>{" "}
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-button-group">
|
||||
<button
|
||||
|
||||
+6
-4
@@ -2,6 +2,7 @@
|
||||
//const withStyles = require("@webdeb/next-styles");
|
||||
//const { nextI18NextRewrites } = require("next-i18next/rewrites");
|
||||
const nextTranslate = require("next-translate-plugin");
|
||||
const nextBuildId = require("next-build-id");
|
||||
|
||||
// module.exports = withStyles({
|
||||
// sass: true, // use .scss files
|
||||
@@ -52,8 +53,12 @@ const securityHeaders = [
|
||||
// value: "frame-src 'self'; child-src 'self';object-src 'none'; script-src 'self' 'https://www.googletagmanager.com' unsafe-inline",
|
||||
// },
|
||||
];
|
||||
const buildId = nextBuildId.sync({ dir: __dirname });
|
||||
|
||||
module.exports = {
|
||||
env: {
|
||||
BUILD_ID_ENV: buildId,
|
||||
},
|
||||
swcMinify: false,
|
||||
sassOptions: {
|
||||
includePaths: [
|
||||
@@ -72,10 +77,7 @@ module.exports = {
|
||||
},
|
||||
];
|
||||
},
|
||||
generateBuildId: async () => {
|
||||
// You can, for example, get the latest git commit hash here
|
||||
return "pinswg-build-id";
|
||||
},
|
||||
generateBuildId: () => buildId,
|
||||
poweredByHeader: false,
|
||||
async rewrites() {
|
||||
return [
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
"nanoid": "^3.2.0",
|
||||
"next": "^14.0.1",
|
||||
"next-auth": "^4.24.4",
|
||||
"next-build-id": "^3.0.0",
|
||||
"next-connect": "^0.12.2",
|
||||
"next-redux-wrapper": "^7.0.5",
|
||||
"next-swagger-doc": "^0.4.0",
|
||||
|
||||
+1
-1
@@ -137,7 +137,7 @@ const makeStore = ({ isServer }) => {
|
||||
"watchedCases",
|
||||
"form",
|
||||
],
|
||||
version: 3,
|
||||
version: process.env.BUILD_ID_ENV,
|
||||
storage: storage,
|
||||
stateReconciler: autoMergeLevel2, // if needed, use a safer storage
|
||||
migrate: createMigrate(migrations, { debug: true }),
|
||||
|
||||
Reference in New Issue
Block a user