Commit 315cfe82bd26a563df581e6f731c42203fbdca7c

Authored by kristinlaahneolsen
1 parent c4be2ce9

Liten fiks på å hente ut tittel

Risiko/app/src/main/java/activity/Incident.java
@@ -81,13 +81,15 @@ public class Incident extends AppCompatActivity { @@ -81,13 +81,15 @@ public class Incident extends AppCompatActivity {
81 AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(this); 81 AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(this);
82 alertDialogBuilder.setView(promptView); 82 alertDialogBuilder.setView(promptView);
83 83
  84 +
  85 + TextView tvTitle = promptView.findViewById(R.id.pop_headline);
84 TextView tvDate = promptView.findViewById(R.id.pop_date); 86 TextView tvDate = promptView.findViewById(R.id.pop_date);
85 TextView tvLocation = promptView.findViewById(R.id.pop_place); 87 TextView tvLocation = promptView.findViewById(R.id.pop_place);
86 TextView tvDescription = promptView.findViewById(R.id.pop_description); 88 TextView tvDescription = promptView.findViewById(R.id.pop_description);
87 TextView tvAssociatedRisk = promptView.findViewById(R.id.pop_associated_risk); 89 TextView tvAssociatedRisk = promptView.findViewById(R.id.pop_associated_risk);
88 Button deleteEvent = promptView.findViewById(R.id.pop_delete_event); 90 Button deleteEvent = promptView.findViewById(R.id.pop_delete_event);
89 Button editEvent = promptView.findViewById(R.id.pop_edit_event); 91 Button editEvent = promptView.findViewById(R.id.pop_edit_event);
90 - System.out.println("SE HIT" + chosenItem.getDescription() + chosenItem.getId()); 92 +
91 93
92 //TODO: IMPLEMENTERE DET SLIK AT VI FÅR HENTET UT HVILKEN BRUKER SOM HAR SKREVET SAKEN 94 //TODO: IMPLEMENTERE DET SLIK AT VI FÅR HENTET UT HVILKEN BRUKER SOM HAR SKREVET SAKEN
93 TextView addedBy = promptView.findViewById(R.id.tv_added_by); 95 TextView addedBy = promptView.findViewById(R.id.tv_added_by);
@@ -95,7 +97,7 @@ public class Incident extends AppCompatActivity { @@ -95,7 +97,7 @@ public class Incident extends AppCompatActivity {
95 deleteEvent.setOnClickListener(view -> deleteEventDialog()); 97 deleteEvent.setOnClickListener(view -> deleteEventDialog());
96 editEvent.setOnClickListener(view -> editIncident(chosenItem.getId(), chosenItem.getTitle(), chosenItem.getDate(), chosenItem.getDescription(), chosenItem.getLocation()) ); 98 editEvent.setOnClickListener(view -> editIncident(chosenItem.getId(), chosenItem.getTitle(), chosenItem.getDate(), chosenItem.getDescription(), chosenItem.getLocation()) );
97 99
98 - 100 + tvTitle.setText(chosenItem.getTitle());
99 tvDate.setText(chosenItem.getDate()); 101 tvDate.setText(chosenItem.getDate());
100 tvLocation.setText(chosenItem.getLocation()); 102 tvLocation.setText(chosenItem.getLocation());
101 tvDescription.setText(chosenItem.getDescription()); 103 tvDescription.setText(chosenItem.getDescription());
restApi/.idea/workspace.xml
1 <?xml version="1.0" encoding="UTF-8"?> 1 <?xml version="1.0" encoding="UTF-8"?>
2 <project version="4"> 2 <project version="4">
3 <component name="ChangeListManager"> 3 <component name="ChangeListManager">
4 - <list default="true" id="0e20d303-9de8-4113-bfd9-019e72b304dc" name="Default" comment="">  
5 - <change beforePath="" afterPath="$PROJECT_DIR$/../Risiko/app/src/main/java/activity/EditIncident.java" />  
6 - <change beforePath="" afterPath="$PROJECT_DIR$/../Risiko/app/src/main/res/layout/activity_edit_incident.xml" />  
7 - <change beforePath="$PROJECT_DIR$/../Risiko/app/src/main/AndroidManifest.xml" afterPath="$PROJECT_DIR$/../Risiko/app/src/main/AndroidManifest.xml" />  
8 - <change beforePath="$PROJECT_DIR$/../Risiko/app/src/main/java/activity/Incident.java" afterPath="$PROJECT_DIR$/../Risiko/app/src/main/java/activity/Incident.java" />  
9 - <change beforePath="$PROJECT_DIR$/../Risiko/app/src/main/java/api/Endpoints.java" afterPath="$PROJECT_DIR$/../Risiko/app/src/main/java/api/Endpoints.java" />  
10 - <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />  
11 - </list> 4 + <list default="true" id="0e20d303-9de8-4113-bfd9-019e72b304dc" name="Default" comment="" />
12 <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" /> 5 <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
13 <option name="TRACKING_ENABLED" value="true" /> 6 <option name="TRACKING_ENABLED" value="true" />
14 <option name="SHOW_DIALOG" value="false" /> 7 <option name="SHOW_DIALOG" value="false" />
@@ -55,8 +48,8 @@ @@ -55,8 +48,8 @@
55 <file leaf-file-name="routes.js" pinned="false" current-in-tab="true"> 48 <file leaf-file-name="routes.js" pinned="false" current-in-tab="true">
56 <entry file="file://$PROJECT_DIR$/api/routes/routes.js"> 49 <entry file="file://$PROJECT_DIR$/api/routes/routes.js">
57 <provider selected="true" editor-type-id="text-editor"> 50 <provider selected="true" editor-type-id="text-editor">
58 - <state relative-caret-position="321">  
59 - <caret line="80" column="45" lean-forward="false" selection-start-line="80" selection-start-column="45" selection-end-line="80" selection-end-column="45" /> 51 + <state relative-caret-position="216">
  52 + <caret line="76" column="125" lean-forward="true" selection-start-line="76" selection-start-column="125" selection-end-line="76" selection-end-column="125" />
60 <folding /> 53 <folding />
61 </state> 54 </state>
62 </provider> 55 </provider>
@@ -225,21 +218,22 @@ @@ -225,21 +218,22 @@
225 <workItem from="1541155443683" duration="1473000" /> 218 <workItem from="1541155443683" duration="1473000" />
226 <workItem from="1541596156631" duration="9351000" /> 219 <workItem from="1541596156631" duration="9351000" />
227 <workItem from="1541681303243" duration="9060000" /> 220 <workItem from="1541681303243" duration="9060000" />
228 - <workItem from="1542189792461" duration="4683000" /> 221 + <workItem from="1542189792461" duration="4744000" />
229 </task> 222 </task>
230 <servers /> 223 <servers />
231 </component> 224 </component>
232 <component name="TimeTrackingManager"> 225 <component name="TimeTrackingManager">
233 - <option name="totallyTimeSpent" value="26465000" /> 226 + <option name="totallyTimeSpent" value="26526000" />
234 </component> 227 </component>
235 <component name="ToolWindowManager"> 228 <component name="ToolWindowManager">
236 <frame x="0" y="23" width="1440" height="873" extended-state="0" /> 229 <frame x="0" y="23" width="1440" height="873" extended-state="0" />
  230 + <editor active="true" />
237 <layout> 231 <layout>
238 <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.20014094" sideWeight="0.71128106" order="0" side_tool="false" content_ui="combo" /> 232 <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.20014094" sideWeight="0.71128106" order="0" side_tool="false" content_ui="combo" />
239 <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" /> 233 <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
240 <window_info id="Docker" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" /> 234 <window_info id="Docker" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
241 <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="10" side_tool="true" content_ui="tabs" /> 235 <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="10" side_tool="true" content_ui="tabs" />
242 - <window_info id="Run" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.3277635" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> 236 + <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.3277635" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
243 <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" /> 237 <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
244 <window_info id="npm" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.20014094" sideWeight="0.28871894" order="2" side_tool="true" content_ui="tabs" /> 238 <window_info id="npm" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.20014094" sideWeight="0.28871894" order="2" side_tool="true" content_ui="tabs" />
245 <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> 239 <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
@@ -292,8 +286,8 @@ @@ -292,8 +286,8 @@
292 </entry> 286 </entry>
293 <entry file="file://$PROJECT_DIR$/api/routes/routes.js"> 287 <entry file="file://$PROJECT_DIR$/api/routes/routes.js">
294 <provider selected="true" editor-type-id="text-editor"> 288 <provider selected="true" editor-type-id="text-editor">
295 - <state relative-caret-position="321">  
296 - <caret line="80" column="45" lean-forward="false" selection-start-line="80" selection-start-column="45" selection-end-line="80" selection-end-column="45" /> 289 + <state relative-caret-position="216">
  290 + <caret line="76" column="125" lean-forward="true" selection-start-line="76" selection-start-column="125" selection-end-line="76" selection-end-column="125" />
297 <folding /> 291 <folding />
298 </state> 292 </state>
299 </provider> 293 </provider>