Browse Source

Working JDL

Nathan Hall 5 years ago
parent
commit
5e90df5da5
64 changed files with 88 additions and 413 deletions
  1. 0
    4
      .jhipster/Cohort.json
  2. 0
    4
      .jhipster/Employer.json
  3. 4
    18
      .jhipster/Post.json
  4. 0
    4
      .jhipster/Privacy.json
  5. 0
    20
      .jhipster/UserProfile.json
  6. 2
    23
      jhipster-jdl.jh
  7. 10
    9
      src/main/java/rocks/zipcode/io/domain/Post.java
  8. 13
    12
      src/main/java/rocks/zipcode/io/domain/UserProfile.java
  9. 0
    4
      src/main/java/rocks/zipcode/io/repository/PostRepository.java
  10. 0
    8
      src/main/resources/config/liquibase/changelog/20181217184612_added_entity_UserProfile.xml
  11. 0
    12
      src/main/resources/config/liquibase/changelog/20181217184612_added_entity_constraints_UserProfile.xml
  12. 0
    4
      src/main/resources/config/liquibase/changelog/20181217184613_added_entity_Cohort.xml
  13. 0
    4
      src/main/resources/config/liquibase/changelog/20181217184614_added_entity_Employer.xml
  14. 4
    8
      src/main/resources/config/liquibase/changelog/20181217184615_added_entity_Post.xml
  15. 1
    7
      src/main/resources/config/liquibase/changelog/20181217184615_added_entity_constraints_Post.xml
  16. 0
    4
      src/main/resources/config/liquibase/changelog/20181217184616_added_entity_Privacy.xml
  17. 0
    4
      src/main/webapp/app/entities/cohort/cohort-detail.component.html
  18. 0
    5
      src/main/webapp/app/entities/cohort/cohort-update.component.html
  19. 0
    2
      src/main/webapp/app/entities/cohort/cohort.component.html
  20. 0
    4
      src/main/webapp/app/entities/employer/employer-detail.component.html
  21. 0
    5
      src/main/webapp/app/entities/employer/employer-update.component.html
  22. 0
    2
      src/main/webapp/app/entities/employer/employer.component.html
  23. 3
    9
      src/main/webapp/app/entities/post/post-detail.component.html
  24. 3
    15
      src/main/webapp/app/entities/post/post-update.component.html
  25. 11
    19
      src/main/webapp/app/entities/post/post-update.component.ts
  26. 3
    7
      src/main/webapp/app/entities/post/post.component.html
  27. 1
    2
      src/main/webapp/app/entities/post/post.module.ts
  28. 0
    4
      src/main/webapp/app/entities/privacy/privacy-detail.component.html
  29. 0
    5
      src/main/webapp/app/entities/privacy/privacy-update.component.html
  30. 0
    2
      src/main/webapp/app/entities/privacy/privacy.component.html
  31. 0
    16
      src/main/webapp/app/entities/user-profile/user-profile-detail.component.html
  32. 0
    5
      src/main/webapp/app/entities/user-profile/user-profile-update.component.html
  33. 7
    37
      src/main/webapp/app/entities/user-profile/user-profile-update.component.ts
  34. 0
    14
      src/main/webapp/app/entities/user-profile/user-profile.component.html
  35. 0
    1
      src/main/webapp/app/shared/model/cohort.model.ts
  36. 0
    1
      src/main/webapp/app/shared/model/employer.model.ts
  37. 3
    3
      src/main/webapp/app/shared/model/post.model.ts
  38. 0
    1
      src/main/webapp/app/shared/model/privacy.model.ts
  39. 4
    4
      src/main/webapp/app/shared/model/user-profile.model.ts
  40. 0
    1
      src/main/webapp/i18n/en/cohort.json
  41. 0
    1
      src/main/webapp/i18n/en/employer.json
  42. 1
    3
      src/main/webapp/i18n/en/post.json
  43. 0
    1
      src/main/webapp/i18n/en/privacy.json
  44. 0
    3
      src/main/webapp/i18n/en/userProfile.json
  45. 0
    1
      src/main/webapp/i18n/es/cohort.json
  46. 0
    1
      src/main/webapp/i18n/es/employer.json
  47. 1
    3
      src/main/webapp/i18n/es/post.json
  48. 0
    1
      src/main/webapp/i18n/es/privacy.json
  49. 0
    3
      src/main/webapp/i18n/es/userProfile.json
  50. 0
    9
      src/test/javascript/e2e/entities/cohort/cohort.page-object.ts
  51. 1
    2
      src/test/javascript/e2e/entities/cohort/cohort.spec.ts
  52. 0
    9
      src/test/javascript/e2e/entities/employer/employer.page-object.ts
  53. 0
    2
      src/test/javascript/e2e/entities/employer/employer.spec.ts
  54. 12
    21
      src/test/javascript/e2e/entities/post/post.page-object.ts
  55. 1
    4
      src/test/javascript/e2e/entities/post/post.spec.ts
  56. 0
    9
      src/test/javascript/e2e/entities/privacy/privacy.page-object.ts
  57. 1
    2
      src/test/javascript/e2e/entities/privacy/privacy.spec.ts
  58. 1
    10
      src/test/javascript/e2e/entities/user-profile/user-profile.page-object.ts
  59. 0
    4
      src/test/javascript/e2e/entities/user-profile/user-profile.spec.ts
  60. 1
    3
      src/test/javascript/spec/app/entities/cohort/cohort.service.spec.ts
  61. 0
    2
      src/test/javascript/spec/app/entities/employer/employer.service.spec.ts
  62. 0
    2
      src/test/javascript/spec/app/entities/post/post.service.spec.ts
  63. 0
    2
      src/test/javascript/spec/app/entities/privacy/privacy.service.spec.ts
  64. 0
    2
      src/test/javascript/spec/app/entities/user-profile/user-profile.service.spec.ts

+ 0
- 4
.jhipster/Cohort.json View File

@@ -2,10 +2,6 @@
2 2
     "name": "Cohort",
3 3
     "fields": [
4 4
         {
5
-            "fieldName": "cohortId",
6
-            "fieldType": "Double"
7
-        },
8
-        {
9 5
             "fieldName": "gradDate",
10 6
             "fieldType": "String"
11 7
         }

+ 0
- 4
.jhipster/Employer.json View File

@@ -2,10 +2,6 @@
2 2
     "name": "Employer",
3 3
     "fields": [
4 4
         {
5
-            "fieldName": "employerId",
6
-            "fieldType": "Long"
7
-        },
8
-        {
9 5
             "fieldName": "companyName",
10 6
             "fieldType": "String"
11 7
         },

+ 4
- 18
.jhipster/Post.json View File

@@ -2,10 +2,6 @@
2 2
     "name": "Post",
3 3
     "fields": [
4 4
         {
5
-            "fieldName": "postId",
6
-            "fieldType": "Long"
7
-        },
8
-        {
9 5
             "fieldName": "timestamp",
10 6
             "fieldType": "LocalDate"
11 7
         },
@@ -20,25 +16,15 @@
20 16
     ],
21 17
     "relationships": [
22 18
         {
23
-            "relationshipType": "one-to-one",
19
+            "relationshipType": "many-to-one",
24 20
             "relationshipName": "poster",
25
-            "otherEntityName": "user",
26
-            "otherEntityField": "id",
27
-            "ownerSide": true,
28
-            "otherEntityRelationshipName": "post"
21
+            "otherEntityName": "userProfile",
22
+            "otherEntityField": "id"
29 23
         },
30 24
         {
31
-            "relationshipType": "one-to-one",
25
+            "relationshipType": "many-to-one",
32 26
             "relationshipName": "privacySetting",
33 27
             "otherEntityName": "privacy",
34
-            "otherEntityField": "id",
35
-            "ownerSide": true,
36
-            "otherEntityRelationshipName": "post"
37
-        },
38
-        {
39
-            "relationshipType": "many-to-one",
40
-            "relationshipName": "poster",
41
-            "otherEntityName": "user",
42 28
             "otherEntityField": "id"
43 29
         }
44 30
     ],

+ 0
- 4
.jhipster/Privacy.json View File

@@ -2,10 +2,6 @@
2 2
     "name": "Privacy",
3 3
     "fields": [
4 4
         {
5
-            "fieldName": "privacyId",
6
-            "fieldType": "Long"
7
-        },
8
-        {
9 5
             "fieldName": "publicView",
10 6
             "fieldType": "Boolean"
11 7
         },

+ 0
- 20
.jhipster/UserProfile.json View File

@@ -2,10 +2,6 @@
2 2
     "name": "UserProfile",
3 3
     "fields": [
4 4
         {
5
-            "fieldName": "profileId",
6
-            "fieldType": "Long"
7
-        },
8
-        {
9 5
             "fieldName": "firstName",
10 6
             "fieldType": "String"
11 7
         },
@@ -28,22 +24,6 @@
28 24
             "otherEntityRelationshipName": "userProfile"
29 25
         },
30 26
         {
31
-            "relationshipType": "one-to-one",
32
-            "relationshipName": "cohort",
33
-            "otherEntityName": "cohort",
34
-            "otherEntityField": "id",
35
-            "ownerSide": true,
36
-            "otherEntityRelationshipName": "userProfile"
37
-        },
38
-        {
39
-            "relationshipType": "one-to-one",
40
-            "relationshipName": "employer",
41
-            "otherEntityName": "employer",
42
-            "otherEntityField": "id",
43
-            "ownerSide": true,
44
-            "otherEntityRelationshipName": "userProfile"
45
-        },
46
-        {
47 27
             "relationshipType": "many-to-one",
48 28
             "relationshipName": "employer",
49 29
             "otherEntityName": "employer",

+ 2
- 23
jhipster-jdl.jh View File

@@ -1,35 +1,26 @@
1
-entity User {
2
-	userId Long,
3
-}
4
-
5 1
 entity UserProfile {
6
-	profileId Long,
7 2
     firstName String,
8 3
     lastName String,
9 4
     userStack String,
10 5
 }
11 6
 
12 7
 entity Cohort {
13
-	cohortId Double,
14 8
     gradDate String
15 9
 }
16 10
 
17 11
 entity Employer {
18
-	employerId Long,
19 12
     companyName String,
20 13
     city String,
21 14
     state String
22 15
 }
23 16
 
24 17
 entity Post {
25
-	postId Long,
26 18
     timestamp LocalDate,
27 19
     content String,
28 20
     likes String,
29 21
 }
30 22
 
31 23
 entity Privacy {
32
-	privacyId Long,
33 24
 	publicView Boolean,
34 25
     cohortView Boolean,
35 26
     employerView Boolean
@@ -41,7 +32,7 @@ relationship ManyToOne {
41 32
 }
42 33
 
43 34
 relationship ManyToOne {
44
-    Post{poster} to User
35
+    Post{poster} to UserProfile
45 36
 }
46 37
 
47 38
 relationship ManyToOne {
@@ -52,19 +43,7 @@ relationship OneToOne {
52 43
 	UserProfile{user} to User
53 44
 }
54 45
 
55
-relationship OneToOne {
56
-    Post{poster} to User
57
-}
58
-
59
-relationship OneToOne {
60
-	UserProfile{cohort} to Cohort
61
-}
62
-
63
-relationship OneToOne {
64
-	UserProfile{employer} to Employer
65
-}
66
-
67
-relationship OneToOne {
46
+relationship ManyToOne {
68 47
 	Post{privacySetting} to Privacy
69 48
 }
70 49
 

+ 10
- 9
src/main/java/rocks/zipcode/io/domain/Post.java View File

@@ -33,12 +33,13 @@ public class Post implements Serializable {
33 33
     @Column(name = "likes")
34 34
     private String likes;
35 35
 
36
-    @OneToOne    @JoinColumn(unique = true)
37
-    private Privacy privacySetting;
36
+    @ManyToOne
37
+    @JsonIgnoreProperties("")
38
+    private UserProfile poster;
38 39
 
39 40
     @ManyToOne
40 41
     @JsonIgnoreProperties("")
41
-    private User poster;
42
+    private Privacy privacySetting;
42 43
 
43 44
     // jhipster-needle-entity-add-field - JHipster will add fields here, do not remove
44 45
     public Long getId() {
@@ -88,17 +89,17 @@ public class Post implements Serializable {
88 89
         this.likes = likes;
89 90
     }
90 91
 
91
-    public User getPoster() {
92
+    public UserProfile getPoster() {
92 93
         return poster;
93 94
     }
94 95
 
95
-    public Post poster(User user) {
96
-        this.poster = user;
96
+    public Post poster(UserProfile userProfile) {
97
+        this.poster = userProfile;
97 98
         return this;
98 99
     }
99 100
 
100
-    public void setPoster(User user) {
101
-        this.poster = user;
101
+    public void setPoster(UserProfile userProfile) {
102
+        this.poster = userProfile;
102 103
     }
103 104
 
104 105
     public Privacy getPrivacySetting() {
@@ -113,7 +114,7 @@ public class Post implements Serializable {
113 114
     public void setPrivacySetting(Privacy privacy) {
114 115
         this.privacySetting = privacy;
115 116
     }
116
-
117
+    // jhipster-needle-entity-add-getters-setters - JHipster will add getters and setters here, do not remove
117 118
 
118 119
     @Override
119 120
     public boolean equals(Object o) {

+ 13
- 12
src/main/java/rocks/zipcode/io/domain/UserProfile.java View File

@@ -104,32 +104,33 @@ public class UserProfile implements Serializable {
104 104
         this.user = user;
105 105
     }
106 106
 
107
-    public Cohort getCohort() {
108
-        return cohort;
107
+    public Employer getEmployer() {
108
+        return employer;
109 109
     }
110 110
 
111
-    public UserProfile cohort(Cohort cohort) {
112
-        this.cohort = cohort;
111
+    public UserProfile employer(Employer employer) {
112
+        this.employer = employer;
113 113
         return this;
114 114
     }
115 115
 
116
-    public void setCohort(Cohort cohort) {
117
-        this.cohort = cohort;
118
-    }
119
-
120 116
     public void setEmployer(Employer employer) {
121 117
         this.employer = employer;
122 118
     }
123 119
 
124
-    public Employer getEmployer() {
125
-        return employer;
120
+    public Cohort getCohort() {
121
+        return cohort;
126 122
     }
127 123
 
128
-    public UserProfile employer(Employer employer) {
129
-        this.employer = employer;
124
+    public UserProfile cohort(Cohort cohort) {
125
+        this.cohort = cohort;
130 126
         return this;
131 127
     }
132 128
 
129
+    public void setCohort(Cohort cohort) {
130
+        this.cohort = cohort;
131
+    }
132
+    // jhipster-needle-entity-add-getters-setters - JHipster will add getters and setters here, do not remove
133
+
133 134
     @Override
134 135
     public boolean equals(Object o) {
135 136
         if (this == o) {

+ 0
- 4
src/main/java/rocks/zipcode/io/repository/PostRepository.java View File

@@ -4,7 +4,6 @@ import rocks.zipcode.io.domain.Post;
4 4
 import org.springframework.data.jpa.repository.*;
5 5
 import org.springframework.stereotype.Repository;
6 6
 
7
-import java.util.List;
8 7
 
9 8
 /**
10 9
  * Spring Data  repository for the Post entity.
@@ -13,7 +12,4 @@ import java.util.List;
13 12
 @Repository
14 13
 public interface PostRepository extends JpaRepository<Post, Long> {
15 14
 
16
-    @Query("select post from Post post where post.poster.login = ?#{principal.username}")
17
-    List<Post> findByPosterIsCurrentUser();
18
-
19 15
 }

+ 0
- 8
src/main/resources/config/liquibase/changelog/20181217184612_added_entity_UserProfile.xml View File

@@ -22,10 +22,6 @@
22 22
             <column name="id" type="bigint" autoIncrement="${autoIncrement}">
23 23
                 <constraints primaryKey="true" nullable="false"/>
24 24
             </column>
25
-            <column name="profile_id" type="bigint">
26
-                <constraints nullable="true" />
27
-            </column>
28
-
29 25
             <column name="first_name" type="varchar(255)">
30 26
                 <constraints nullable="true" />
31 27
             </column>
@@ -39,10 +35,6 @@
39 35
             </column>
40 36
             <column name="user_id" type="bigint">
41 37
                 <constraints unique="true" nullable="true" uniqueConstraintName="ux_user_profile_user_id" />
42
-            </column>            <column name="cohort_id" type="bigint">
43
-                <constraints unique="true" nullable="true" uniqueConstraintName="ux_user_profile_cohort_id" />
44
-            </column>            <column name="employer_id" type="bigint">
45
-                <constraints unique="true" nullable="true" uniqueConstraintName="ux_user_profile_employer_id" />
46 38
             </column>
47 39
             <column name="employer_id" type="bigint">
48 40
                 <constraints nullable="true" />

+ 0
- 12
src/main/resources/config/liquibase/changelog/20181217184612_added_entity_constraints_UserProfile.xml View File

@@ -14,18 +14,6 @@
14 14
                                  referencedColumnNames="id"
15 15
                                  referencedTableName="jhi_user"/>
16 16
 
17
-        <addForeignKeyConstraint baseColumnNames="cohort_id"
18
-                                 baseTableName="user_profile"
19
-                                 constraintName="fk_user_profile_cohort_id"
20
-                                 referencedColumnNames="id"
21
-                                 referencedTableName="cohort"/>
22
-
23
-        <addForeignKeyConstraint baseColumnNames="employer_id"
24
-                                 baseTableName="user_profile"
25
-                                 constraintName="fk_user_profile_employer_id"
26
-                                 referencedColumnNames="id"
27
-                                 referencedTableName="employer"/>
28
-
29 17
         <addForeignKeyConstraint baseColumnNames="employer_id"
30 18
                                  baseTableName="user_profile"
31 19
                                  constraintName="fk_user_profile_employer_id"

+ 0
- 4
src/main/resources/config/liquibase/changelog/20181217184613_added_entity_Cohort.xml View File

@@ -22,10 +22,6 @@
22 22
             <column name="id" type="bigint" autoIncrement="${autoIncrement}">
23 23
                 <constraints primaryKey="true" nullable="false"/>
24 24
             </column>
25
-            <column name="cohort_id" type="double">
26
-                <constraints nullable="true" />
27
-            </column>
28
-
29 25
             <column name="grad_date" type="varchar(255)">
30 26
                 <constraints nullable="true" />
31 27
             </column>

+ 0
- 4
src/main/resources/config/liquibase/changelog/20181217184614_added_entity_Employer.xml View File

@@ -22,10 +22,6 @@
22 22
             <column name="id" type="bigint" autoIncrement="${autoIncrement}">
23 23
                 <constraints primaryKey="true" nullable="false"/>
24 24
             </column>
25
-            <column name="employer_id" type="bigint">
26
-                <constraints nullable="true" />
27
-            </column>
28
-
29 25
             <column name="company_name" type="varchar(255)">
30 26
                 <constraints nullable="true" />
31 27
             </column>

+ 4
- 8
src/main/resources/config/liquibase/changelog/20181217184615_added_entity_Post.xml View File

@@ -22,10 +22,6 @@
22 22
             <column name="id" type="bigint" autoIncrement="${autoIncrement}">
23 23
                 <constraints primaryKey="true" nullable="false"/>
24 24
             </column>
25
-            <column name="post_id" type="bigint">
26
-                <constraints nullable="true" />
27
-            </column>
28
-
29 25
             <column name="jhi_timestamp" type="date">
30 26
                 <constraints nullable="true" />
31 27
             </column>
@@ -37,12 +33,12 @@
37 33
             <column name="likes" type="varchar(255)">
38 34
                 <constraints nullable="true" />
39 35
             </column>
36
+
40 37
             <column name="poster_id" type="bigint">
41
-                <constraints unique="true" nullable="true" uniqueConstraintName="ux_post_poster_id" />
42
-            </column>            <column name="privacy_setting_id" type="bigint">
43
-                <constraints unique="true" nullable="true" uniqueConstraintName="ux_post_privacy_setting_id" />
38
+                <constraints nullable="true" />
44 39
             </column>
45
-            <column name="poster_id" type="bigint">
40
+
41
+            <column name="privacy_setting_id" type="bigint">
46 42
                 <constraints nullable="true" />
47 43
             </column>
48 44
 

+ 1
- 7
src/main/resources/config/liquibase/changelog/20181217184615_added_entity_constraints_Post.xml View File

@@ -12,7 +12,7 @@
12 12
                                  baseTableName="post"
13 13
                                  constraintName="fk_post_poster_id"
14 14
                                  referencedColumnNames="id"
15
-                                 referencedTableName="jhi_user"/>
15
+                                 referencedTableName="user_profile"/>
16 16
 
17 17
         <addForeignKeyConstraint baseColumnNames="privacy_setting_id"
18 18
                                  baseTableName="post"
@@ -20,11 +20,5 @@
20 20
                                  referencedColumnNames="id"
21 21
                                  referencedTableName="privacy"/>
22 22
 
23
-        <addForeignKeyConstraint baseColumnNames="poster_id"
24
-                                 baseTableName="post"
25
-                                 constraintName="fk_post_poster_id"
26
-                                 referencedColumnNames="id"
27
-                                 referencedTableName="jhi_user"/>
28
-
29 23
     </changeSet>
30 24
 </databaseChangeLog>

+ 0
- 4
src/main/resources/config/liquibase/changelog/20181217184616_added_entity_Privacy.xml View File

@@ -22,10 +22,6 @@
22 22
             <column name="id" type="bigint" autoIncrement="${autoIncrement}">
23 23
                 <constraints primaryKey="true" nullable="false"/>
24 24
             </column>
25
-            <column name="privacy_id" type="bigint">
26
-                <constraints nullable="true" />
27
-            </column>
28
-
29 25
             <column name="public_view" type="bit">
30 26
                 <constraints nullable="true" />
31 27
             </column>

+ 0
- 4
src/main/webapp/app/entities/cohort/cohort-detail.component.html View File

@@ -5,10 +5,6 @@
5 5
             <hr>
6 6
             <jhi-alert-error></jhi-alert-error>
7 7
             <dl class="row-md jh-entity-details">
8
-                <dt><span jhiTranslate="zipConnectApp.cohort.cohortId">Cohort Id</span></dt>
9
-                <dd>
10
-                    <span>{{cohort.cohortId}}</span>
11
-                </dd>
12 8
                 <dt><span jhiTranslate="zipConnectApp.cohort.gradDate">Grad Date</span></dt>
13 9
                 <dd>
14 10
                     <span>{{cohort.gradDate}}</span>

+ 0
- 5
src/main/webapp/app/entities/cohort/cohort-update.component.html View File

@@ -10,11 +10,6 @@
10 10
                         [(ngModel)]="cohort.id" readonly />
11 11
                 </div>
12 12
                 <div class="form-group">
13
-                    <label class="form-control-label" jhiTranslate="zipConnectApp.cohort.cohortId" for="field_cohortId">Cohort Id</label>
14
-                    <input type="number" class="form-control" name="cohortId" id="field_cohortId"
15
-                        [(ngModel)]="cohort.cohortId" />
16
-                </div>
17
-                <div class="form-group">
18 13
                     <label class="form-control-label" jhiTranslate="zipConnectApp.cohort.gradDate" for="field_gradDate">Grad Date</label>
19 14
                     <input type="text" class="form-control" name="gradDate" id="field_gradDate"
20 15
                         [(ngModel)]="cohort.gradDate" />

+ 0
- 2
src/main/webapp/app/entities/cohort/cohort.component.html View File

@@ -15,7 +15,6 @@
15 15
             <thead>
16 16
             <tr>
17 17
             <th><span jhiTranslate="global.field.id">ID</span></th>
18
-            <th><span jhiTranslate="zipConnectApp.cohort.cohortId">Cohort Id</span></th>
19 18
             <th><span jhiTranslate="zipConnectApp.cohort.gradDate">Grad Date</span></th>
20 19
             <th></th>
21 20
             </tr>
@@ -23,7 +22,6 @@
23 22
             <tbody>
24 23
             <tr *ngFor="let cohort of cohorts ;trackBy: trackId">
25 24
                 <td><a [routerLink]="['/cohort', cohort.id, 'view' ]">{{cohort.id}}</a></td>
26
-                <td>{{cohort.cohortId}}</td>
27 25
                 <td>{{cohort.gradDate}}</td>
28 26
                 <td class="text-right">
29 27
                     <div class="btn-group flex-btn-group-container">

+ 0
- 4
src/main/webapp/app/entities/employer/employer-detail.component.html View File

@@ -5,10 +5,6 @@
5 5
             <hr>
6 6
             <jhi-alert-error></jhi-alert-error>
7 7
             <dl class="row-md jh-entity-details">
8
-                <dt><span jhiTranslate="zipConnectApp.employer.employerId">Employer Id</span></dt>
9
-                <dd>
10
-                    <span>{{employer.employerId}}</span>
11
-                </dd>
12 8
                 <dt><span jhiTranslate="zipConnectApp.employer.companyName">Company Name</span></dt>
13 9
                 <dd>
14 10
                     <span>{{employer.companyName}}</span>

+ 0
- 5
src/main/webapp/app/entities/employer/employer-update.component.html View File

@@ -10,11 +10,6 @@
10 10
                         [(ngModel)]="employer.id" readonly />
11 11
                 </div>
12 12
                 <div class="form-group">
13
-                    <label class="form-control-label" jhiTranslate="zipConnectApp.employer.employerId" for="field_employerId">Employer Id</label>
14
-                    <input type="number" class="form-control" name="employerId" id="field_employerId"
15
-                        [(ngModel)]="employer.employerId" />
16
-                </div>
17
-                <div class="form-group">
18 13
                     <label class="form-control-label" jhiTranslate="zipConnectApp.employer.companyName" for="field_companyName">Company Name</label>
19 14
                     <input type="text" class="form-control" name="companyName" id="field_companyName"
20 15
                         [(ngModel)]="employer.companyName" />

+ 0
- 2
src/main/webapp/app/entities/employer/employer.component.html View File

@@ -15,7 +15,6 @@
15 15
             <thead>
16 16
             <tr>
17 17
             <th><span jhiTranslate="global.field.id">ID</span></th>
18
-            <th><span jhiTranslate="zipConnectApp.employer.employerId">Employer Id</span></th>
19 18
             <th><span jhiTranslate="zipConnectApp.employer.companyName">Company Name</span></th>
20 19
             <th><span jhiTranslate="zipConnectApp.employer.city">City</span></th>
21 20
             <th><span jhiTranslate="zipConnectApp.employer.state">State</span></th>
@@ -25,7 +24,6 @@
25 24
             <tbody>
26 25
             <tr *ngFor="let employer of employers ;trackBy: trackId">
27 26
                 <td><a [routerLink]="['/employer', employer.id, 'view' ]">{{employer.id}}</a></td>
28
-                <td>{{employer.employerId}}</td>
29 27
                 <td>{{employer.companyName}}</td>
30 28
                 <td>{{employer.city}}</td>
31 29
                 <td>{{employer.state}}</td>

+ 3
- 9
src/main/webapp/app/entities/post/post-detail.component.html View File

@@ -5,10 +5,6 @@
5 5
             <hr>
6 6
             <jhi-alert-error></jhi-alert-error>
7 7
             <dl class="row-md jh-entity-details">
8
-                <dt><span jhiTranslate="zipConnectApp.post.postId">Post Id</span></dt>
9
-                <dd>
10
-                    <span>{{post.postId}}</span>
11
-                </dd>
12 8
                 <dt><span jhiTranslate="zipConnectApp.post.timestamp">Timestamp</span></dt>
13 9
                 <dd>
14 10
                     <span>{{post.timestamp}}</span>
@@ -23,7 +19,9 @@
23 19
                 </dd>
24 20
                 <dt><span jhiTranslate="zipConnectApp.post.poster">Poster</span></dt>
25 21
                 <dd>
26
-                    {{post.poster?.id}}
22
+                    <div *ngIf="post.poster">
23
+                        <a [routerLink]="['/user-profile', post.poster?.id, 'view']">{{post.poster?.id}}</a>
24
+                    </div>
27 25
                 </dd>
28 26
                 <dt><span jhiTranslate="zipConnectApp.post.privacySetting">Privacy Setting</span></dt>
29 27
                 <dd>
@@ -31,10 +29,6 @@
31 29
                         <a [routerLink]="['/privacy', post.privacySetting?.id, 'view']">{{post.privacySetting?.id}}</a>
32 30
                     </div>
33 31
                 </dd>
34
-                <dt><span jhiTranslate="zipConnectApp.post.poster">Poster</span></dt>
35
-                <dd>
36
-                    {{post.poster?.id}}
37
-                </dd>
38 32
             </dl>
39 33
 
40 34
             <button type="submit"

+ 3
- 15
src/main/webapp/app/entities/post/post-update.component.html View File

@@ -10,11 +10,6 @@
10 10
                         [(ngModel)]="post.id" readonly />
11 11
                 </div>
12 12
                 <div class="form-group">
13
-                    <label class="form-control-label" jhiTranslate="zipConnectApp.post.postId" for="field_postId">Post Id</label>
14
-                    <input type="number" class="form-control" name="postId" id="field_postId"
15
-                        [(ngModel)]="post.postId" />
16
-                </div>
17
-                <div class="form-group">
18 13
                     <label class="form-control-label" jhiTranslate="zipConnectApp.post.timestamp" for="field_timestamp">Timestamp</label>
19 14
                     <div class="input-group">
20 15
                         <input id="field_timestamp" type="text" class="form-control" name="timestamp" ngbDatepicker  #timestampDp="ngbDatepicker" [(ngModel)]="post.timestamp"
@@ -39,21 +34,14 @@
39 34
                     <label class="form-control-label" jhiTranslate="zipConnectApp.post.poster" for="field_poster">Poster</label>
40 35
                     <select class="form-control" id="field_poster" name="poster" [(ngModel)]="post.poster" >
41 36
                         <option [ngValue]="null"></option>
42
-                        <option [ngValue]="userOption.id === post.poster?.id ? post.poster : userOption" *ngFor="let userOption of users; trackBy: trackUserById">{{userOption.id}}</option>
37
+                        <option [ngValue]="userProfileOption.id === post.poster?.id ? post.poster : userProfileOption" *ngFor="let userProfileOption of userprofiles; trackBy: trackUserProfileById">{{userProfileOption.id}}</option>
43 38
                     </select>
44 39
                 </div>
45 40
                 <div class="form-group">
46 41
                     <label class="form-control-label" jhiTranslate="zipConnectApp.post.privacySetting" for="field_privacySetting">Privacy Setting</label>
47
-                    <select class="form-control" id="field_privacySetting" name="privacySetting" [(ngModel)]="post.privacySetting">
48
-                        <option [ngValue]="null"></option>
49
-                        <option [ngValue]="privacyOption.id === post.privacySetting?.id ? post.privacySetting : privacyOption" *ngFor="let privacyOption of privacysettings; trackBy: trackPrivacyById">{{privacyOption.id}}</option>
50
-                    </select>
51
-                </div>
52
-                <div class="form-group">
53
-                    <label class="form-control-label" jhiTranslate="zipConnectApp.post.poster" for="field_poster">Poster</label>
54
-                    <select class="form-control" id="field_poster" name="poster" [(ngModel)]="post.poster" >
42
+                    <select class="form-control" id="field_privacySetting" name="privacySetting" [(ngModel)]="post.privacySetting" >
55 43
                         <option [ngValue]="null"></option>
56
-                        <option [ngValue]="userOption.id === post.poster?.id ? post.poster : userOption" *ngFor="let userOption of users; trackBy: trackUserById">{{userOption.id}}</option>
44
+                        <option [ngValue]="privacyOption.id === post.privacySetting?.id ? post.privacySetting : privacyOption" *ngFor="let privacyOption of privacies; trackBy: trackPrivacyById">{{privacyOption.id}}</option>
57 45
                     </select>
58 46
                 </div>
59 47
             </div>

+ 11
- 19
src/main/webapp/app/entities/post/post-update.component.ts View File

@@ -7,7 +7,8 @@ import { JhiAlertService } from 'ng-jhipster';
7 7
 
8 8
 import { IPost } from 'app/shared/model/post.model';
9 9
 import { PostService } from './post.service';
10
-import { IUser, UserService } from 'app/core';
10
+import { IUserProfile } from 'app/shared/model/user-profile.model';
11
+import { UserProfileService } from 'app/entities/user-profile';
11 12
 import { IPrivacy } from 'app/shared/model/privacy.model';
12 13
 import { PrivacyService } from 'app/entities/privacy';
13 14
 
@@ -19,15 +20,15 @@ export class PostUpdateComponent implements OnInit {
19 20
     post: IPost;
20 21
     isSaving: boolean;
21 22
 
22
-    users: IUser[];
23
+    userprofiles: IUserProfile[];
23 24
 
24
-    privacysettings: IPrivacy[];
25
+    privacies: IPrivacy[];
25 26
     timestampDp: any;
26 27
 
27 28
     constructor(
28 29
         private jhiAlertService: JhiAlertService,
29 30
         private postService: PostService,
30
-        private userService: UserService,
31
+        private userProfileService: UserProfileService,
31 32
         private privacyService: PrivacyService,
32 33
         private activatedRoute: ActivatedRoute
33 34
     ) {}
@@ -37,24 +38,15 @@ export class PostUpdateComponent implements OnInit {
37 38
         this.activatedRoute.data.subscribe(({ post }) => {
38 39
             this.post = post;
39 40
         });
40
-        this.userService.query().subscribe(
41
-            (res: HttpResponse<IUser[]>) => {
42
-                this.users = res.body;
41
+        this.userProfileService.query().subscribe(
42
+            (res: HttpResponse<IUserProfile[]>) => {
43
+                this.userprofiles = res.body;
43 44
             },
44 45
             (res: HttpErrorResponse) => this.onError(res.message)
45 46
         );
46
-        this.privacyService.query({ filter: 'post-is-null' }).subscribe(
47
+        this.privacyService.query().subscribe(
47 48
             (res: HttpResponse<IPrivacy[]>) => {
48
-                if (!this.post.privacySetting || !this.post.privacySetting.id) {
49
-                    this.privacysettings = res.body;
50
-                } else {
51
-                    this.privacyService.find(this.post.privacySetting.id).subscribe(
52
-                        (subRes: HttpResponse<IPrivacy>) => {
53
-                            this.privacysettings = [subRes.body].concat(res.body);
54
-                        },
55
-                        (subRes: HttpErrorResponse) => this.onError(subRes.message)
56
-                    );
57
-                }
49
+                this.privacies = res.body;
58 50
             },
59 51
             (res: HttpErrorResponse) => this.onError(res.message)
60 52
         );
@@ -90,7 +82,7 @@ export class PostUpdateComponent implements OnInit {
90 82
         this.jhiAlertService.error(errorMessage, null, null);
91 83
     }
92 84
 
93
-    trackUserById(index: number, item: IUser) {
85
+    trackUserProfileById(index: number, item: IUserProfile) {
94 86
         return item.id;
95 87
     }
96 88
 

+ 3
- 7
src/main/webapp/app/entities/post/post.component.html View File

@@ -15,34 +15,30 @@
15 15
             <thead>
16 16
             <tr>
17 17
             <th><span jhiTranslate="global.field.id">ID</span></th>
18
-            <th><span jhiTranslate="zipConnectApp.post.postId">Post Id</span></th>
19 18
             <th><span jhiTranslate="zipConnectApp.post.timestamp">Timestamp</span></th>
20 19
             <th><span jhiTranslate="zipConnectApp.post.content">Content</span></th>
21 20
             <th><span jhiTranslate="zipConnectApp.post.likes">Likes</span></th>
22 21
             <th><span jhiTranslate="zipConnectApp.post.poster">Poster</span></th>
23 22
             <th><span jhiTranslate="zipConnectApp.post.privacySetting">Privacy Setting</span></th>
24
-            <th><span jhiTranslate="zipConnectApp.post.poster">Poster</span></th>
25 23
             <th></th>
26 24
             </tr>
27 25
             </thead>
28 26
             <tbody>
29 27
             <tr *ngFor="let post of posts ;trackBy: trackId">
30 28
                 <td><a [routerLink]="['/post', post.id, 'view' ]">{{post.id}}</a></td>
31
-                <td>{{post.postId}}</td>
32 29
                 <td>{{post.timestamp | date:'mediumDate'}}</td>
33 30
                 <td>{{post.content}}</td>
34 31
                 <td>{{post.likes}}</td>
35 32
                 <td>
36
-                    {{post.poster?.id}}
33
+                    <div *ngIf="post.poster">
34
+                        <a [routerLink]="['../user-profile', post.poster?.id, 'view' ]" >{{post.poster?.id}}</a>
35
+                    </div>
37 36
                 </td>
38 37
                 <td>
39 38
                     <div *ngIf="post.privacySetting">
40 39
                         <a [routerLink]="['../privacy', post.privacySetting?.id, 'view' ]" >{{post.privacySetting?.id}}</a>
41 40
                     </div>
42 41
                 </td>
43
-                <td>
44
-                    {{post.poster?.id}}
45
-                </td>
46 42
                 <td class="text-right">
47 43
                     <div class="btn-group flex-btn-group-container">
48 44
                         <button type="submit"

+ 1
- 2
src/main/webapp/app/entities/post/post.module.ts View File

@@ -2,7 +2,6 @@ import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
2 2
 import { RouterModule } from '@angular/router';
3 3
 
4 4
 import { ZipConnectSharedModule } from 'app/shared';
5
-import { ZipConnectAdminModule } from 'app/admin/admin.module';
6 5
 import {
7 6
     PostComponent,
8 7
     PostDetailComponent,
@@ -16,7 +15,7 @@ import {
16 15
 const ENTITY_STATES = [...postRoute, ...postPopupRoute];
17 16
 
18 17
 @NgModule({
19
-    imports: [ZipConnectSharedModule, ZipConnectAdminModule, RouterModule.forChild(ENTITY_STATES)],
18
+    imports: [ZipConnectSharedModule, RouterModule.forChild(ENTITY_STATES)],
20 19
     declarations: [PostComponent, PostDetailComponent, PostUpdateComponent, PostDeleteDialogComponent, PostDeletePopupComponent],
21 20
     entryComponents: [PostComponent, PostUpdateComponent, PostDeleteDialogComponent, PostDeletePopupComponent],
22 21
     schemas: [CUSTOM_ELEMENTS_SCHEMA]

+ 0
- 4
src/main/webapp/app/entities/privacy/privacy-detail.component.html View File

@@ -5,10 +5,6 @@
5 5
             <hr>
6 6
             <jhi-alert-error></jhi-alert-error>
7 7
             <dl class="row-md jh-entity-details">
8
-                <dt><span jhiTranslate="zipConnectApp.privacy.privacyId">Privacy Id</span></dt>
9
-                <dd>
10
-                    <span>{{privacy.privacyId}}</span>
11
-                </dd>
12 8
                 <dt><span jhiTranslate="zipConnectApp.privacy.publicView">Public View</span></dt>
13 9
                 <dd>
14 10
                     <span>{{privacy.publicView}}</span>

+ 0
- 5
src/main/webapp/app/entities/privacy/privacy-update.component.html View File

@@ -10,11 +10,6 @@
10 10
                         [(ngModel)]="privacy.id" readonly />
11 11
                 </div>
12 12
                 <div class="form-group">
13
-                    <label class="form-control-label" jhiTranslate="zipConnectApp.privacy.privacyId" for="field_privacyId">Privacy Id</label>
14
-                    <input type="number" class="form-control" name="privacyId" id="field_privacyId"
15
-                        [(ngModel)]="privacy.privacyId" />
16
-                </div>
17
-                <div class="form-group">
18 13
                     <label class="form-control-label" jhiTranslate="zipConnectApp.privacy.publicView" for="field_publicView">Public View</label>
19 14
                     <input type="checkbox" class="form-control" name="publicView" id="field_publicView"
20 15
                         [(ngModel)]="privacy.publicView" />

+ 0
- 2
src/main/webapp/app/entities/privacy/privacy.component.html View File

@@ -15,7 +15,6 @@
15 15
             <thead>
16 16
             <tr>
17 17
             <th><span jhiTranslate="global.field.id">ID</span></th>
18
-            <th><span jhiTranslate="zipConnectApp.privacy.privacyId">Privacy Id</span></th>
19 18
             <th><span jhiTranslate="zipConnectApp.privacy.publicView">Public View</span></th>
20 19
             <th><span jhiTranslate="zipConnectApp.privacy.cohortView">Cohort View</span></th>
21 20
             <th><span jhiTranslate="zipConnectApp.privacy.employerView">Employer View</span></th>
@@ -25,7 +24,6 @@
25 24
             <tbody>
26 25
             <tr *ngFor="let privacy of privacies ;trackBy: trackId">
27 26
                 <td><a [routerLink]="['/privacy', privacy.id, 'view' ]">{{privacy.id}}</a></td>
28
-                <td>{{privacy.privacyId}}</td>
29 27
                 <td>{{privacy.publicView}}</td>
30 28
                 <td>{{privacy.cohortView}}</td>
31 29
                 <td>{{privacy.employerView}}</td>

+ 0
- 16
src/main/webapp/app/entities/user-profile/user-profile-detail.component.html View File

@@ -5,10 +5,6 @@
5 5
             <hr>
6 6
             <jhi-alert-error></jhi-alert-error>
7 7
             <dl class="row-md jh-entity-details">
8
-                <dt><span jhiTranslate="zipConnectApp.userProfile.profileId">Profile Id</span></dt>
9
-                <dd>
10
-                    <span>{{userProfile.profileId}}</span>
11
-                </dd>
12 8
                 <dt><span jhiTranslate="zipConnectApp.userProfile.firstName">First Name</span></dt>
13 9
                 <dd>
14 10
                     <span>{{userProfile.firstName}}</span>
@@ -25,18 +21,6 @@
25 21
                 <dd>
26 22
                     {{userProfile.user?.id}}
27 23
                 </dd>
28
-                <dt><span jhiTranslate="zipConnectApp.userProfile.cohort">Cohort</span></dt>
29
-                <dd>
30
-                    <div *ngIf="userProfile.cohort">
31
-                        <a [routerLink]="['/cohort', userProfile.cohort?.id, 'view']">{{userProfile.cohort?.id}}</a>
32
-                    </div>
33
-                </dd>
34
-                <dt><span jhiTranslate="zipConnectApp.userProfile.employer">Employer</span></dt>
35
-                <dd>
36
-                    <div *ngIf="userProfile.employer">
37
-                        <a [routerLink]="['/employer', userProfile.employer?.id, 'view']">{{userProfile.employer?.id}}</a>
38
-                    </div>
39
-                </dd>
40 24
                 <dt><span jhiTranslate="zipConnectApp.userProfile.employer">Employer</span></dt>
41 25
                 <dd>
42 26
                     <div *ngIf="userProfile.employer">

+ 0
- 5
src/main/webapp/app/entities/user-profile/user-profile-update.component.html View File

@@ -10,11 +10,6 @@
10 10
                         [(ngModel)]="userProfile.id" readonly />
11 11
                 </div>
12 12
                 <div class="form-group">
13
-                    <label class="form-control-label" jhiTranslate="zipConnectApp.userProfile.profileId" for="field_profileId">Profile Id</label>
14
-                    <input type="number" class="form-control" name="profileId" id="field_profileId"
15
-                        [(ngModel)]="userProfile.profileId" />
16
-                </div>
17
-                <div class="form-group">
18 13
                     <label class="form-control-label" jhiTranslate="zipConnectApp.userProfile.firstName" for="field_firstName">First Name</label>
19 14
                     <input type="text" class="form-control" name="firstName" id="field_firstName"
20 15
                         [(ngModel)]="userProfile.firstName" />

+ 7
- 37
src/main/webapp/app/entities/user-profile/user-profile-update.component.ts View File

@@ -7,10 +7,10 @@ import { JhiAlertService } from 'ng-jhipster';
7 7
 import { IUserProfile } from 'app/shared/model/user-profile.model';
8 8
 import { UserProfileService } from './user-profile.service';
9 9
 import { IUser, UserService } from 'app/core';
10
-import { ICohort } from 'app/shared/model/cohort.model';
11
-import { CohortService } from 'app/entities/cohort';
12 10
 import { IEmployer } from 'app/shared/model/employer.model';
13 11
 import { EmployerService } from 'app/entities/employer';
12
+import { ICohort } from 'app/shared/model/cohort.model';
13
+import { CohortService } from 'app/entities/cohort';
14 14
 
15 15
 @Component({
16 16
     selector: 'jhi-user-profile-update',
@@ -22,16 +22,16 @@ export class UserProfileUpdateComponent implements OnInit {
22 22
 
23 23
     users: IUser[];
24 24
 
25
-    cohorts: ICohort[];
26
-
27 25
     employers: IEmployer[];
28 26
 
27
+    cohorts: ICohort[];
28
+
29 29
     constructor(
30 30
         private jhiAlertService: JhiAlertService,
31 31
         private userProfileService: UserProfileService,
32 32
         private userService: UserService,
33
-        private cohortService: CohortService,
34 33
         private employerService: EmployerService,
34
+        private cohortService: CohortService,
35 35
         private activatedRoute: ActivatedRoute
36 36
     ) {}
37 37
 
@@ -46,36 +46,6 @@ export class UserProfileUpdateComponent implements OnInit {
46 46
             },
47 47
             (res: HttpErrorResponse) => this.onError(res.message)
48 48
         );
49
-        this.cohortService.query({ filter: 'userprofile-is-null' }).subscribe(
50
-            (res: HttpResponse<ICohort[]>) => {
51
-                if (!this.userProfile.cohort || !this.userProfile.cohort.id) {
52
-                    this.cohorts = res.body;
53
-                } else {
54
-                    this.cohortService.find(this.userProfile.cohort.id).subscribe(
55
-                        (subRes: HttpResponse<ICohort>) => {
56
-                            this.cohorts = [subRes.body].concat(res.body);
57
-                        },
58
-                        (subRes: HttpErrorResponse) => this.onError(subRes.message)
59
-                    );
60
-                }
61
-            },
62
-            (res: HttpErrorResponse) => this.onError(res.message)
63
-        );
64
-        this.employerService.query({ filter: 'userprofile-is-null' }).subscribe(
65
-            (res: HttpResponse<IEmployer[]>) => {
66
-                if (!this.userProfile.employer || !this.userProfile.employer.id) {
67
-                    this.employers = res.body;
68
-                } else {
69
-                    this.employerService.find(this.userProfile.employer.id).subscribe(
70
-                        (subRes: HttpResponse<IEmployer>) => {
71
-                            this.employers = [subRes.body].concat(res.body);
72
-                        },
73
-                        (subRes: HttpErrorResponse) => this.onError(subRes.message)
74
-                    );
75
-                }
76
-            },
77
-            (res: HttpErrorResponse) => this.onError(res.message)
78
-        );
79 49
         this.employerService.query().subscribe(
80 50
             (res: HttpResponse<IEmployer[]>) => {
81 51
                 this.employers = res.body;
@@ -124,11 +94,11 @@ export class UserProfileUpdateComponent implements OnInit {
124 94
         return item.id;
125 95
     }
126 96
 
127
-    trackCohortById(index: number, item: ICohort) {
97
+    trackEmployerById(index: number, item: IEmployer) {
128 98
         return item.id;
129 99
     }
130 100
 
131
-    trackEmployerById(index: number, item: IEmployer) {
101
+    trackCohortById(index: number, item: ICohort) {
132 102
         return item.id;
133 103
     }
134 104
 }

+ 0
- 14
src/main/webapp/app/entities/user-profile/user-profile.component.html View File

@@ -15,13 +15,10 @@
15 15
             <thead>
16 16
             <tr>
17 17
             <th><span jhiTranslate="global.field.id">ID</span></th>
18
-            <th><span jhiTranslate="zipConnectApp.userProfile.profileId">Profile Id</span></th>
19 18
             <th><span jhiTranslate="zipConnectApp.userProfile.firstName">First Name</span></th>
20 19
             <th><span jhiTranslate="zipConnectApp.userProfile.lastName">Last Name</span></th>
21 20
             <th><span jhiTranslate="zipConnectApp.userProfile.userStack">User Stack</span></th>
22 21
             <th><span jhiTranslate="zipConnectApp.userProfile.user">User</span></th>
23
-            <th><span jhiTranslate="zipConnectApp.userProfile.cohort">Cohort</span></th>
24
-            <th><span jhiTranslate="zipConnectApp.userProfile.employer">Employer</span></th>
25 22
             <th><span jhiTranslate="zipConnectApp.userProfile.employer">Employer</span></th>
26 23
             <th><span jhiTranslate="zipConnectApp.userProfile.cohort">Cohort</span></th>
27 24
             <th></th>
@@ -30,7 +27,6 @@
30 27
             <tbody>
31 28
             <tr *ngFor="let userProfile of userProfiles ;trackBy: trackId">
32 29
                 <td><a [routerLink]="['/user-profile', userProfile.id, 'view' ]">{{userProfile.id}}</a></td>
33
-                <td>{{userProfile.profileId}}</td>
34 30
                 <td>{{userProfile.firstName}}</td>
35 31
                 <td>{{userProfile.lastName}}</td>
36 32
                 <td>{{userProfile.userStack}}</td>
@@ -38,16 +34,6 @@
38 34
                     {{userProfile.user?.id}}
39 35
                 </td>
40 36
                 <td>
41
-                    <div *ngIf="userProfile.cohort">
42
-                        <a [routerLink]="['../cohort', userProfile.cohort?.id, 'view' ]" >{{userProfile.cohort?.id}}</a>
43
-                    </div>
44
-                </td>
45
-                <td>
46
-                    <div *ngIf="userProfile.employer">
47
-                        <a [routerLink]="['../employer', userProfile.employer?.id, 'view' ]" >{{userProfile.employer?.id}}</a>
48
-                    </div>
49
-                </td>
50
-                <td>
51 37
                     <div *ngIf="userProfile.employer">
52 38
                         <a [routerLink]="['../employer', userProfile.employer?.id, 'view' ]" >{{userProfile.employer?.id}}</a>
53 39
                     </div>

+ 0
- 1
src/main/webapp/app/shared/model/cohort.model.ts View File

@@ -1,6 +1,5 @@
1 1
 export interface ICohort {
2 2
     id?: number;
3
-    cohortId?: number;
4 3
     gradDate?: string;
5 4
 }
6 5
 

+ 0
- 1
src/main/webapp/app/shared/model/employer.model.ts View File

@@ -1,6 +1,5 @@
1 1
 export interface IEmployer {
2 2
     id?: number;
3
-    employerId?: number;
4 3
     companyName?: string;
5 4
     city?: string;
6 5
     state?: string;

+ 3
- 3
src/main/webapp/app/shared/model/post.model.ts View File

@@ -1,5 +1,5 @@
1 1
 import { Moment } from 'moment';
2
-import { IUser } from 'app/core/user/user.model';
2
+import { IUserProfile } from 'app/shared/model//user-profile.model';
3 3
 import { IPrivacy } from 'app/shared/model//privacy.model';
4 4
 
5 5
 export interface IPost {
@@ -7,7 +7,7 @@ export interface IPost {
7 7
     timestamp?: Moment;
8 8
     content?: string;
9 9
     likes?: string;
10
-    poster?: IUser;
10
+    poster?: IUserProfile;
11 11
     privacySetting?: IPrivacy;
12 12
 }
13 13
 
@@ -17,7 +17,7 @@ export class Post implements IPost {
17 17
         public timestamp?: Moment,
18 18
         public content?: string,
19 19
         public likes?: string,
20
-        public poster?: IUser,
20
+        public poster?: IUserProfile,
21 21
         public privacySetting?: IPrivacy
22 22
     ) {}
23 23
 }

+ 0
- 1
src/main/webapp/app/shared/model/privacy.model.ts View File

@@ -1,6 +1,5 @@
1 1
 export interface IPrivacy {
2 2
     id?: number;
3
-    privacyId?: number;
4 3
     publicView?: boolean;
5 4
     cohortView?: boolean;
6 5
     employerView?: boolean;

+ 4
- 4
src/main/webapp/app/shared/model/user-profile.model.ts View File

@@ -1,6 +1,6 @@
1 1
 import { IUser } from 'app/core/user/user.model';
2
-import { ICohort } from 'app/shared/model//cohort.model';
3 2
 import { IEmployer } from 'app/shared/model//employer.model';
3
+import { ICohort } from 'app/shared/model//cohort.model';
4 4
 
5 5
 export interface IUserProfile {
6 6
     id?: number;
@@ -8,8 +8,8 @@ export interface IUserProfile {
8 8
     lastName?: string;
9 9
     userStack?: string;
10 10
     user?: IUser;
11
-    cohort?: ICohort;
12 11
     employer?: IEmployer;
12
+    cohort?: ICohort;
13 13
 }
14 14
 
15 15
 export class UserProfile implements IUserProfile {
@@ -19,7 +19,7 @@ export class UserProfile implements IUserProfile {
19 19
         public lastName?: string,
20 20
         public userStack?: string,
21 21
         public user?: IUser,
22
-        public cohort?: ICohort,
23
-        public employer?: IEmployer
22
+        public employer?: IEmployer,
23
+        public cohort?: ICohort
24 24
     ) {}
25 25
 }

+ 0
- 1
src/main/webapp/i18n/en/cohort.json View File

@@ -15,7 +15,6 @@
15 15
             "detail": {
16 16
                 "title": "Cohort"
17 17
             },
18
-            "cohortId": "Cohort Id",
19 18
             "gradDate": "Grad Date"
20 19
         }
21 20
     }

+ 0
- 1
src/main/webapp/i18n/en/employer.json View File

@@ -15,7 +15,6 @@
15 15
             "detail": {
16 16
                 "title": "Employer"
17 17
             },
18
-            "employerId": "Employer Id",
19 18
             "companyName": "Company Name",
20 19
             "city": "City",
21 20
             "state": "State"

+ 1
- 3
src/main/webapp/i18n/en/post.json View File

@@ -15,13 +15,11 @@
15 15
             "detail": {
16 16
                 "title": "Post"
17 17
             },
18
-            "postId": "Post Id",
19 18
             "timestamp": "Timestamp",
20 19
             "content": "Content",
21 20
             "likes": "Likes",
22 21
             "poster": "Poster",
23
-            "privacySetting": "Privacy Setting",
24
-            "poster": "Poster"
22
+            "privacySetting": "Privacy Setting"
25 23
         }
26 24
     }
27 25
 }

+ 0
- 1
src/main/webapp/i18n/en/privacy.json View File

@@ -15,7 +15,6 @@
15 15
             "detail": {
16 16
                 "title": "Privacy"
17 17
             },
18
-            "privacyId": "Privacy Id",
19 18
             "publicView": "Public View",
20 19
             "cohortView": "Cohort View",
21 20
             "employerView": "Employer View"

+ 0
- 3
src/main/webapp/i18n/en/userProfile.json View File

@@ -15,13 +15,10 @@
15 15
             "detail": {
16 16
                 "title": "User Profile"
17 17
             },
18
-            "profileId": "Profile Id",
19 18
             "firstName": "First Name",
20 19
             "lastName": "Last Name",
21 20
             "userStack": "User Stack",
22 21
             "user": "User",
23
-            "cohort": "Cohort",
24
-            "employer": "Employer",
25 22
             "employer": "Employer",
26 23
             "cohort": "Cohort"
27 24
         }

+ 0
- 1
src/main/webapp/i18n/es/cohort.json View File

@@ -15,7 +15,6 @@
15 15
             "detail": {
16 16
                 "title": "Cohort"
17 17
             },
18
-            "cohortId": "Cohort Id",
19 18
             "gradDate": "Grad Date"
20 19
         }
21 20
     }

+ 0
- 1
src/main/webapp/i18n/es/employer.json View File

@@ -15,7 +15,6 @@
15 15
             "detail": {
16 16
                 "title": "Employer"
17 17
             },
18
-            "employerId": "Employer Id",
19 18
             "companyName": "Company Name",
20 19
             "city": "City",
21 20
             "state": "State"

+ 1
- 3
src/main/webapp/i18n/es/post.json View File

@@ -15,13 +15,11 @@
15 15
             "detail": {
16 16
                 "title": "Post"
17 17
             },
18
-            "postId": "Post Id",
19 18
             "timestamp": "Timestamp",
20 19
             "content": "Content",
21 20
             "likes": "Likes",
22 21
             "poster": "Poster",
23
-            "privacySetting": "Privacy Setting",
24
-            "poster": "Poster"
22
+            "privacySetting": "Privacy Setting"
25 23
         }
26 24
     }
27 25
 }

+ 0
- 1
src/main/webapp/i18n/es/privacy.json View File

@@ -15,7 +15,6 @@
15 15
             "detail": {
16 16
                 "title": "Privacy"
17 17
             },
18
-            "privacyId": "Privacy Id",
19 18
             "publicView": "Public View",
20 19
             "cohortView": "Cohort View",
21 20
             "employerView": "Employer View"

+ 0
- 3
src/main/webapp/i18n/es/userProfile.json View File

@@ -15,13 +15,10 @@
15 15
             "detail": {
16 16
                 "title": "User Profile"
17 17
             },
18
-            "profileId": "Profile Id",
19 18
             "firstName": "First Name",
20 19
             "lastName": "Last Name",
21 20
             "userStack": "User Stack",
22 21
             "user": "User",
23
-            "cohort": "Cohort",
24
-            "employer": "Employer",
25 22
             "employer": "Employer",
26 23
             "cohort": "Cohort"
27 24
         }

+ 0
- 9
src/test/javascript/e2e/entities/cohort/cohort.page-object.ts View File

@@ -26,21 +26,12 @@ export class CohortUpdatePage {
26 26
     pageTitle = element(by.id('jhi-cohort-heading'));
27 27
     saveButton = element(by.id('save-entity'));
28 28
     cancelButton = element(by.id('cancel-save'));
29
-    cohortIdInput = element(by.id('field_cohortId'));
30 29
     gradDateInput = element(by.id('field_gradDate'));
31 30
 
32 31
     async getPageTitle() {
33 32
         return this.pageTitle.getAttribute('jhiTranslate');
34 33
     }
35 34
 
36
-    async setCohortIdInput(cohortId) {
37
-        await this.cohortIdInput.sendKeys(cohortId);
38
-    }
39
-
40
-    async getCohortIdInput() {
41
-        return this.cohortIdInput.getAttribute('value');
42
-    }
43
-
44 35
     async setGradDateInput(gradDate) {
45 36
         await this.gradDateInput.sendKeys(gradDate);
46 37
     }

+ 1
- 2
src/test/javascript/e2e/entities/cohort/cohort.spec.ts View File

@@ -38,8 +38,7 @@ describe('Cohort e2e test', () => {
38 38
         const nbButtonsBeforeCreate = await cohortComponentsPage.countDeleteButtons();
39 39
 
40 40
         await cohortComponentsPage.clickOnCreateButton();
41
-        await promise.all([cohortUpdatePage.setCohortIdInput('5'), cohortUpdatePage.setGradDateInput('gradDate')]);
42
-        expect(await cohortUpdatePage.getCohortIdInput()).to.eq('5');
41
+        await promise.all([cohortUpdatePage.setGradDateInput('gradDate')]);
43 42
         expect(await cohortUpdatePage.getGradDateInput()).to.eq('gradDate');
44 43
         await cohortUpdatePage.save();
45 44
         expect(await cohortUpdatePage.getSaveButton().isPresent()).to.be.false;

+ 0
- 9
src/test/javascript/e2e/entities/employer/employer.page-object.ts View File

@@ -26,7 +26,6 @@ export class EmployerUpdatePage {
26 26
     pageTitle = element(by.id('jhi-employer-heading'));
27 27
     saveButton = element(by.id('save-entity'));
28 28
     cancelButton = element(by.id('cancel-save'));
29
-    employerIdInput = element(by.id('field_employerId'));
30 29
     companyNameInput = element(by.id('field_companyName'));
31 30
     cityInput = element(by.id('field_city'));
32 31
     stateInput = element(by.id('field_state'));
@@ -35,14 +34,6 @@ export class EmployerUpdatePage {
35 34
         return this.pageTitle.getAttribute('jhiTranslate');
36 35
     }
37 36
 
38
-    async setEmployerIdInput(employerId) {
39
-        await this.employerIdInput.sendKeys(employerId);
40
-    }
41
-
42
-    async getEmployerIdInput() {
43
-        return this.employerIdInput.getAttribute('value');
44
-    }
45
-
46 37
     async setCompanyNameInput(companyName) {
47 38
         await this.companyNameInput.sendKeys(companyName);
48 39
     }

+ 0
- 2
src/test/javascript/e2e/entities/employer/employer.spec.ts View File

@@ -39,12 +39,10 @@ describe('Employer e2e test', () => {
39 39
 
40 40
         await employerComponentsPage.clickOnCreateButton();
41 41
         await promise.all([
42
-            employerUpdatePage.setEmployerIdInput('5'),
43 42
             employerUpdatePage.setCompanyNameInput('companyName'),
44 43
             employerUpdatePage.setCityInput('city'),
45 44
             employerUpdatePage.setStateInput('state')
46 45
         ]);
47
-        expect(await employerUpdatePage.getEmployerIdInput()).to.eq('5');
48 46
         expect(await employerUpdatePage.getCompanyNameInput()).to.eq('companyName');
49 47
         expect(await employerUpdatePage.getCityInput()).to.eq('city');
50 48
         expect(await employerUpdatePage.getStateInput()).to.eq('state');

+ 12
- 21
src/test/javascript/e2e/entities/post/post.page-object.ts View File

@@ -26,7 +26,6 @@ export class PostUpdatePage {
26 26
     pageTitle = element(by.id('jhi-post-heading'));
27 27
     saveButton = element(by.id('save-entity'));
28 28
     cancelButton = element(by.id('cancel-save'));
29
-    postIdInput = element(by.id('field_postId'));
30 29
     timestampInput = element(by.id('field_timestamp'));
31 30
     contentInput = element(by.id('field_content'));
32 31
     likesInput = element(by.id('field_likes'));
@@ -37,14 +36,6 @@ export class PostUpdatePage {
37 36
         return this.pageTitle.getAttribute('jhiTranslate');
38 37
     }
39 38
 
40
-    async setPostIdInput(postId) {
41
-        await this.postIdInput.sendKeys(postId);
42
-    }
43
-
44
-    async getPostIdInput() {
45
-        return this.postIdInput.getAttribute('value');
46
-    }
47
-
48 39
     async setTimestampInput(timestamp) {
49 40
         await this.timestampInput.sendKeys(timestamp);
50 41
     }
@@ -76,6 +67,18 @@ export class PostUpdatePage {
76 67
             .click();
77 68
     }
78 69
 
70
+    async posterSelectOption(option) {
71
+        await this.posterSelect.sendKeys(option);
72
+    }
73
+
74
+    getPosterSelect(): ElementFinder {
75
+        return this.posterSelect;
76
+    }
77
+
78
+    async getPosterSelectedOption() {
79
+        return this.posterSelect.element(by.css('option:checked')).getText();
80
+    }
81
+
79 82
     async privacySettingSelectLastOption() {
80 83
         await this.privacySettingSelect
81 84
             .all(by.tagName('option'))
@@ -95,18 +98,6 @@ export class PostUpdatePage {
95 98
         return this.privacySettingSelect.element(by.css('option:checked')).getText();
96 99
     }
97 100
 
98
-    async posterSelectOption(option) {
99
-        await this.posterSelect.sendKeys(option);
100
-    }
101
-
102
-    getPosterSelect(): ElementFinder {
103
-        return this.posterSelect;
104
-    }
105
-
106
-    async getPosterSelectedOption() {
107
-        return this.posterSelect.element(by.css('option:checked')).getText();
108
-    }
109
-
110 101
     async save() {
111 102
         await this.saveButton.click();
112 103
     }

+ 1
- 4
src/test/javascript/e2e/entities/post/post.spec.ts View File

@@ -39,15 +39,12 @@ describe('Post e2e test', () => {
39 39
 
40 40
         await postComponentsPage.clickOnCreateButton();
41 41
         await promise.all([
42
-            postUpdatePage.setPostIdInput('5'),
43 42
             postUpdatePage.setTimestampInput('2000-12-31'),
44 43
             postUpdatePage.setContentInput('content'),
45 44
             postUpdatePage.setLikesInput('likes'),
46 45
             postUpdatePage.posterSelectLastOption(),
47
-            postUpdatePage.privacySettingSelectLastOption(),
48
-            postUpdatePage.posterSelectLastOption()
46
+            postUpdatePage.privacySettingSelectLastOption()
49 47
         ]);
50
-        expect(await postUpdatePage.getPostIdInput()).to.eq('5');
51 48
         expect(await postUpdatePage.getTimestampInput()).to.eq('2000-12-31');
52 49
         expect(await postUpdatePage.getContentInput()).to.eq('content');
53 50
         expect(await postUpdatePage.getLikesInput()).to.eq('likes');

+ 0
- 9
src/test/javascript/e2e/entities/privacy/privacy.page-object.ts View File

@@ -26,7 +26,6 @@ export class PrivacyUpdatePage {
26 26
     pageTitle = element(by.id('jhi-privacy-heading'));
27 27
     saveButton = element(by.id('save-entity'));
28 28
     cancelButton = element(by.id('cancel-save'));
29
-    privacyIdInput = element(by.id('field_privacyId'));
30 29
     publicViewInput = element(by.id('field_publicView'));
31 30
     cohortViewInput = element(by.id('field_cohortView'));
32 31
     employerViewInput = element(by.id('field_employerView'));
@@ -35,14 +34,6 @@ export class PrivacyUpdatePage {
35 34
         return this.pageTitle.getAttribute('jhiTranslate');
36 35
     }
37 36
 
38
-    async setPrivacyIdInput(privacyId) {
39
-        await this.privacyIdInput.sendKeys(privacyId);
40
-    }
41
-
42
-    async getPrivacyIdInput() {
43
-        return this.privacyIdInput.getAttribute('value');
44
-    }
45
-
46 37
     getPublicViewInput() {
47 38
         return this.publicViewInput;
48 39
     }

+ 1
- 2
src/test/javascript/e2e/entities/privacy/privacy.spec.ts View File

@@ -38,8 +38,7 @@ describe('Privacy e2e test', () => {
38 38
         const nbButtonsBeforeCreate = await privacyComponentsPage.countDeleteButtons();
39 39
 
40 40
         await privacyComponentsPage.clickOnCreateButton();
41
-        await promise.all([privacyUpdatePage.setPrivacyIdInput('5')]);
42
-        expect(await privacyUpdatePage.getPrivacyIdInput()).to.eq('5');
41
+        await promise.all([]);
43 42
         const selectedPublicView = privacyUpdatePage.getPublicViewInput();
44 43
         if (await selectedPublicView.isSelected()) {
45 44
             await privacyUpdatePage.getPublicViewInput().click();

+ 1
- 10
src/test/javascript/e2e/entities/user-profile/user-profile.page-object.ts View File

@@ -26,26 +26,17 @@ export class UserProfileUpdatePage {
26 26
     pageTitle = element(by.id('jhi-user-profile-heading'));
27 27
     saveButton = element(by.id('save-entity'));
28 28
     cancelButton = element(by.id('cancel-save'));
29
-    profileIdInput = element(by.id('field_profileId'));
30 29
     firstNameInput = element(by.id('field_firstName'));
31 30
     lastNameInput = element(by.id('field_lastName'));
32 31
     userStackInput = element(by.id('field_userStack'));
33 32
     userSelect = element(by.id('field_user'));
34
-    cohortSelect = element(by.id('field_cohort'));
35 33
     employerSelect = element(by.id('field_employer'));
34
+    cohortSelect = element(by.id('field_cohort'));
36 35
 
37 36
     async getPageTitle() {
38 37
         return this.pageTitle.getAttribute('jhiTranslate');
39 38
     }
40 39
 
41
-    async setProfileIdInput(profileId) {
42
-        await this.profileIdInput.sendKeys(profileId);
43
-    }
44
-
45
-    async getProfileIdInput() {
46
-        return this.profileIdInput.getAttribute('value');
47
-    }
48
-
49 40
     async setFirstNameInput(firstName) {
50 41
         await this.firstNameInput.sendKeys(firstName);
51 42
     }

+ 0
- 4
src/test/javascript/e2e/entities/user-profile/user-profile.spec.ts View File

@@ -39,17 +39,13 @@ describe('UserProfile e2e test', () => {
39 39
 
40 40
         await userProfileComponentsPage.clickOnCreateButton();
41 41
         await promise.all([
42
-            userProfileUpdatePage.setProfileIdInput('5'),
43 42
             userProfileUpdatePage.setFirstNameInput('firstName'),
44 43
             userProfileUpdatePage.setLastNameInput('lastName'),
45 44
             userProfileUpdatePage.setUserStackInput('userStack'),
46 45
             userProfileUpdatePage.userSelectLastOption(),
47
-            userProfileUpdatePage.cohortSelectLastOption(),
48
-            userProfileUpdatePage.employerSelectLastOption(),
49 46
             userProfileUpdatePage.employerSelectLastOption(),
50 47
             userProfileUpdatePage.cohortSelectLastOption()
51 48
         ]);
52
-        expect(await userProfileUpdatePage.getProfileIdInput()).to.eq('5');
53 49
         expect(await userProfileUpdatePage.getFirstNameInput()).to.eq('firstName');
54 50
         expect(await userProfileUpdatePage.getLastNameInput()).to.eq('lastName');
55 51
         expect(await userProfileUpdatePage.getUserStackInput()).to.eq('userStack');

+ 1
- 3
src/test/javascript/spec/app/entities/cohort/cohort.service.spec.ts View File

@@ -21,7 +21,7 @@ describe('Service Tests', () => {
21 21
             service = injector.get(CohortService);
22 22
             httpMock = injector.get(HttpTestingController);
23 23
 
24
-            elemDefault = new Cohort(0, 'January 2019');
24
+            elemDefault = new Cohort(0, 'AAAAAAA');
25 25
         });
26 26
 
27 27
         describe('Service methods', async () => {
@@ -55,7 +55,6 @@ describe('Service Tests', () => {
55 55
             it('should update a Cohort', async () => {
56 56
                 const returnedFromService = Object.assign(
57 57
                     {
58
-                        cohortId: 1,
59 58
                         gradDate: 'BBBBBB'
60 59
                     },
61 60
                     elemDefault
@@ -73,7 +72,6 @@ describe('Service Tests', () => {
73 72
             it('should return a list of Cohort', async () => {
74 73
                 const returnedFromService = Object.assign(
75 74
                     {
76
-                        cohortId: 1,
77 75
                         gradDate: 'BBBBBB'
78 76
                     },
79 77
                     elemDefault

+ 0
- 2
src/test/javascript/spec/app/entities/employer/employer.service.spec.ts View File

@@ -55,7 +55,6 @@ describe('Service Tests', () => {
55 55
             it('should update a Employer', async () => {
56 56
                 const returnedFromService = Object.assign(
57 57
                     {
58
-                        employerId: 1,
59 58
                         companyName: 'BBBBBB',
60 59
                         city: 'BBBBBB',
61 60
                         state: 'BBBBBB'
@@ -75,7 +74,6 @@ describe('Service Tests', () => {
75 74
             it('should return a list of Employer', async () => {
76 75
                 const returnedFromService = Object.assign(
77 76
                     {
78
-                        employerId: 1,
79 77
                         companyName: 'BBBBBB',
80 78
                         city: 'BBBBBB',
81 79
                         state: 'BBBBBB'

+ 0
- 2
src/test/javascript/spec/app/entities/post/post.service.spec.ts View File

@@ -70,7 +70,6 @@ describe('Service Tests', () => {
70 70
             it('should update a Post', async () => {
71 71
                 const returnedFromService = Object.assign(
72 72
                     {
73
-                        postId: 1,
74 73
                         timestamp: currentDate.format(DATE_FORMAT),
75 74
                         content: 'BBBBBB',
76 75
                         likes: 'BBBBBB'
@@ -95,7 +94,6 @@ describe('Service Tests', () => {
95 94
             it('should return a list of Post', async () => {
96 95
                 const returnedFromService = Object.assign(
97 96
                     {
98
-                        postId: 1,
99 97
                         timestamp: currentDate.format(DATE_FORMAT),
100 98
                         content: 'BBBBBB',
101 99
                         likes: 'BBBBBB'

+ 0
- 2
src/test/javascript/spec/app/entities/privacy/privacy.service.spec.ts View File

@@ -55,7 +55,6 @@ describe('Service Tests', () => {
55 55
             it('should update a Privacy', async () => {
56 56
                 const returnedFromService = Object.assign(
57 57
                     {
58
-                        privacyId: 1,
59 58
                         publicView: true,
60 59
                         cohortView: true,
61 60
                         employerView: true
@@ -75,7 +74,6 @@ describe('Service Tests', () => {
75 74
             it('should return a list of Privacy', async () => {
76 75
                 const returnedFromService = Object.assign(
77 76
                     {
78
-                        privacyId: 1,
79 77
                         publicView: true,
80 78
                         cohortView: true,
81 79
                         employerView: true

+ 0
- 2
src/test/javascript/spec/app/entities/user-profile/user-profile.service.spec.ts View File

@@ -55,7 +55,6 @@ describe('Service Tests', () => {
55 55
             it('should update a UserProfile', async () => {
56 56
                 const returnedFromService = Object.assign(
57 57
                     {
58
-                        profileId: 1,
59 58
                         firstName: 'BBBBBB',
60 59
                         lastName: 'BBBBBB',
61 60
                         userStack: 'BBBBBB'
@@ -75,7 +74,6 @@ describe('Service Tests', () => {
75 74
             it('should return a list of UserProfile', async () => {
76 75
                 const returnedFromService = Object.assign(
77 76
                     {
78
-                        profileId: 1,
79 77
                         firstName: 'BBBBBB',
80 78
                         lastName: 'BBBBBB',
81 79
                         userStack: 'BBBBBB'