-
Notifications
You must be signed in to change notification settings - Fork 7
Orit/settings page #153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Orit/settings page #153
Conversation
…ya/emailFrequency
…ya/timeZoneSettings
…ya/emailFrequency
…imeOut into notifications-preferences
Shira-Abrams
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fiex the commen and inform me please when you finish
client-side/src/App.jsx
Outdated
| const { i18n } = useTranslation(); | ||
|
|
||
| useEffect(()=>{ | ||
| const user={ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
retreive user from redux
|
|
||
|
|
||
|
|
||
| const Messages = ({ currentUser, onUpdate }) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
retrive current user from redux
| Object.entries(messagesData).forEach(([key, value]) => { | ||
| formData.append(key, value); | ||
| }); | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where did you send the data to the server ?
| REACT_APP_BASE_URL='http://localhost:3000' | ||
| REACT_APP_SECRET_CODE_CAPVAL='6Ld5uBoqAAAAAKwPXqo5eanm9ZFSuOoBBSdl00pE' | ||
| REACT_APP_SERVER_URL='http://localhost:5000' | ||
| REACT_APP_SERVER_URL='http://localhost:3000' |
There was a problem hiding this comment.
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
| <RouterProvider router={router} /> | ||
| <SnackbarProvider maxSnack={3}> | ||
| <Provider store={store}> | ||
| <RouterProvider router={router} /> |
There was a problem hiding this comment.
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?
| import axios from 'axios'; | ||
|
|
||
| const url = process.env.REACT_APP_SERVER_URL; | ||
| const url = process.env.REACT_APP_BASE_URL; |
There was a problem hiding this comment.
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?
| const [sendNotificationTime, setSendNotificationTime] = useState(notificationTime); | ||
| const [displayIncomeMessages, setDisplayIncomeMessages] = useState(showIncomeMessages); | ||
| const [displayBrowsingTimeLimit, setDisplayBrowsingTimeLimit] = useState(showBrowsingTimeLimit); | ||
| const { t } = useTranslation(); |
There was a problem hiding this comment.
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
| displayBrowsingTimeLimit:showBrowsingTimeLimit, emailFrequency: initialEmailFrequency, } = currentUser.preference; | ||
| const [emailFrequency, setEmailFrequency] = useState(initialEmailFrequency); | ||
| const [ringtoneFile, setRingtoneFile] = useState(null); | ||
| const url = process.env.REACT_APP_BASE_URL; |
There was a problem hiding this comment.
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?
| @@ -62,8 +64,10 @@ export const deletePreference = async (req, res, next) => { | |||
| if (!PreferenceForDelet) | |||
| return next({ message: 'Preferencs not found !!' }) | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add status code
| export const getAllProfiles = async (req, res) => { | ||
| try { | ||
| const profiles = await Profiles.find().populate('limitedWebsites.websiteId blockedSites').select('-__v'); | ||
| const profiles = await Profiles.find().populate('limitedWebsites.websiteId').select('-__v'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this change related to your task?
| if(!mongoose.Types.ObjectId.isValid(id)) | ||
| return next({message:'id is not valid'}) | ||
| if (!mongoose.Types.ObjectId.isValid(id)) | ||
| return next({ message: 'id is not valid' }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add status codes to all next usages
| req.body.profileImage = req.file.originalname; | ||
|
|
||
|
|
||
| // שינוי פורמט התאריך, נניח אם יש שדה בשם date |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replace to English comment, or remove
|
|
||
| // שינוי פורמט התאריך, נניח אם יש שדה בשם date | ||
| if (req.body.date) { | ||
| req.body.date = moment(req.body.date).format('yyyy-MM-dd'); // החלף בפורמט הרצוי |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replace with English comment, or remove
No description provided.