Skip to content

Commit

Permalink
Merge pull request #71 from WojciechBarczynski/@szWozniak/update-04-03
Browse files Browse the repository at this point in the history
last updates
  • Loading branch information
szWozniak authored Jan 21, 2024
2 parents 76e1abe + ed46f0c commit 352ee5e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public PredictService() {

public MilestoneSumUpDto messagePrediction(User user, Addiction addiction, Long daysClean) {
Optional<String> predictedMsg = Optional.empty();
if (addiction.getName().toLowerCase().contains("smoking")) {
if (addiction.getName().toLowerCase().contains("cigarettes")) {
predictedMsg = PredictMicroserviceController.predictLungCancer(user, daysClean);
}

Expand Down
13 changes: 13 additions & 0 deletions frontend/src/pages/addictions/AddictionDetails.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { useEffect, useState } from 'react';
import WarningAmberIcon from '@mui/icons-material/WarningAmber';
import { useParams } from 'react-router';
import { getReportsForAddiction } from 'services/ReportService';
import ThumbUpOffAltIcon from '@mui/icons-material/ThumbUpOffAlt';
Expand Down Expand Up @@ -33,6 +34,18 @@ const AddictionDetails = () => {
</div>
</div>}

{addictionInfo?.milestones?.predictionMsg && <div className="container info warning">
<div className="icon">
<WarningAmberIcon />
</div>
<div className="content">
<div>
{addictionInfo.milestones.predictionMsg}
</div>
</div>
</div>}


{addictionInfo?.reports?.map((report) => (
<div className="container report">
Your friend <b>{report?.nick}</b> noticed you breaking your resolutions!<br />
Expand Down

0 comments on commit 352ee5e

Please sign in to comment.