Compare commits

...

15 Commits

Author SHA1 Message Date
Ahmed Bouhuolia
162ad91547 fix(webapp): handle make journal error when create journal with accounts have different currency 2023-06-11 19:34:24 +02:00
Ahmed Bouhuolia
4d9e3ccfb4 fix(server): disable webpack minification for class name reading 2023-06-08 22:38:43 +02:00
Ahmed Bouhuolia
1bfe19f26c fix: change the default charset value 2023-06-08 13:19:58 +02:00
Ahmed Bouhuolia
a371cedb67 Merge pull request #130 from bigcapitalhq/normalized
fix docker-compose line-ending issue on Windows
2023-06-06 20:40:42 +02:00
Ahmed Bouhuolia
4ed9c36ebd feat: set default value to env vars 2023-06-06 20:37:42 +02:00
ElforJani13
e24b23ce7e 🐛 FIX: 2023-06-06 19:49:25 +02:00
Ahmed Bouhuolia
19fe6e2423 fix: normalize nginx bash the line endings 2023-06-06 18:37:21 +02:00
Ahmed Bouhuolia
aec09f178b Merge pull request #128 from bigcapitalhq/BIG-435-migrate-to-maria-db-v-11
feat: migrate the server to MariaDB
2023-06-04 14:45:47 +02:00
Ahmed Bouhuolia
ffe51bae07 feat: migrate the server to MariaDB 2023-06-04 14:38:53 +02:00
Ahmed Bouhuolia
68231d5edb Merge pull request #125 from bigcapitalhq/docker-compose-env-variables
feat: add env variable to customize the proxy public ports
2023-05-31 20:30:44 +02:00
a.bouhuolia
e1ea5c402c feat: add env variable to customize the proxy public ports 2023-05-31 20:29:37 +02:00
a.bouhuolia
34b2c2c8b4 fix: copy package-lock.json inside the container 2023-05-31 13:07:30 +02:00
a.bouhuolia
5d96fe6aa0 chore(webapp): remove Sentry from webapp 2023-05-31 09:59:35 +02:00
Ameir Abdeldayem
d2b5084b42 chore: fix typo in README file (#124) 2023-05-30 10:46:51 +02:00
a.bouhuolia
81fb0734d5 update CHANGELOG 2023-05-28 15:04:31 +02:00
17 changed files with 56 additions and 62 deletions

View File

@@ -8,26 +8,36 @@ MAIL_FROM_NAME=
MAIL_FROM_ADDRESS= MAIL_FROM_ADDRESS=
# Database # Database
DB_USER= DB_HOST=mysql
DB_HOST= DB_USER=bigcapital
DB_PASSWORD= DB_PASSWORD=bigcapital
DB_CHARSET= DB_ROOT_PASSWORD=root
DB_CHARSET=utf8
# System database # System database
SYSTEM_DB_NAME=bigcapital_system SYSTEM_DB_NAME=bigcapital_system
# SYSTEM_DB_USER=
# SYSTEM_DB_PASSWORD=
# SYSTEM_DB_NAME=
# SYSTEM_DB_CHARSET=
# Tenants databases # Tenant databases
TENANT_DB_NAME_PERFIX=bigcapital_tenant_ TENANT_DB_NAME_PERFIX=bigcapital_tenant_
# TENANT_DB_HOST=
# MongoDB # TENANT_DB_USER=
MONGODB_DATABASE_URL=mongodb://localhost/bigcapital # TENANT_DB_PASSWORD=
# TENANT_DB_CHARSET=
# Authentication
JWT_SECRET=b0JDZW56RnV6aEthb0RGPXVEcUI
# Application # Application
BASE_URL=https://bigcapital.ly BASE_URL=https://bigcapital.ly
CONTACT_US_MAIL=support@bigcapital.ly JWT_SECRET=b0JDZW56RnV6aEthb0RGPXVEcUI
# Jobs MongoDB
MONGODB_DATABASE_URL=mongodb://localhost/bigcapital
# App proxy
PUBLIC_PROXY_PORT=80
PUBLIC_PROXY_SSL_PORT=443
# Agendash # Agendash
AGENDASH_AUTH_USER=agendash AGENDASH_AUTH_USER=agendash

2
.gitattributes vendored Normal file
View File

@@ -0,0 +1,2 @@
docker/nginx/scripts/build-nginx.sh text eol=lf
docker/mariadb/docker-entrypoint.sh text eol=lf

View File

@@ -2,7 +2,7 @@
All notable changes to Bigcapital server-side will be in this file. All notable changes to Bigcapital server-side will be in this file.
## [0.9.1] - 28-06-2023 ## [0.9.1] - 28-05-2023
`@bigcapital/server` `@bigcapital/server`
- fix: deleting ledger entries of manual journal. - fix: deleting ledger entries of manual journal.
@@ -14,7 +14,7 @@ All notable changes to Bigcapital server-side will be in this file.
- fix: auto-increment sale invoices, estiamtes, credit notes, payments and manual journals. - fix: auto-increment sale invoices, estiamtes, credit notes, payments and manual journals.
- refactor: the setup organization form to use binded Formik components. - refactor: the setup organization form to use binded Formik components.
## [0.9.0] - 06-06-2023 ## [0.9.0] - 06-05-2023
`@bigcapital/server` `@bigcapital/server`

View File

@@ -26,6 +26,6 @@ Bigcapital is a smart and open-source accounting and inventory software, Bigcapi
- [Bug Tracker](https://github.com/bigcapitalhq/bigcapital/issues) - Notify us new bugs. - [Bug Tracker](https://github.com/bigcapitalhq/bigcapital/issues) - Notify us new bugs.
- [Source Code](https://github.com/bigcapitalhq/bigcapital) - Github repo. - [Source Code](https://github.com/bigcapitalhq/bigcapital) - Github repo.
# Changlog # Changelog
Please see [Releases](https://github.com/bigcapitalhq/bigcapital/releases) for more information what has changed recently. Please see [Releases](https://github.com/bigcapitalhq/bigcapital/releases) for more information what has changed recently.

View File

@@ -15,8 +15,8 @@ services:
- ./data/logs/nginx/:/var/log/nginx - ./data/logs/nginx/:/var/log/nginx
- ./docker/certbot/certs/:/var/certs - ./docker/certbot/certs/:/var/certs
ports: ports:
- "80:80" - "${PUBLIC_PROXY_PORT:-80}:80"
- "443:443" - "${PUBLIC_PROXY_SSL_PORT:-443}:443"
tty: true tty: true
depends_on: depends_on:
- server - server
@@ -94,12 +94,12 @@ services:
mysql: mysql:
container_name: bigcapital-mysql container_name: bigcapital-mysql
build: build:
context: ./docker/mysql context: ./docker/mariadb
environment: environment:
- MYSQL_DATABASE=${SYSTEM_DB_NAME} - MYSQL_DATABASE=${SYSTEM_DB_NAME}
- MYSQL_USER=${DB_USER} - MYSQL_USER=${DB_USER}
- MYSQL_PASSWORD=${DB_PASSWORD} - MYSQL_PASSWORD=${DB_PASSWORD}
- MYSQL_ROOT_PASSWORD=${DB_PASSWORD} - MYSQL_ROOT_PASSWORD=${DB_ROOT_PASSWORD}
volumes: volumes:
- mysql:/var/lib/mysql - mysql:/var/lib/mysql
expose: expose:

View File

@@ -6,14 +6,14 @@
version: '3.3' version: '3.3'
services: services:
mysql: mariadb:
build: build:
context: ./docker/mysql context: ./docker/mariadb
environment: environment:
- MYSQL_DATABASE=${SYSTEM_DB_NAME} - MYSQL_DATABASE=${SYSTEM_DB_NAME}
- MYSQL_USER=${DB_USER} - MYSQL_USER=${DB_USER}
- MYSQL_PASSWORD=${DB_PASSWORD} - MYSQL_PASSWORD=${DB_PASSWORD}
- MYSQL_ROOT_PASSWORD=${DB_PASSWORD} - MYSQL_ROOT_PASSWORD=${DB_ROOT_PASSWORD}
volumes: volumes:
- mysql:/var/lib/mysql - mysql:/var/lib/mysql
expose: expose:

View File

@@ -1,4 +1,4 @@
FROM mysql:5.7 FROM mariadb:10.2
USER root USER root
ADD my.cnf /etc/mysql/conf.d/my.cnf ADD my.cnf /etc/mysql/conf.d/my.cnf
@@ -17,7 +17,7 @@ ENV MYSQL_ROOT_PASSWORD=$MYSQL_ROOT_PASSWORD
COPY ./init.sql /scripts/init.template.sql COPY ./init.sql /scripts/init.template.sql
COPY ./docker-entrypoint.sh /docker-entrypoint-initdb.d/docker-initialize.sh COPY ./docker-entrypoint.sh /docker-entrypoint-initdb.d/docker-initialize.sh
# The scripts in the docker-entrypoint-initdb.d/ directory are executed as # The scripts in the `docker-entrypoint-initdb.d/` directory are executed as
# the mysql user inside the MySQL Docker container. # the mysql user inside the MySQL Docker container.
RUN chown -R mysql:root /docker-entrypoint-initdb.d RUN chown -R mysql:root /docker-entrypoint-initdb.d
RUN chown -R mysql:root /scripts RUN chown -R mysql:root /scripts

View File

@@ -1,2 +1,3 @@
GRANT ALL PRIVILEGES ON *.* TO '{MYSQL_USER}'@'%' IDENTIFIED BY '{MYSQL_PASSWORD}' WITH GRANT OPTION; GRANT ALL PRIVILEGES ON *.* TO '{MYSQL_USER}'@'%' IDENTIFIED BY '{MYSQL_PASSWORD}' WITH GRANT OPTION;
FLUSH PRIVILEGES; FLUSH PRIVILEGES;

View File

@@ -65,6 +65,9 @@ exports.getCommonWebpackOptions = ({
}, },
], ],
}, },
optimization: {
minimize: false,
},
}; };
if (isDev) { if (isDev) {

View File

@@ -5,10 +5,10 @@ USER root
WORKDIR /app WORKDIR /app
# Install dependencies # Install dependencies
COPY package.json ./ COPY package*.json ./
COPY lerna.json ./ COPY lerna.json ./
COPY ./packages/webapp/package.json /app/packages/webapp/package.json COPY ./packages/webapp/package*.json /app/packages/webapp/
RUN npm install RUN npm install
RUN npm run bootstrap RUN npm run bootstrap

View File

@@ -16,8 +16,6 @@
"@casl/react": "^2.3.0", "@casl/react": "^2.3.0",
"@craco/craco": "^5.9.0", "@craco/craco": "^5.9.0",
"@reduxjs/toolkit": "^1.2.5", "@reduxjs/toolkit": "^1.2.5",
"@sentry/react": "^6.13.2",
"@sentry/tracing": "^6.13.2",
"@testing-library/jest-dom": "^4.2.4", "@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.4.0", "@testing-library/react": "^9.4.0",
"@testing-library/user-event": "^7.2.1", "@testing-library/user-event": "^7.2.1",

View File

@@ -20,24 +20,6 @@
--> -->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" /> <link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<% if (process.env.NODE_ENV === 'production') { %>
<!-- Hotjar Tracking Code for https://app.bigcapital.ly/ -->
<script>
(function (h, o, t, j, a, r) {
h.hj =
h.hj ||
function () {
(h.hj.q = h.hj.q || []).push(arguments);
};
h._hjSettings = { hjid: 2774528, hjsv: 6 };
a = o.getElementsByTagName('head')[0];
r = o.createElement('script');
r.async = 1;
r.src = t + h._hjSettings.hjid + j + h._hjSettings.hjsv;
a.appendChild(r);
})(window, document, 'https://static.hotjar.com/c/hotjar-', '.js?sv=');
</script>
<% } %>
<!-- <!--
Notice the use of %PUBLIC_URL% in the tags above. Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build. It will be replaced with the URL of the `public` folder during the build.
@@ -69,7 +51,5 @@
href="https://cdnjs.cloudflare.com/ajax/libs/flexboxgrid/6.3.1/flexboxgrid.min.css" href="https://cdnjs.cloudflare.com/ajax/libs/flexboxgrid/6.3.1/flexboxgrid.min.css"
type="text/css" type="text/css"
/> />
<!-- <link href="https://cdn.syncfusion.com/ej2/material.css" rel="stylesheet"> -->
<!-- <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" /> -->
</body> </body>
</html> </html>

View File

@@ -28,6 +28,8 @@ const ERROR = {
CREDIT_DEBIT_SUMATION_SHOULD_NOT_EQUAL_ZERO: CREDIT_DEBIT_SUMATION_SHOULD_NOT_EQUAL_ZERO:
'CREDIT.DEBIT.SUMATION.SHOULD.NOT.EQUAL.ZERO', 'CREDIT.DEBIT.SUMATION.SHOULD.NOT.EQUAL.ZERO',
ENTRIES_SHOULD_ASSIGN_WITH_CONTACT: 'ENTRIES_SHOULD_ASSIGN_WITH_CONTACT', ENTRIES_SHOULD_ASSIGN_WITH_CONTACT: 'ENTRIES_SHOULD_ASSIGN_WITH_CONTACT',
COULD_NOT_ASSIGN_DIFFERENT_CURRENCY_TO_ACCOUNTS:
'COULD_NOT_ASSIGN_DIFFERENT_CURRENCY_TO_ACCOUNTS',
}; };
export const MIN_LINES_NUMBER = 1; export const MIN_LINES_NUMBER = 1;
@@ -161,6 +163,15 @@ export const transformErrors = (resErrors, { setErrors, errors }) => {
intl.get('journal_number_is_already_used'), intl.get('journal_number_is_already_used'),
); );
} }
if (
(error = getError(ERROR.COULD_NOT_ASSIGN_DIFFERENT_CURRENCY_TO_ACCOUNTS))
) {
toastMessages.push(
intl.get(
'make_journal.errors.should_add_accounts_in_same_currency_or_base_currency',
),
);
}
setErrors({ ...newErrors }); setErrors({ ...newErrors });
if (toastMessages.length > 0) { if (toastMessages.length > 0) {

View File

@@ -4,8 +4,6 @@ import ReactDOM from 'react-dom';
import { Provider } from 'react-redux'; import { Provider } from 'react-redux';
import { BrowserRouter } from 'react-router-dom'; import { BrowserRouter } from 'react-router-dom';
import { PersistGate } from 'redux-persist/integration/react'; import { PersistGate } from 'redux-persist/integration/react';
import * as Sentry from '@sentry/react';
import { Integrations } from '@sentry/tracing';
import '@/services/yup'; import '@/services/yup';
import App from '@/components/App'; import App from '@/components/App';
@@ -16,16 +14,6 @@ if (process.env.NODE_ENV === 'development') {
const whyDidYouRender = require('@welldone-software/why-did-you-render'); const whyDidYouRender = require('@welldone-software/why-did-you-render');
whyDidYouRender(React, { trackAllPureComponents: false }); whyDidYouRender(React, { trackAllPureComponents: false });
} }
if (process.env.NODE_ENV !== 'development') {
Sentry.init({
dsn: 'https://021bef720bbb4ce2b98f679f72984843@o1021356.ingest.sentry.io/5987236',
integrations: [new Integrations.BrowserTracing()],
// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for performance monitoring.
// We recommend adjusting this value in production
tracesSampleRate: 1.0,
});
}
ReactDOM.render( ReactDOM.render(
<Provider store={store}> <Provider store={store}>

View File

@@ -703,6 +703,7 @@
"email_is_already_used": "The email is already used.", "email_is_already_used": "The email is already used.",
"the_item_categories_has_been_deleted_successfully": "The item categories has been deleted successfully .", "the_item_categories_has_been_deleted_successfully": "The item categories has been deleted successfully .",
"receivable_accounts_should_assign_with_customers": "Receivable accounts should assign with customers.", "receivable_accounts_should_assign_with_customers": "Receivable accounts should assign with customers.",
"make_journal.errors.should_add_accounts_in_same_currency_or_base_currency": "You can only add accounts that have the same selected currency or base currency.",
"delivered": "Delivered", "delivered": "Delivered",
"save_and_deliver": "Save & Deliver", "save_and_deliver": "Save & Deliver",
"deliver_and_new": "Deliver and new", "deliver_and_new": "Deliver and new",