Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
119 commits
Select commit Hold shift + click to select a range
843c91f
email freq to change
Jul 18, 2024
f130d92
settings email freq
Jul 18, 2024
4ac6859
settings email freq
Jul 18, 2024
a89bef6
add user localization
Jul 19, 2024
2896608
copy commit from email freq
Jul 19, 2024
5ded6ab
add localization
Jul 19, 2024
d9d359e
ask For Permission
Jul 21, 2024
c69db44
check email freq comp
Jul 21, 2024
187373f
Merge remote-tracking branch 'origin/mongo/settings' into Moriya/emai…
Jul 21, 2024
295afe0
Update preference.model.js
moriya2004 Jul 21, 2024
842942c
update package
Jul 21, 2024
4f7a72d
add select for time zone
Jul 22, 2024
8808de5
format date
oritb488 Jul 22, 2024
a6519d7
fix after a review
Jul 22, 2024
028c1d1
add the fixing
Jul 22, 2024
9147309
add ask fer premission
Jul 22, 2024
d177ceb
Merge branch 'main' of https://github.com/SariGlick/TimeOut into Mori…
Jul 22, 2024
890589f
add use effect
Jul 23, 2024
0ae6e0e
Save local changes before pulling remote branch
Jul 23, 2024
f40f872
defualt frpm props
Jul 23, 2024
d26fda1
update fomratDate
oritb488 Jul 24, 2024
9d800fa
complete time zone before review
Jul 24, 2024
6261724
add permission to constants
Jul 24, 2024
1279057
delete user from app
Jul 24, 2024
fc3e8d5
change genericDate
oritb488 Jul 24, 2024
c27ab1a
change genericDate
oritb488 Jul 24, 2024
3ac92d7
Merge branch 'main' of https://github.com/SariGlick/TimeOut into Mori…
Jul 24, 2024
f18c450
Merge branch 'main' of https://github.com/SariGlick/TimeOut into Mori…
Jul 24, 2024
f6c00e2
add input
Shira-Abrams Jul 24, 2024
47db70c
constants and reqired id
Jul 24, 2024
4b45e24
add the changes from email freq
Jul 24, 2024
264b8bc
move branch
Shira-Abrams Jul 24, 2024
f846fc3
pull i18n
Shira-Abrams Jul 24, 2024
ff39dfa
update auto location
Jul 24, 2024
c0280ca
notification for review
Shira-Abrams Jul 25, 2024
b3bdf59
finish change noteTime
Shira-Abrams Jul 25, 2024
74b5c4f
fix again
Shira-Abrams Jul 25, 2024
dc8828b
overview
Shira-Abrams Jul 25, 2024
9f53eae
change genericDate
oritb488 Jul 25, 2024
fd716c4
change genericDate
oritb488 Jul 25, 2024
552e69b
change p
Shira-Abrams Jul 25, 2024
7ca2911
change format date
oritb488 Jul 25, 2024
385827d
create uploadFile
Jul 25, 2024
f29bb8e
before pull
Shira-Abrams Jul 28, 2024
97ee80b
fix after first review
Jul 29, 2024
27551ef
change format date
oritb488 Jul 29, 2024
c59f522
change format date
oritb488 Jul 29, 2024
1995293
change format date
oritb488 Jul 29, 2024
459c43b
change format date
oritb488 Jul 29, 2024
e032adc
design button
Shira-Abrams Jul 30, 2024
8ac58dd
3Dim
Shira-Abrams Jul 30, 2024
b40767e
server change
Shira-Abrams Jul 30, 2024
9e49278
vertical tab ready for friend review
Shira-Abrams Jul 30, 2024
91ae836
fix after review
Jul 30, 2024
89e8724
fix after review
Jul 30, 2024
8d3649e
ready for push
Shira-Abrams Jul 31, 2024
76947da
before pull settingPage
Shira-Abrams Jul 31, 2024
d17a491
Fix date format
oritb488 Jul 31, 2024
75bd770
ready for review friend
Shira-Abrams Jul 31, 2024
37b5bde
Fix date format
oritb488 Jul 31, 2024
9f5677e
Fix date format
oritb488 Jul 31, 2024
285a866
Fix date format
oritb488 Jul 31, 2024
c2a2939
devide for 2 tab
Shira-Abrams Jul 31, 2024
4ba4b9c
add i18ntab
Shira-Abrams Jul 31, 2024
f171e25
fix again
Shira-Abrams Aug 1, 2024
2bc543f
account tab
Shira-Abrams Aug 1, 2024
d3059ba
env change
Shira-Abrams Aug 1, 2024
f5b4af8
fix generic input
Shira-Abrams Aug 1, 2024
5aba1e1
fix header
Shira-Abrams Aug 1, 2024
7fbf33c
fix header
Shira-Abrams Aug 4, 2024
2ba750d
app
Shira-Abrams Aug 4, 2024
bfd4d06
vertical setting page for review
Shira-Abrams Aug 4, 2024
8c05d2c
fix router
Shira-Abrams Aug 4, 2024
aa5eafc
add i18n footer
Shira-Abrams Aug 4, 2024
19afb63
change width tag
Shira-Abrams Aug 4, 2024
37fed04
fdf
Shira-Abrams Aug 4, 2024
a580153
fdf
Shira-Abrams Aug 4, 2024
d7c1244
merge vertical tab
Shira-Abrams Aug 4, 2024
39cd170
change file name
Shira-Abrams Aug 4, 2024
e527fe4
correct file name
Shira-Abrams Aug 4, 2024
8e988c8
merge Moriya/timeZone branch
Aug 4, 2024
c2d9b03
A small correction to vertical_setting_tab
Aug 4, 2024
659ed3d
Rename Preferences.jsx to tempPreferences.jsx
Aug 4, 2024
c7c1b3c
Rename preferences.jsx to Preferences.jsx
moriya2004 Aug 4, 2024
bb4f2a1
Update Settings.jsx
moriya2004 Aug 4, 2024
6dc2536
Delete client-side/src/components/settings/UserLocalization.jsx
moriya2004 Aug 4, 2024
4926158
fix direction
Shira-Abrams Aug 5, 2024
7c46e1f
align
Shira-Abrams Aug 5, 2024
1738f66
pull moriya changes
Shira-Abrams Aug 5, 2024
da981e9
chagnge opn setting
Shira-Abrams Aug 5, 2024
7ff1707
undo directions
Shira-Abrams Aug 5, 2024
9845e42
fixing
Aug 5, 2024
ee47ec1
fix input props
Shira-Abrams Aug 5, 2024
36839ae
update sound
Aug 5, 2024
40bb67d
Merge branch 'vertical_setting_tab' of https://github.com/SariGlick/T…
Aug 5, 2024
c7b8b6a
chagne click tab
Shira-Abrams Aug 5, 2024
65a63c5
update Notifications & Preferences
Aug 5, 2024
bf92c09
add defualt vertical tab
Shira-Abrams Aug 6, 2024
843cc67
fix direction
Shira-Abrams Aug 6, 2024
5f8c011
add button to settings
Aug 6, 2024
d603379
design nonotifications-preferences
Aug 6, 2024
5496346
pull main
Aug 6, 2024
af41c7f
Merge branch 'vertical_setting_tab' of https://github.com/SariGlick/T…
Aug 6, 2024
e12e705
pull vertical_setting_tab
Aug 6, 2024
34a29d0
working update button
Aug 7, 2024
c0f78f8
add preferenceService.js
Aug 7, 2024
3486c1e
select message box
oritb488 Aug 7, 2024
7796128
messages
oritb488 Aug 11, 2024
d747132
Merge branch 'main' of https://github.com/SariGlick/TimeOut into orit…
oritb488 Aug 12, 2024
959e44c
fix messages
oritb488 Aug 12, 2024
42cc1c5
fix messages
oritb488 Aug 12, 2024
4867a0f
fix messages
oritb488 Aug 12, 2024
4b9f5d7
fix messages
oritb488 Aug 12, 2024
04dfd2b
fix messages
oritb488 Aug 13, 2024
3647f26
Resolved merge conflicts
oritb488 Aug 13, 2024
5689cd5
final fix messages
oritb488 Aug 13, 2024
e4e73f2
finish fix messages
oritb488 Aug 14, 2024
1b2a8f7
finish fix messages
oritb488 Aug 14, 2024
db08c23
commit settingsPage
oritb488 Sep 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions .env
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
PORT=5000
password=EuACQK5n92JI3vn4
DB_URL=mongodb+srv://sh3000444:EuACQK5n92JI3vn4@cluster0.2ttcjcg.mongodb.net/?retryWrites=true&w=majority&appName=Cluster0
BCRYPT_SALT=10
JWT_SECRET=aetvbkiy
<<<<<<< HEAD
PORT=3000
password=EuACQK5n92JI3vn4
DB_URL=mongodb+srv://sh3000444:EuACQK5n92JI3vn4@cluster0.2ttcjcg.mongodb.net/?retryWrites=true&w=majority&appName=Cluster0
BCRYPT_SALT=10
JWT_SECRET=aetvbkiy
=======
PORT=5000
password=EuACQK5n92JI3vn4
DB_URL=mongodb+srv://sh3000444:EuACQK5n92JI3vn4@cluster0.2ttcjcg.mongodb.net/?retryWrites=true&w=majority&appName=Cluster0
BCRYPT_SALT=10
JWT_SECRET=aetvbkiy
>>>>>>> bfbcc67dc1c843746542105d3d6332eedff71e83
10 changes: 8 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
.vscode/settings.json
package-lock.json
<<<<<<< HEAD
.vscode/settings.json
package-lock.json
node_modules
=======
.vscode/settings.json
package-lock.json
>>>>>>> bfbcc67dc1c843746542105d3d6332eedff71e83
3 changes: 2 additions & 1 deletion client-side/.env
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
REACT_APP_BASE_URL='http://localhost:3000'
REACT_APP_APOLLO_SERVER_URL='http://localhost:4000'
REACT_APP_SECRET_CODE_CAPVAL='6Ld5uBoqAAAAAKwPXqo5eanm9ZFSuOoBBSdl00pE'
REACT_APP_SERVER_URL='http://localhost:5000'
REACT_APP_SERVER_URL='http://localhost:3000'
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you cant use port 3000 both for server url & base url, please return the port 5000


6 changes: 6 additions & 0 deletions client-side/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,21 @@
"@testing-library/user-event": "^13.5.0",
"@types/redux": "^3.6.31",
"axios": "^1.7.2",
"date-fns": "^3.6.0",
"dayjs": "^1.11.12",
"formik": "^2.4.6",
"html2canvas": "^1.4.1",
"html2pdf.js": "^0.10.2",
"i18next-browser-languagedetector": "^8.0.0",
"i18next-http-backend": "^2.5.2",
"jest": "^29.7.0",
"jspdf": "^2.5.1",
"jspdf-autotable": "^3.8.2",
"moment-timezone": "^0.5.45",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-google-recaptcha": "^3.1.0",
"react-i18next": "^15.0.1",
"react-redux": "^9.1.2",
"react-router-dom": "^6.24.1",
"react-scripts": "5.0.1",
Expand Down Expand Up @@ -65,6 +70,7 @@
]
},
"devDependencies": {
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
"@babel/preset-env": "^7.25.4",
"@babel/preset-react": "^7.24.7",
"@chromatic-com/storybook": "^1.6.0",
Expand Down
64 changes: 44 additions & 20 deletions client-side/public/locales/en/translation.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,47 @@
{
"welcome":"bienvenida {{user-name}}",
"send preferences":" change setting ",
"change-ringtone":"change ringtoe",
"home":"Home",
"settings":"Settings",
"reports":"reports",
"statistics":"statistic",
"profiles":"profiles",
"timeout":"TimeOut",
"sleect-language":"sleect language",
"change-notification-time":"change notification time",
"Acount" :"Acount",
"Notifications" :"Notifications",
"Preference":"Preference",
"Display-Setting" :"Display Setting",
"Message" :"Message",
"account":"Account",
"display-setting":"Display Setting",
"fotter":"© Developed by ExtraTech team. visit us:",
"open-settings":"Open settings"
"welcome": "bienvenida {{user-name}}",
"send preferences": " change setting ",
"change-ringtone": "change ringtoe",
"select language":"select language",
"home": "Home",
"settings": "Settings",
"reports": "reports",
"statistics": "statistic",
"profiles": "profiles",
"timeout": "TimeOut",
"sleect-language": "sleect language",
"change-notification-time": "change notification time",
"Acount": "Acount",
"Notifications": "Notifications",
"Preference": "Preference",
"Display-Setting": "Display Setting",
"Message": "Message",
"account": "Account",
"display-setting": "Display Setting",
"fotter": "© Developed by ExtraTech team. visit us:",
"open-settings": "Open settings",
"Select Email Frequency": "Select Email Frequency",
"never": "never",
"daily": "daily",
"weekly": "weekly",
"monthly": "monthly",
"yearly": "yearly",
"Select Time Zone": "Select Time Zone",
"Update": "Update",
"select date format": "select date format",
"MM-DD-YYYY": "MM-DD-YYYY",
"DD-MM-YYYY": "DD-MM-YYYY",
"YYYY-MM-DD": "YYYY-MM-DD",
"Display notification for income messages": "Display notification for income messages",
"Display browsing time limit notification": "Display browsing time limit notification",
"Message Box":"Message Box",
"Messages Inbox":"Messages Inbox",
"Messages Count":"Messages Count",
"title only":"title only",
"abbreviated message":"abbreviated message",
"full messages":"full messages",
"group by date":"group by date",
"group by read":"group by read",
"group by unread":"group by unread"

}
19 changes: 17 additions & 2 deletions client-side/public/locales/es/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,21 @@
"display-setting": "configuración de pantalla",
"fotter": "© Desarrollado por el equipo ExtraTech. Visítanos:",
"settings": "ajustes",
"open-settings":"Configuración abierta"

"open-settings":"Configuración abierta",
"Select Email Frequency": "Seleccionar frecuencia de correo electrónico",
"never": "nunca",
"daily": "diario",
"weekly": "semanalmente",
"monthly": "mensual",
"yearly": "anual",
"Select Time Zone":"Selecciona la zona horaria",
"Message Box":"Cuadro de mensaje",
"Messages Inbox":"Bandeja de entrada de mensajes",
"Messages Count":"Los mensajes cuentan",
"title only":"solo título",
"abbreviated message":"mensaje abreviado",
"full messages":"mensajes completos",
"group by date":"agrupar por fecha",
"group by read":"agrupar por lectura",
"group by unread":"agrupar por no leídos"
}
63 changes: 42 additions & 21 deletions client-side/public/locales/he/translation.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,44 @@
{
"welcome":" {{user-name}} ברוכה הבאה !!",
"send preferences":"שינוי העדפות",
"change-ringtone":"שנה צליל",
"home":"בית",
"reports":"דוחות",
"statistics":"סטטיסטיקות",
"profiles":"פרופילים",
"timeout":"פסק-זמן",
"sleect-language":"בחר שפה",
"change-notification-time":"שנה זמן קבלת התראות",
"Account" :"Cuenta",
"Notifications" :"התראות",
"Preference":"הגדרות אישיות",
"Display-Setting" :" הגדרות תצוגה",
"Message" :"הודעות",
"account":"חשבון",
"display-setting":"הגדרות תצוגה",
"fotter":"בקרו אותנו ExtraTech פותח עי צות",
"settings":"הגדרות",
"open-settings":"פתח הגדרות"
{ "welcome": " {{user-name}} ברוכה הבאה !!",
"send preferences": "שינוי העדפות",
"change-ringtone": "שנה צליל",
"home": "בית",
"reports": "דוחות",
"statistics": "סטטיסטיקות",
"profiles": "פרופילים",
"timeout": "פסק-זמן",
"select language": "בחר שפה",
"change-notification-time": "שנה זמן קבלת התראות",
"Account": "Cuenta",
"Notifications": "התראות",
"Preference": "הגדרות אישיות",
"Display-Setting": " הגדרות תצוגה",
"Message": "הודעות",
"account": "חשבון",
"display-setting": "הגדרות תצוגה",
"fotter": "בקרו אותנו ExtraTech פותח עי צות",
"settings": "הגדרות",
"open-settings": "פתח הגדרות",
"Select Email Frequency": "בחר תדירות אימייל",
"never": "אף פעם",
"daily": "יומי",
"weekly": "שבועי",
"monthly": "חודשי",
"yearly": "שנתי",
"Select Time Zone": "בחר אזור זמן",
"Update": "עדכן",
"select date format": "בחר פורמט תאריך",
"MM-DD-YYYY": "חודש / יום / שנה",
"DD-MM-YYYY": "שנה / חודש / יום",
"YYYY-MM-DD": "יום / חודש / שנה",
"Display notification for income messages":"הצג התראה עבור הודעות נכנסות",
"Display browsing time limit notification":"הצג הודעת מגבלת זמן גלישה",
"Message Box":"תיבת הודעות",
"Messages Inbox":"הודעות דואר נכנס",
"Messages Count":"מספר הודעות",
"title only":"כותרת בלבד",
"abbreviated message":"הודעה מקוצרת",
"full messages":"הודעות מלאות",
"group by date":"קבץ לפי תאריך",
"group by read":"קבץ לפי נקרא"

}
4 changes: 2 additions & 2 deletions client-side/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ import Footer from './stories/footer/FooterComponent';
import { router } from './router/router.jsx';
import { store } from './redux/store.jsx';
import { SnackbarProvider } from 'notistack';
import Messages from './components/Messages/Messages.jsx';
import './App.scss';

function App() {

return (

<>
<RouterProvider router={router} />
<SnackbarProvider maxSnack={3}>
<Provider store={store}>
<RouterProvider router={router} />
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why did you delete the router?

<Messages/>
<Footer />
</Provider>
</SnackbarProvider>
Expand Down
3 changes: 2 additions & 1 deletion client-side/src/axios/middleware.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import axios from 'axios';

const url = process.env.REACT_APP_SERVER_URL;
const url = process.env.REACT_APP_BASE_URL;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why did you change it?



export async function handleGet(path) {
const response = await axios.create({ baseURL: url }).get(path);
Expand Down
11 changes: 11 additions & 0 deletions client-side/src/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module.exports = {
presets: [
'react-app',

],
plugins: [
'@babel/plugin-proposal-private-property-in-object',

],
};

113 changes: 113 additions & 0 deletions client-side/src/components/settings/Notifications.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
import React, { useState,useEffect } from 'react';
import PropTypes from 'prop-types';
import { useTranslation } from 'react-i18next'
import Select from '../../stories/Select/Select.jsx';
import GenericInput from '../../stories/GenericInput/genericInput.jsx'
import CONSTANTS from './constantSetting.js'
import './Notifications.scss';

const Notifications = ({ currentUser , onUpdate}) => {
const { EMAIL_FREQUENCY_ENUM, TITLES, LABELS } = CONSTANTS;
const { sendNotificationTime:notificationTime, soundVoice:initialSoundVoice,displayIncomeMessages:showIncomeMessages,
displayBrowsingTimeLimit:showBrowsingTimeLimit, emailFrequency: initialEmailFrequency, } = currentUser.preference;
const [emailFrequency, setEmailFrequency] = useState(initialEmailFrequency);
const [ringtoneFile, setRingtoneFile] = useState(null);
const url = process.env.REACT_APP_BASE_URL;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do you have to save it in variable?

const [soundVoice, setSoundVoice] = useState(`${url}/uploads/${initialSoundVoice}`);
const [sendNotificationTime, setSendNotificationTime] = useState(notificationTime);
const [displayIncomeMessages, setDisplayIncomeMessages] = useState(showIncomeMessages);
const [displayBrowsingTimeLimit, setDisplayBrowsingTimeLimit] = useState(showBrowsingTimeLimit);
const { t } = useTranslation();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename t to meaningful name


useEffect(() => {
onUpdate({
emailFrequency,
ringtoneFile,
sendNotificationTime,
displayIncomeMessages,
displayBrowsingTimeLimit
});
}, [emailFrequency, ringtoneFile, sendNotificationTime, displayIncomeMessages, displayBrowsingTimeLimit, onUpdate]);

const handleFileChange = (e) => {
if (e.target.files[0]) {
setRingtoneFile(e.target.files[0]);
setSoundVoice(URL.createObjectURL(e.target.files[0]));
}

};
const handleChangeEmailFreq = (selectedFrequency) => {
if (!Object.keys(EMAIL_FREQUENCY_ENUM).includes(selectedFrequency.toUpperCase())) {
return;
}
setEmailFrequency(selectedFrequency);
};

const changeNotificationTime = (event) => {
setSendNotificationTime(event);
}


return (
<div className="notifications-container">
<div className="notifications-settings">
<GenericInput
label={t(LABELS.DISPLAY_INCOME_MESSAGES)}
type="checkbox"
checked={displayIncomeMessages}
onChange={(e) => setDisplayIncomeMessages(e)}
/>
<GenericInput
label={t(LABELS.DISPLAY_BROWSING_TIME_LIMIT)}
type="checkbox"
checked={displayBrowsingTimeLimit}
onChange={(e) => setDisplayBrowsingTimeLimit(e)}
/>
</div>
<div className="select-container">
<Select
className='select-email-frequency'
options={Object.keys(EMAIL_FREQUENCY_ENUM).map(key => ({
text: t(key.toLowerCase()),
value: EMAIL_FREQUENCY_ENUM[key]
}))}
title={t(TITLES.SELECT_EMAIL_FREQUENCY)}
onChange={handleChangeEmailFreq}
value={emailFrequency}
size='medium'
widthOfSelect='210px'
/>
</div>
<div className="input-container">
<GenericInput
size='medium'
width='210px'
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use only % without pixels

label={t(LABELS.CHANGE_NOTIFICATION_TIME)}
onChange={changeNotificationTime}
value={sendNotificationTime}
type='number'
className='gInput'
min={0} max={60}
/>
</div>
<div className="file-container">
<GenericInput
type='file'
label={t(LABELS.CHANGE_RINGTONE)}
onChange={handleFileChange}
size='medium'
width='210px'
accept='audio/mp3'
/>
<audio controls className="audio-player">
<source src={soundVoice} />
</audio>
</div>
</div>
);
};
Notifications.propTypes = {
currentUser: PropTypes.object.isRequired,
onUpdate: PropTypes.func.isRequired
}
export default Notifications;
Loading