Skip to content

Commit

Permalink
verison stable du module gestion de projet v 1.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
mlouah committed Aug 1, 2023
1 parent e7eb7fe commit b709cda
Show file tree
Hide file tree
Showing 17 changed files with 276 additions and 49 deletions.
12 changes: 12 additions & 0 deletions .jhipster/Project.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,18 @@
"fieldName": "notes",
"fieldType": "byte[]",
"fieldTypeBlobContent": "text"
},
{
"fieldName": "alertes",
"fieldType": "String"
},
{
"fieldName": "todo",
"fieldType": "String"
},
{
"fieldName": "progress",
"fieldType": "Float"
}
],
"fluentMethods": true,
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<groupId>com.perso.proapps</groupId>
<artifactId>pro-apps</artifactId>
<version>1.2.1</version>
<version>1.2.2</version>
<packaging>jar</packaging>
<name>Professional Apps</name>
<description>All apps you need to run a tech company </description>
Expand Down
11 changes: 11 additions & 0 deletions sql/mom.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

/*
Liste des MOM d'un projet
*/

SELECT
m.id 'MoM ID', m.title, m.meeting_date
FROM
`my-pro-apps-prod`.mo_m m
WHERE
m.projet_id = 6
41 changes: 35 additions & 6 deletions sql/tasks.sql
Original file line number Diff line number Diff line change
Expand Up @@ -76,21 +76,24 @@ WHERE
*/

SELECT
t.id,
t.id 'Task ID',
p.code 'Project',
t.subject,
t.task_title,
t.deal_line,
t.is_urgent,
t.notes
ts.code
FROM
`my-pro-apps-prod`.task t,
`my-pro-apps-prod`.project p
`my-pro-apps-prod`.project p,
`my-pro-apps-prod`.task_status ts
WHERE
project_name_id = 2
project_name_id = 10
AND p.id = t.project_name_id
AND t.task_status_id = ts.id

/*
Liste des actions d'un MoM
Action(s) d'un MoM
*/

SELECT
Expand All @@ -108,4 +111,30 @@ FROM
WHERE
t.task_mom_id = 25
AND m.id = t.task_mom_id
AND t.task_status_id = s.id
AND t.task_status_id = s.id

/*
Liste des taches période
*/

SELECT
p.code 'projet',
t.id,
t.subject,
t.task_title,
t.deal_line,
t.is_urgent,
s.code 'Status',
t.date_modify
FROM
`my-pro-apps-prod`.task t,
`my-pro-apps-prod`.project p,
`my-pro-apps-prod`.task_status s
WHERE
t.date_modify < '2023-07-30'
AND t.date_modify > '2023-07-13'
AND p.id = t.project_name_id
AND s.id = t.task_status_id



61 changes: 61 additions & 0 deletions src/main/java/com/perso/proapps/domain/Project.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
import javax.validation.constraints.*;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.springframework.data.annotation.CreatedBy;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedBy;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

/**
* A Project.
Expand All @@ -18,6 +23,7 @@
@Table(name = "project")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@SuppressWarnings("common-java:DuplicatedBlocks")
@EntityListeners(AuditingEntityListener.class)
public class Project implements Serializable {

private static final long serialVersionUID = 1L;
Expand Down Expand Up @@ -54,22 +60,35 @@ public class Project implements Serializable {
@Column(name = "initial_work_load")
private Integer initialWorkLoad;

@CreatedDate
@Column(name = "date_creation")
private Instant dateCreation;

@LastModifiedDate
@Column(name = "date_modify")
private Instant dateModify;

@LastModifiedBy
@Column(name = "last_modify_by")
private String lastModifyBy;

@CreatedBy
@Column(name = "created_by")
private String createdBy;

@Lob
@Column(name = "notes")
private String notes;

@Column(name = "alertes")
private String alertes;

@Column(name = "todo")
private String todo;

@Column(name = "progress")
private Float progress;

@OneToMany(mappedBy = "projet")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@JsonIgnoreProperties(value = { "tasks", "projet" }, allowSetters = true)
Expand Down Expand Up @@ -289,6 +308,45 @@ public void setNotes(String notes) {
this.notes = notes;
}

public String getAlertes() {
return this.alertes;
}

public Project alertes(String alertes) {
this.setAlertes(alertes);
return this;
}

public void setAlertes(String alertes) {
this.alertes = alertes;
}

public String getTodo() {
return this.todo;
}

public Project todo(String todo) {
this.setTodo(todo);
return this;
}

public void setTodo(String todo) {
this.todo = todo;
}

public Float getProgress() {
return this.progress;
}

public Project progress(Float progress) {
this.setProgress(progress);
return this;
}

public void setProgress(Float progress) {
this.progress = progress;
}

public Set<MoM> getMoMTitles() {
return this.moMTitles;
}
Expand Down Expand Up @@ -466,6 +524,9 @@ public String toString() {
", lastModifyBy='" + getLastModifyBy() + "'" +
", createdBy='" + getCreatedBy() + "'" +
", notes='" + getNotes() + "'" +
", alertes='" + getAlertes() + "'" +
", todo='" + getTodo() + "'" +
", progress=" + getProgress() +
"}";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,23 @@ default Page<Project> findAllWithEagerRelationships(Pageable pageable) {
return this.findAllWithToOneRelationships(pageable);
}

default List<Project> findAll() {
return this.findAllWithToOneRelationships();
}

@Query(
value = "select distinct project from Project project left join fetch project.projectPriority left join fetch project.projectCategory left join fetch project.clientCode left join fetch project.internalProjectManager left join fetch project.company",
value = "select distinct project from Project project left join fetch project.projectPriority left join fetch project.projectCategory left join fetch project.clientCode left join fetch project.internalProjectManager left join fetch project.company left join fetch project.projectStatusCode",
countQuery = "select count(distinct project) from Project project"
)
Page<Project> findAllWithToOneRelationships(Pageable pageable);

@Query(
"select distinct project from Project project left join fetch project.projectPriority left join fetch project.projectCategory left join fetch project.clientCode left join fetch project.internalProjectManager left join fetch project.company"
"select distinct project from Project project left join fetch project.projectPriority left join fetch project.projectCategory left join fetch project.clientCode left join fetch project.internalProjectManager left join fetch project.company left join fetch project.projectStatusCode WHERE project.company.id =1"
)
List<Project> findAllWithToOneRelationships();

@Query(
"select project from Project project left join fetch project.projectPriority left join fetch project.projectCategory left join fetch project.clientCode left join fetch project.internalProjectManager left join fetch project.company where project.id =:id"
"select project from Project project left join fetch project.projectPriority left join fetch project.projectCategory left join fetch project.clientCode left join fetch project.internalProjectManager left join fetch project.company left join fetch project.projectStatusCode where project.id =:id "
)
Optional<Project> findOneWithToOneRelationships(@Param("id") Long id);
}
9 changes: 9 additions & 0 deletions src/main/java/com/perso/proapps/service/ProjectService.java
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,15 @@ public Optional<Project> partialUpdate(Project project) {
if (project.getNotes() != null) {
existingProject.setNotes(project.getNotes());
}
if (project.getAlertes() != null) {
existingProject.setAlertes(project.getAlertes());
}
if (project.getTodo() != null) {
existingProject.setTodo(project.getTodo());
}
if (project.getProgress() != null) {
existingProject.setProgress(project.getProgress());
}

return existingProject;
})
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/config/application-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ spring:
cache: false

server:
port: 8080
port: 8081

# ===================================================================
# JHipster specific properties
Expand Down
22 changes: 11 additions & 11 deletions src/main/resources/config/liquibase/fake-data/project.csv
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
id;name;code;start_date;real_endt_date;project_description;initial_end_date;initial_cost;initial_work_load;date_creation;date_modify;last_modify_by;created_by;notes;project_status_code_id
1;contextually-based Alsace Fresh;Table Moldavie;2023-05-22;2023-05-22;../fake-data/blob/hipster.txt;2023-05-22;97216;73781;2023-05-22T02:54:00;2023-05-22T04:25:14;utilize;Concrete USB;../fake-data/blob/hipster.txt;1
2;benchmark European;redefine Keyboard;2023-05-22;2023-05-22;../fake-data/blob/hipster.txt;2023-05-22;34608;65745;2023-05-21T23:35:42;2023-05-22T13:12:05;SMTP vortals revolutionary;Computer Superviseur;../fake-data/blob/hipster.txt;2
3;ROI turquoise a;intuitive Paris Buckinghamshire;2023-05-22;2023-05-22;../fake-data/blob/hipster.txt;2023-05-21;13425;81424;2023-05-22T12:24:55;2023-05-22T05:00:48;la navigating Intelligent;Directeur Euro c;../fake-data/blob/hipster.txt;3
4;ADP;Ringgit Up-sized Jewelery;2023-05-22;2023-05-22;../fake-data/blob/hipster.txt;2023-05-22;43012;77601;2023-05-22T03:40:34;2023-05-22T13:55:34;Concrete program ivory;port Computer;../fake-data/blob/hipster.txt;4
5;b Mouse;experiences bandwidth Developpeur;2023-05-22;2023-05-21;../fake-data/blob/hipster.txt;2023-05-21;4492;4504;2023-05-22T03:12:33;2023-05-22T03:28:06;Pakistan;Pants bluetooth Borders;../fake-data/blob/hipster.txt;5
6;c;Computer digital matrix;2023-05-21;2023-05-22;../fake-data/blob/hipster.txt;2023-05-22;82865;72692;2023-05-21T18:58:54;2023-05-22T15:16:32;Ball Cross-group compelling;Croatie;../fake-data/blob/hipster.txt;6
7;vortals;de;2023-05-22;2023-05-22;../fake-data/blob/hipster.txt;2023-05-22;9613;42029;2023-05-22T10:41:30;2023-05-22T07:19:49;c schemas;Architecte Metal;../fake-data/blob/hipster.txt;7
8;mission-critical connect JBOD;exploit;2023-05-22;2023-05-22;../fake-data/blob/hipster.txt;2023-05-21;98164;65835;2023-05-22T10:42:19;2023-05-21T21:34:31;black disintermediate;Buckinghamshire;../fake-data/blob/hipster.txt;8
9;Handmade bypassing;Borders;2023-05-22;2023-05-22;../fake-data/blob/hipster.txt;2023-05-22;8559;67539;2023-05-22T14:39:52;2023-05-22T09:57:48;Architecte;withdrawal;../fake-data/blob/hipster.txt;9
10;Dauphine Afghanistan Pologne;programming Technicien Organized;2023-05-22;2023-05-22;../fake-data/blob/hipster.txt;2023-05-22;11457;87447;2023-05-22T08:22:27;2023-05-21T21:00:28;Pompe SMTP;alarm;../fake-data/blob/hipster.txt;10
id;name;code;start_date;real_endt_date;project_description;initial_end_date;initial_cost;initial_work_load;date_creation;date_modify;last_modify_by;created_by;notes;alertes;todo;progress;project_status_code_id
1;contextually-based Alsace Fresh;Table Moldavie;2023-05-22;2023-05-22;../fake-data/blob/hipster.txt;2023-05-22;97216;73781;2023-05-22T02:54:00;2023-05-22T04:25:14;utilize;Concrete USB;../fake-data/blob/hipster.txt;benchmark European;redefine Keyboard;62514;1
2;Grenade digital;Malagasy de Practical;2023-05-22;2023-05-22;../fake-data/blob/hipster.txt;2023-05-21;10390;79445;2023-05-21T19:09:52;2023-05-22T17:56:21;index Diverse;a copying;../fake-data/blob/hipster.txt;Paris Buckinghamshire Keyboard;Midi-Pyrénées;79826;2
3;navigating Intelligent;Directeur Euro c;2023-05-22;2023-05-21;../fake-data/blob/hipster.txt;2023-05-22;41068;89858;2023-05-22T01:40:11;2023-05-22T04:38:23;Up-sized Jewelery application;calculate back-end;../fake-data/blob/hipster.txt;program;input;73409;3
4;Small;invoice digital parsing;2023-05-21;2023-05-22;../fake-data/blob/hipster.txt;2023-05-22;67207;24678;2023-05-21T18:28:21;2023-05-22T02:18:46;next-generation;Gloves;../fake-data/blob/hipster.txt;Vaneau world-class;indexing Bedfordshire;98807;4
5;a impactful;matrix;2023-05-21;2023-05-22;../fake-data/blob/hipster.txt;2023-05-22;82865;72692;2023-05-21T18:58:54;2023-05-22T15:16:32;Ball Cross-group compelling;Croatie;../fake-data/blob/hipster.txt;vortals;de;58620;5
6;blue;Pompe;2023-05-22;2023-05-21;../fake-data/blob/hipster.txt;2023-05-22;80870;27305;2023-05-22T04:49:09;2023-05-21T19:14:49;hack program;Sainte-Lucie;../fake-data/blob/hipster.txt;JBOD;exploit;46166;6
7;mobile strategy;eco-centric;2023-05-22;2023-05-22;../fake-data/blob/hipster.txt;2023-05-22;50407;70919;2023-05-22T08:08:10;2023-05-22T06:38:59;firewall;hacking;../fake-data/blob/hipster.txt;harness bypass;leading-edge;46128;7
8;olive deliverables;salmon;2023-05-22;2023-05-22;../fake-data/blob/hipster.txt;2023-05-22;14435;93114;2023-05-21T22:44:51;2023-05-21T21:21:15;Technicien;Poitou-Charentes;../fake-data/blob/hipster.txt;Computer e-business;invoice Bhutanese;71000;8
9;morph object-oriented;payment Papouasie-Nouvelle-Guinée;2023-05-22;2023-05-22;../fake-data/blob/hipster.txt;2023-05-22;22638;31298;2023-05-22T03:47:35;2023-05-21T19:03:43;Kwacha Fantastic;Account Electronics;../fake-data/blob/hipster.txt;Customizable Plastic;compressing Market;68956;9
10;Wooden purple;directional Granite;2023-05-22;2023-05-22;../fake-data/blob/hipster.txt;2023-05-21;20405;17635;2023-05-22T16:43:14;2023-05-22T07:44:22;engine Tasty Iranian;Music;../fake-data/blob/hipster.txt;pixel User-centric;Directeur Saint-Dominique USB;2304;10
3 changes: 2 additions & 1 deletion src/main/webapp/app/core/jhi-navbar/jhi-navbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
<b-navbar data-cy="navbar" toggleable="md" type="dark" class="jh-navbar">
<b-navbar-brand class="logo" b-link to="/">
<span class="logo-img"></span>
<span v-text="$t('global.title')" class="navbar-title">ProApps</span> <span class="navbar-version">{{ version }}</span>
<span v-text="$t('global.title')" class="navbar-title">ProApps</span>
<span class="navbar-version">{{ version }}</span>
</b-navbar-brand>
<b-navbar-toggle
right
Expand Down
34 changes: 29 additions & 5 deletions src/main/webapp/app/entities/project/project-details.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,44 @@
<div class="col-8">
<div v-if="project">
<h2 class="jh-entity-heading" data-cy="projectDetailsHeading">
<span v-text="$t('proAppsApp.project.detail.title')">Project</span> {{ project.id }}
{{ project.name }}
</h2>
<dl class="row jh-entity-details">
<dt>
<span v-text="$t('proAppsApp.project.name')">Name</span>
<span>ID </span>
</dt>
<dd>
<span>{{ project.name }}</span>
<span>{{ project.id }} </span>
</dd>
<dt>
<span v-text="$t('proAppsApp.project.code')">Code</span>
</dt>
<dd>
<span>{{ project.code }}</span>
</dd>
<!-- start progress -->
<dt>
<span v-text="$t('proAppsApp.project.progress')">Code</span>
</dt>
<dd>
<span style="font-weight: 500">{{ project.progress }}%</span>
</dd>
<!-- end progress -->

<dt><font-awesome-icon icon="eye"></font-awesome-icon> <span v-text="$t('proAppsApp.project.alertes')">Alertes</span></dt>
<dd>
<span style="background-color: rgb(230, 234, 16)">{{ project.alertes }}</span>
</dd>

<!-- start todo -->
<dt>
<span v-text="$t('proAppsApp.project.todo')">Code</span>
</dt>
<dd>
<span style="background-color: rgba(216, 204, 236, 0.176)">{{ project.todo }}</span>
</dd>
<!-- end todo -->

<dt>
<span v-text="$t('proAppsApp.project.startDate')">Start Date</span>
</dt>
Expand All @@ -34,7 +57,7 @@
<span v-text="$t('proAppsApp.project.projectDescription')">Project Description</span>
</dt>
<dd>
<span>{{ project.projectDescription }}</span>
<span v-html="project.projectDescription"> </span>
</dd>
<dt>
<span v-text="$t('proAppsApp.project.initialEndDate')">Initial End Date</span>
Expand Down Expand Up @@ -82,8 +105,9 @@
<span v-text="$t('proAppsApp.project.notes')">Notes</span>
</dt>
<dd>
<span>{{ project.notes }}</span>
<span v-html="project.projectDenotesscription"> </span>
</dd>

<dt>
<span v-text="$t('proAppsApp.project.projectPriority')">Project Priority</span>
</dt>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ const validations: any = {
lastModifyBy: {},
createdBy: {},
notes: {},
alertes: {},
todo: {},
progress: {},
projectStatusCode: {
required,
},
Expand Down
Loading

0 comments on commit b709cda

Please sign in to comment.