diff --git a/components/publisher/PublisherForm.js b/components/publisher/PublisherForm.js index 99bde59..93c8f9c 100644 --- a/components/publisher/PublisherForm.js +++ b/components/publisher/PublisherForm.js @@ -179,11 +179,11 @@ export default function PublisherForm({ item, me }) { onSubmit={handleSubmit}>
- +
- +
@@ -198,21 +198,21 @@ export default function PublisherForm({ item, me }) { {/* //desiredShiftsPerMonth */}
- +
- +
- +
-
@@ -238,7 +238,7 @@ export default function PublisherForm({ item, me }) {
- +
@@ -254,7 +254,7 @@ export default function PublisherForm({ item, me }) {
- @@ -265,11 +265,11 @@ export default function PublisherForm({ item, me }) {
- +
- +
diff --git a/components/publisher/PublisherSearchBox.js b/components/publisher/PublisherSearchBox.js index 4926504..19f06ac 100644 --- a/components/publisher/PublisherSearchBox.js +++ b/components/publisher/PublisherSearchBox.js @@ -3,7 +3,7 @@ import axiosInstance from '../../src/axiosSecure'; import common from '../../src/helpers/common'; //import { is } from 'date-fns/locale'; -function PublisherSearchBox({ selectedId, onChange, isFocused, filterDate, showSearch = true, showList = false, showAllAuto = false, infoText = " Семеен глава" }) { +function PublisherSearchBox({ id, selectedId, onChange, isFocused, filterDate, showSearch = true, showList = false, showAllAuto = false, infoText = " Семеен глава" }) { const [selectedItem, setSelectedItem] = useState(null); const [searchText, setSearchText] = useState(''); @@ -95,6 +95,7 @@ function PublisherSearchBox({ selectedId, onChange, isFocused, filterDate, showS {showSearch ? ( <> setSearchText(e.target.value)} diff --git a/server.js b/server.js index a2d5ad9..39598f6 100644 --- a/server.js +++ b/server.js @@ -18,7 +18,7 @@ import('get-port').then(module => { process.env.TZ = 'Europe/Sofia'; // Global variable to store the base URL -let baseUrlGlobal; +// let baseUrlGlobal; console.log("initial process.env.APP_ENV = ", process.env.APP_ENV); console.log("initial process.env.NODE_ENV = ", process.env.NODE_ENV); //NODE_ENV can be passed as docker param @@ -93,14 +93,14 @@ nextApp server.use((req, res, next) => { req.headers['x-forwarded-host'] = req.headers['x-forwarded-host'] || req.headers.host; // --------------- - if (!baseUrlGlobal) { - const protocol = req.headers['x-forwarded-proto'] || 'http'; - const host = req.headers.host; - const baseUrl = `${protocol}://${host}`; - baseUrlGlobal = baseUrl; - fs.writeFileSync(path.join(__dirname, 'baseUrl.txt'), baseUrlGlobal, 'utf8'); - console.log("baseUrlGlobal set to: " + baseUrlGlobal); - } + // if (!baseUrlGlobal) { + // const protocol = req.headers['x-forwarded-proto'] || 'http'; + // const host = req.headers.host; + // const baseUrl = `${protocol}://${host}`; + // baseUrlGlobal = baseUrl; + // fs.writeFileSync(path.join(__dirname, 'baseUrl.txt'), baseUrlGlobal, 'utf8'); + // console.log("baseUrlGlobal set to: " + baseUrlGlobal); + // } next(); }); server.use("/favicon.ico", express.static("styles/favicon_io/favicon.ico")); @@ -656,8 +656,6 @@ async function Stat() { } - Stat(); -exports.baseUrlGlobal = baseUrlGlobal; exports.default = nextApp;