Skip to content

Commit

Permalink
final touches in entryPage for correcting jameKol and Upgrade calcula…
Browse files Browse the repository at this point in the history
…tion
  • Loading branch information
devomid committed Jul 17, 2024
1 parent 7140243 commit 5f55fda
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions src/pages/EntrySection.js
Original file line number Diff line number Diff line change
Expand Up @@ -490,12 +490,17 @@ const EntrySection = () => {

const calculateJameKol = () => {
let total = Number((Number(destPrice) + Number(upgradeDifference) + (Number(tamdidPrice) - Number(motevaliPrice)) + Number(karbaeEzafePrice) + Number(destChandSherkatiPrice) + Number(tabdilBeGhoflPrice) + Number(modulesPrice) + Number(khadamatPrice)) - Number(bargashtiPrice));
console.log(forooshJadid);
if (forooshJadid) {
setJameKol(total);
} else if (!forooshJadid) {
const currentDate = moment();
const differdDate = moment(tamdidDate, 'jYYYY/jMM/jDD');
const daysDifference = currentDate.diff(differdDate, 'days');
if (upgradeDifference) {
setJameKol(upgradeDifference)
return
}
if (daysDifference <= 365) {
setJameKol(total - Number(destPrice) - Number(tamdidPrice) + Number(tashvighiPrice));
} else {
Expand Down
8 changes: 4 additions & 4 deletions src/start.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ let mainWindow

function createWindow() {
mainWindow = new BrowserWindow({
width: 1545,
height: 727,
// width: 1091,
// width: 1545,
// height: 727,
width: 1091,
height: 727,
webPreferences: {
sandbox: false,
nodeIntegration: true,
Expand All @@ -30,7 +30,7 @@ function createWindow() {

mainWindow.setMenuBarVisibility(false)

mainWindow.webContents.openDevTools()
// mainWindow.webContents.openDevTools()

mainWindow.loadURL(
process.env.ELECTRON_START_URL ||
Expand Down

0 comments on commit 5f55fda

Please sign in to comment.