-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Introduced option to select starting day of the week for Calendar View - Minor performance fixes
- Loading branch information
Showing
14 changed files
with
132 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
- Bump to v0.3.3 | ||
- Bump version number to v0.3.4 | ||
- Introduced option to select starting day of the week for Calendar View | ||
- Minor performance fixes |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
import SettingsHelper from '@/helpers/frontend/classes/SettingsHelper'; | ||
import { setCookie } from '@/helpers/frontend/cookies'; | ||
import { getI18nObject } from '@/helpers/frontend/general'; | ||
import { SETTING_NAME_CALENDAR_START_DAY, getDefaultViewForCalendar } from '@/helpers/frontend/settings'; | ||
import { useEffect, useState } from 'react'; | ||
import Form from 'react-bootstrap/Form'; | ||
import { FULLCALENDAR_VIEWLIST } from '../fullcalendar/FullCalendarHelper'; | ||
import { DAY_ARRAY } from '@/helpers/general'; | ||
import { Col, Row } from 'react-bootstrap'; | ||
|
||
const defaultOptions = FULLCALENDAR_VIEWLIST | ||
|
||
|
||
const i18next = getI18nObject() | ||
|
||
function CalendarStartDayWeek(props:null){ | ||
const [valueofDDL, setValueofDDL] = useState("1") | ||
useEffect(()=>{ | ||
const getVal = async () =>{ | ||
const settingVal:string = await SettingsHelper.getFromServer(SETTING_NAME_CALENDAR_START_DAY) | ||
setCookie(SETTING_NAME_CALENDAR_START_DAY, settingVal) | ||
setValueofDDL(settingVal) | ||
|
||
} | ||
|
||
getVal() | ||
},[]) | ||
|
||
const newStartDaySelected = async (e) =>{ | ||
const value: string = e.target.value | ||
console.log("value", value) | ||
if(value!=""){ | ||
setValueofDDL(value) | ||
//Make request to Server. | ||
if(await SettingsHelper.setKey(SETTING_NAME_CALENDAR_START_DAY, value)==true) | ||
{ | ||
//Save to cookie if the insert was successful. | ||
setCookie(SETTING_NAME_CALENDAR_START_DAY, value) | ||
} | ||
|
||
} | ||
} | ||
|
||
var finalOptions: Object[] = [] | ||
|
||
for(const i in DAY_ARRAY) | ||
{ | ||
finalOptions.push(<option key={DAY_ARRAY[i]} value={i}>{i18next.t(DAY_ARRAY[i])}</option>) | ||
} | ||
|
||
return( | ||
<Row style={{display: "flex", alignItems: "center"}}> | ||
<Col xs={3}> | ||
{i18next.t("START_DAY_CALENDAR_WEEK")} | ||
</Col> | ||
<Col xs={9}> | ||
<Form.Select value={valueofDDL} onChange={newStartDaySelected} > | ||
{finalOptions} | ||
</Form.Select> | ||
</Col> | ||
</Row> | ||
|
||
) | ||
|
||
|
||
|
||
|
||
|
||
} | ||
|
||
export default CalendarStartDayWeek |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
export default function fullDayNameToNumber(nameOfDay){ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters