Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision

Target

Select target project
  • web-et-numerique/factory/llle_project/ecolyo
1 result
Select Git revision
Show changes
Commits on Source (5)
......@@ -142,7 +142,7 @@ const ProfileComparator = ({
>
{t('analysis.accessibility.button_go_to_profil')}
</Button>
<StyledIcon icon={PlaceHolderIcon} width="100%" height="60%" />
<StyledIcon icon={PlaceHolderIcon} height={150} />
</div>
)
......
......@@ -49,8 +49,8 @@ exports[`AnalysisConsumption component should be rendered correctly with profile
<svg
aria-hidden="true"
class="styles__icon___23x3R"
height="60%"
width="100%"
height="150"
width="16"
>
<use
xlink:href="#test-file-stub"
......
......@@ -65,4 +65,8 @@
button {
max-width: $width-small-phone;
}
svg {
width: 100%;
}
}
/* eslint-disable jsx-a11y/no-noninteractive-tabindex */
/* eslint-disable jsx-a11y/no-noninteractive-element-interactions */
import { Button } from '@material-ui/core'
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
import { FluidType, TimeStep } from 'enums'
......
......@@ -104,17 +104,16 @@ const ProfileTypeFormDateSelection = ({
setNextStep({ ...profileType, [answerType.attribute]: answer })
}
function handleSelectMonth(event: any) {
function handleSelectMonth(value: string) {
setSelectedMonth({
value: event.target.value,
label: getMonthFullName(parseInt(event.target.value)),
value: value,
label: getMonthFullName(parseInt(value)),
})
setAnswer(buildISODate(selectedYear.toString(), event.target.value))
setAnswer(buildISODate(selectedYear.toString(), value))
}
function handleSelectYear(event: any) {
setSelectedYear(parseInt(event.target.value))
setAnswer(buildISODate(event.target.value, selectedMonth.value))
function handleSelectYear(value: string) {
setAnswer(buildISODate(value, selectedMonth.value))
}
/** If current year, only show past and present months else show full months */
......@@ -139,7 +138,7 @@ const ProfileTypeFormDateSelection = ({
className="month"
defaultValue={selectedMonth.value}
value={selectedMonth.value}
onChange={e => handleSelectMonth(e)}
onChange={e => handleSelectMonth(e.target.value)}
>
{renderMonths.map(month => (
<MenuItem
......@@ -158,7 +157,7 @@ const ProfileTypeFormDateSelection = ({
className="year"
defaultValue={selectedYear}
value={selectedYear}
onChange={e => handleSelectYear(e)}
onChange={e => handleSelectYear(e.target.value)}
>
{selectYears.map(year => (
<MenuItem value={year} key={year} className="date-option">
......
......@@ -12,7 +12,7 @@ export interface Account extends AccountAttributes {
id?: string
_rev?: string
_type?: string
cozyMetadata?: Record<string, any>
cozyMetadata?: Record<string, unknown>
}
export interface SgeAccountData {
consentId: number
......
......@@ -24,7 +24,6 @@ import {
Relation,
RelationEntitiesObject,
TimePeriod,
UserAction,
UserChallenge,
UserChallengeEntity,
UserDuel,
......@@ -718,13 +717,11 @@ export default class ChallengeService {
}
break
case UserChallengeUpdateFlag.ACTION_START:
let userAction: UserAction = userChallenge.action
if (action) {
userAction = actionService.launchAction(action)
}
updatedUserChallenge = {
...userChallenge,
action: userAction,
action: action
? actionService.launchAction(action)
: userChallenge.action,
}
break
case UserChallengeUpdateFlag.ACTION_NOTIFICATION:
......
......@@ -538,6 +538,7 @@ describe('Consumption service', () => {
it('should throw an error when no data is available', async () => {
mockClient
.getStackClient()
// eslint-disable-next-line camelcase
.fetchJSON.mockResolvedValueOnce({ nb_results: 0 })
const result = await consumptionDataManager.fetchAvgTemperature(2023, 5)
expect(result).toBe(null)
......