Browse Source

PersonText heading added to list

Andrew Grant 3 months ago
parent
commit
648f558b24

+ 1 - 0
src/main/java/scot/carricksoftware/grants/bootstrap/DataLoadTexts.java

@@ -55,6 +55,7 @@ public class DataLoadTexts {
         personTextCommand.setPerson(personService.findById(1L));
         personTextCommand.setPerson(personService.findById(1L));
         personTextCommand.setOrder(1L);
         personTextCommand.setOrder(1L);
         personTextCommand.setLevel(4L);
         personTextCommand.setLevel(4L);
+        personTextCommand.setHeading("Edinburgh");
 
 
         personTextService.savePersonTextCommand(personTextCommand);
         personTextService.savePersonTextCommand(personTextCommand);
     }
     }

+ 2 - 0
src/main/resources/templates/text/personText/list.html

@@ -26,6 +26,7 @@
                 <th>Person</th>
                 <th>Person</th>
                 <th>Order</th>
                 <th>Order</th>
                 <th>Level</th>
                 <th>Level</th>
+                <th>Heading</th>
                 <th></th>
                 <th></th>
             </tr>
             </tr>
             </thead>
             </thead>
@@ -37,6 +38,7 @@
                 <td th:text="${text.person.toString()}">123</td>
                 <td th:text="${text.person.toString()}">123</td>
                 <td th:text="${text.order}">123</td>
                 <td th:text="${text.order}">123</td>
                 <td th:text="${text.level}">123</td>
                 <td th:text="${text.level}">123</td>
+                <td th:text="${text.heading}">123</td>
                 <td><span>
                 <td><span>
                         <a th:action="delete" class="btn btn-danger btn-sm" href=""
                         <a th:action="delete" class="btn btn-danger btn-sm" href=""
                            th:href="'personTexts/' + ${text.id} + '/delete'"
                            th:href="'personTexts/' + ${text.id} + '/delete'"

+ 1 - 0
src/test/java/scot/carricksoftware/grants/bootstrap/DataLoadTextTest.java

@@ -71,6 +71,7 @@ public class DataLoadTextTest {
         assertEquals(person, captor.getValue().getPerson());
         assertEquals(person, captor.getValue().getPerson());
         assertEquals(1L, captor.getValue().getOrder());
         assertEquals(1L, captor.getValue().getOrder());
         assertEquals(4L, captor.getValue().getLevel());
         assertEquals(4L, captor.getValue().getLevel());
+        assertEquals("Edinburgh", captor.getValue().getHeading());
     }
     }
 
 
     @Test
     @Test