From 2d1c6bb37a1e748c35812f020fbf1625d29634a0 Mon Sep 17 00:00:00 2001 From: rdbsolutions Date: Wed, 5 Oct 2022 11:18:25 +0100 Subject: [PATCH] update copy on notice banner and blob debug info --- actions/azurestorage.js | 26 ++++++++++--------- actions/index.js | 4 +++ components/noticebanner.js | 2 +- locales/cy/common.json | 3 ++- locales/en/common.json | 3 ++- pages/api/auth/[...nextauth].js | 4 +-- .../api/file/getawaitingsubmissionfromblob.js | 2 +- pages/api/notices/index.js | 4 +-- styles/sass/welshgov/_application.scss | 2 +- 9 files changed, 29 insertions(+), 21 deletions(-) diff --git a/actions/azurestorage.js b/actions/azurestorage.js index eeb42cd0..b61a0e52 100644 --- a/actions/azurestorage.js +++ b/actions/azurestorage.js @@ -270,7 +270,9 @@ export const downloadAllProgressFiles = async ( containerName, progressBlobObj ) => { - //console.log(progressBlobObj); + console.log( + "/////////////////////////\n downloading files: " + progressBlobObj + ); const creds = new DefaultAzureCredential(); const containerClient = new ContainerClient( @@ -286,7 +288,7 @@ export const downloadAllProgressFiles = async ( let blobCount = 0; for (const prop in progressBlobObj) { - //console.log(`${prop}: ${progressBlobObj[prop].path}`); + console.log(`Progress - ${prop}: ${progressBlobObj[prop].path}`); blobClient = containerClient.getBlobClient(progressBlobObj[prop].path); downloadedBlob = await blobClient.download(0); downloaded = @@ -299,7 +301,7 @@ export const downloadAllProgressFiles = async ( downloaded = downloaded.substring(0, downloaded.length - 1); for (const prop in progressBlobObj) { - //console.log(`${prop}: ${progressBlobObj[prop].caseObj}`); + console.log(`Cases - ${prop}: ${progressBlobObj[prop].caseObj}`); blobClient = containerClient.getBlobClient( progressBlobObj[prop].caseObj ); @@ -312,14 +314,14 @@ export const downloadAllProgressFiles = async ( caseDownloaded = caseDownloaded.substring(0, caseDownloaded.length - 1); - return ( + return JSON.parse( '{ "@odata.count": ' + - blobCount + - ',"value": [' + - downloaded + - '],"case":[' + - caseDownloaded + - "]}" + blobCount + + ',"value": [' + + downloaded + + '],"case":[' + + caseDownloaded + + "]}" ); }; @@ -457,7 +459,7 @@ export const getAllProgressBlobs = async (containerName) => { blobCount++; } - //console.log("this is the caasefolder:", caseReference, blobCount); + console.log("this is the caasefolder:", blobCount); let blobObj = []; for await (const blob of containerClient.listBlobsFlat({ @@ -493,7 +495,7 @@ export const getAllProgressBlobs = async (containerName) => { }); } - //console.log("blobObj:", blobObj); + console.log("blobObj:", blobObj); return blobObj; }; diff --git a/actions/index.js b/actions/index.js index aa2c0029..50b6ecaa 100644 --- a/actions/index.js +++ b/actions/index.js @@ -759,6 +759,10 @@ export const getAwaitingSubmission = (loggedInUserId) => { }; export const getAwaitingSubmissionFromBlob = (containerName) => { + console.log( + "///////////////////////\ngetAwaitingSubmissionFromBlob: " + + containerName + ); return axios .get( BASE_URL + diff --git a/components/noticebanner.js b/components/noticebanner.js index 80d76f40..0e4ae22f 100644 --- a/components/noticebanner.js +++ b/components/noticebanner.js @@ -53,7 +53,7 @@ export default function NoticeBanner(props) { hideNotice(); }} > - Hide + {t("common:hide-banner-label")} diff --git a/locales/cy/common.json b/locales/cy/common.json index 20b88f5c..4db6e6e2 100644 --- a/locales/cy/common.json +++ b/locales/cy/common.json @@ -69,5 +69,6 @@ "next-link-button": "nesaf ›", "pages-label": "Tudalen", "of-label": "o", - "change-link-label": "Newid" + "change-link-label": "Newid", + "hide-banner-label": "Cuddio" } \ No newline at end of file diff --git a/locales/en/common.json b/locales/en/common.json index 54896874..f095b702 100644 --- a/locales/en/common.json +++ b/locales/en/common.json @@ -69,5 +69,6 @@ "next-link-button": "next ›", "pages-label": "Page", "of-label": "of", - "change-link-label": "Change" + "change-link-label": "Change", + "hide-banner-label": "Hide" } \ No newline at end of file diff --git a/pages/api/auth/[...nextauth].js b/pages/api/auth/[...nextauth].js index bc4d526a..fd854422 100644 --- a/pages/api/auth/[...nextauth].js +++ b/pages/api/auth/[...nextauth].js @@ -51,7 +51,7 @@ export default NextAuth({ reference: reference, // emailReplyToId: emailReplyToId, }) - .then((response) => console.log(response)) + //.then((response) => console.log(response)) .catch((err) => consoleLogger(err)); }, }), @@ -73,7 +73,7 @@ export default NextAuth({ }, callbacks: { session: async (session, user) => { - console.log(user); + //console.log(user); return Promise.resolve(session); }, }, diff --git a/pages/api/file/getawaitingsubmissionfromblob.js b/pages/api/file/getawaitingsubmissionfromblob.js index 62ffd08a..6b48fa33 100644 --- a/pages/api/file/getawaitingsubmissionfromblob.js +++ b/pages/api/file/getawaitingsubmissionfromblob.js @@ -17,7 +17,7 @@ ApiProxy.get(async (req, res) => { var checkquerypath = "/api/file/getawaitingsubmissionfromblob?container=" + containerName; - // console.log(req.url); + console.log("///////////\ngetawaitingsubmissionblob url :", req.url); // console.log(hashAPIPath(checkquerypath), checkHash); // console.log(hashAPIPath(checkquerypath) == "&hash=" + checkHash); diff --git a/pages/api/notices/index.js b/pages/api/notices/index.js index 6d38d663..c9fc5535 100644 --- a/pages/api/notices/index.js +++ b/pages/api/notices/index.js @@ -4,9 +4,9 @@ const ApiResponse = (req, res) => { "value": [ { "notice_en": - "An update has been made, if you experience problems,refresh your cache,lorem ipsum doooo orem ipsum doooo orem ipsum doooo orem ipsum doooo dah", + "An update has been made to the portal. If you experience problems, try pressing CTRL, Shift and R in your browser (or CMD and R on a Mac), this should force a refresh of your cache.", "notice_cy": - "Mae diweddariad wedi'i wneud, os ydych chi'n cael problemau, adnewyddwch eich storfa, lorem ipsum doooo orem ipsum doooo orem ipsum doooo orem ipsum doooo dah", + "Mae diweddariad wedi'i wneud i'r porth. Os ydych chi'n cael problemau, ceisiwch wasgu CTRL, Shift ac R yn eich porwr (neu CMD ac R ar Mac), dylai hyn orfodi adnewyddiad o'ch storfa.", "dateFrom": "20/09/2022", "dateTo": "20/09/2023", diff --git a/styles/sass/welshgov/_application.scss b/styles/sass/welshgov/_application.scss index 00e3f39c..f3c52fdd 100644 --- a/styles/sass/welshgov/_application.scss +++ b/styles/sass/welshgov/_application.scss @@ -2250,7 +2250,7 @@ fade { //notice banner .noticebanner { - background: $lightgrey_semi; + background: $lightgrey_offwhite; border-left: 10px solid $blue; color: $black; display: flex;