Skip to content

Commit

Permalink
Merge pull request #114 from xlg8/development_Cinoteck
Browse files Browse the repository at this point in the history
cinoteck dev to main dev
  • Loading branch information
Iyanuu authored Feb 22, 2022
2 parents 4d4895c + 750a688 commit ddbe2cf
Show file tree
Hide file tree
Showing 34 changed files with 777 additions and 45 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,18 @@ public class CampaignDto extends EntityDto {
public static final String I18N_PREFIX = "Campaign";

public static final String NAME = "name";
public static final String ROUND = "round";
public static final String DESCRIPTION = "description";
public static final String START_DATE = "startDate";
public static final String END_DATE = "endDate";
public static final String CREATING_USER = "creatingUser";
public static final String CAMPAIGN_FORM_METAS = "campaignFormMetas";
public static final String CAMPAIGN_TYPES = "campaignTypes";

@Size(max = FieldConstraints.CHARACTER_LIMIT_SMALL, message = Validations.textTooLong)
private String name;
private String round;
private String campaignTypes;
@Size(max = FieldConstraints.CHARACTER_LIMIT_BIG, message = Validations.textTooLong)
private String description;
private Date startDate;
Expand All @@ -52,6 +56,26 @@ public String getName() {
public void setName(String name) {
this.name = name;
}



public String getRound() {
return round;
}

public void setRound(String round) {
this.round = round;
}



public String getCampaignTypes() {
return campaignTypes;
}

public void setCampaignTypes(String campaignTypes) {
this.campaignTypes = campaignTypes;
}

public String getDescription() {
return description;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,26 @@

public class CampaignIndexDto implements Serializable {

private static final long serialVersionUID = 2448753530580084851L;
private static final long serialVersionUID = 2448753530580084851L; //.save

public static final String I18N_PREFIX = "Campaign";

public static final String UUID = "uuid";
public static final String ROUND = "round";
public static final String NAME = "name";
public static final String START_DATE = "startDate";
public static final String END_DATE = "endDate";

private String uuid;
private String name;
private String round;
private Date startDate;
private Date endDate;

public CampaignIndexDto(String uuid, String name, Date startDate, Date endDate) {
public CampaignIndexDto(String uuid, String name, String cluster, Date startDate, Date endDate) {
this.uuid = uuid;
this.name = name;
this.round = round;
this.startDate = startDate;
this.endDate = endDate;
}
Expand All @@ -42,6 +45,15 @@ public void setName(String name) {
this.name = name;
}


public String getRound() {
return round;
}

public void setRound(String round) {
this.round = round;
}

public Date getStartDate() {
return startDate;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

import de.symeda.sormas.api.campaign.CampaignReferenceDto;
import de.symeda.sormas.api.campaign.form.CampaignFormMetaReferenceDto;
import de.symeda.sormas.api.infrastructure.area.AreaReferenceDto;
import de.symeda.sormas.api.infrastructure.community.CommunityReferenceDto;
import de.symeda.sormas.api.infrastructure.district.DistrictReferenceDto;
import de.symeda.sormas.api.infrastructure.region.RegionReferenceDto;
Expand All @@ -30,18 +31,24 @@ public class CampaignFormDataCriteria extends BaseCriteria implements Serializab
public static final String CAMPAIGN = "campaign";
public static final String CAMPAIGN_FORM_META = "campaignFormMeta";
public static final String REGION = "region";
public static final String AREA = "area";
public static final String DISTRICT = "district";
public static final String COMMUNITY = "community";
public static final String FORM_DATE = "formDate";
public static final String FORM_TYPE = "formType";

private static final long serialVersionUID = 8124072093160133408L;

private CampaignReferenceDto campaign;
private CampaignFormMetaReferenceDto campaignFormMeta;
private AreaReferenceDto area;
private RegionReferenceDto region;
private DistrictReferenceDto district;
private CommunityReferenceDto community;
private Date formDate;
private String formType;



public CampaignReferenceDto getCampaign() {
return campaign;
Expand All @@ -68,6 +75,19 @@ public CampaignFormDataCriteria campaignFormMeta(CampaignFormMetaReferenceDto ca
this.campaignFormMeta = campaignFormMeta;
return this;
}

public AreaReferenceDto getArea() {
return area;
}

public void setArea(AreaReferenceDto area) {
this.area = area;
}

public CampaignFormDataCriteria area(AreaReferenceDto area) {
this.area = area;
return this;
}

public RegionReferenceDto getRegion() {
return region;
Expand Down Expand Up @@ -120,4 +140,15 @@ public CampaignFormDataCriteria formDate(Date formDate) {
this.formDate = formDate;
return this;
}

public String getFormType() {
return formType;
}

public void setFormType(String formType) {
this.formType = formType;
}



}
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,14 @@
import de.symeda.sormas.api.ImportIgnore;
import de.symeda.sormas.api.campaign.CampaignReferenceDto;
import de.symeda.sormas.api.campaign.form.CampaignFormMetaReferenceDto;
import de.symeda.sormas.api.infrastructure.area.AreaReferenceDto;
import de.symeda.sormas.api.infrastructure.community.CommunityReferenceDto;
import de.symeda.sormas.api.infrastructure.district.DistrictReferenceDto;
import de.symeda.sormas.api.infrastructure.region.RegionReferenceDto;
import de.symeda.sormas.api.user.UserReferenceDto;
import de.symeda.sormas.api.utils.DataHelper;

public class CampaignFormDataDto extends EntityDto {
public class CampaignFormDataDto extends EntityDto {

private static final long serialVersionUID = -8087195060395038093L;

Expand All @@ -44,36 +45,43 @@ public class CampaignFormDataDto extends EntityDto {
public static final String CAMPAIGN = "campaign";
public static final String CAMPAIGN_FORM_META = "campaignFormMeta";
public static final String FORM_DATE = "formDate";
public static final String AREA = "area";
public static final String REGION = "region";
public static final String DISTRICT = "district";
public static final String COMMUNITY = "community";
public static final String CREATING_USER = "creatingUser";
public static final String FORM_TYPE = "formType";

@Valid
private List<CampaignFormDataEntry> formValues;
private CampaignReferenceDto campaign;
@Valid
private CampaignFormMetaReferenceDto campaignFormMeta;
private Date formDate;
private AreaReferenceDto area;
private RegionReferenceDto region;
private DistrictReferenceDto district;
private CommunityReferenceDto community;
private UserReferenceDto creatingUser;
private String formType;

public static CampaignFormDataDto build(
CampaignReferenceDto campaign,
CampaignFormMetaReferenceDto campaignFormMeta,
//AreaReferenceDto area,
RegionReferenceDto region,
DistrictReferenceDto district,
CommunityReferenceDto community) {
CampaignFormDataDto campaignFormData = new CampaignFormDataDto();
campaignFormData.setUuid(DataHelper.createUuid());
campaignFormData.setCampaign(campaign);
campaignFormData.setCampaignFormMeta(campaignFormMeta);
//campaignFormData.setArea(area);
campaignFormData.setRegion(region);
campaignFormData.setDistrict(district);
campaignFormData.setCommunity(community);
campaignFormData.setFormDate(new Date());
campaignFormData.setFormType("");
return campaignFormData;
}

Expand Down Expand Up @@ -116,6 +124,25 @@ public Date getFormDate() {
public void setFormDate(Date formDate) {
this.formDate = formDate;
}



public String getFormType() {
return formType;
}

public void setFormType(String formType) {
this.formType = formType;
}


public AreaReferenceDto getArea() {
return area;
}

public void setArea(AreaReferenceDto area) {
this.area = area;
}

public RegionReferenceDto getRegion() {
return region;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,40 +26,70 @@ public class CampaignFormDataIndexDto implements Serializable, Cloneable {
public static final String UUID = "uuid";
public static final String CAMPAIGN = "campaign";
public static final String FORM = "form";
public static final String AREA = "area";
public static final String REGION = "region";
public static final String DISTRICT = "district";
public static final String COMMUNITY = "community";
public static final String FORM_DATE = "formDate";
public static final String FORM_TYPE = "formType";

private static final long serialVersionUID = -6672198324526771162L;

private String uuid;
private String campaign;
private String form;
private List<CampaignFormDataEntry> formValues;
private String area;
private String region;
private String district;
private String community;
private Date formDate;
private String formType;

public CampaignFormDataIndexDto(
String uuid,
String campaign,
String form,
Object formValues,
//String area,
String region,
String district,
String community,
Date formDate) {
Date formDate,
String formType) {
this.uuid = uuid;
this.campaign = campaign;
this.form = form;
this.formValues = (List<CampaignFormDataEntry>) formValues;
//this.region = area;
this.region = region;
this.district = district;
this.community = community;
this.formDate = formDate;
this.formType = formType;
}

public CampaignFormDataIndexDto(
String uuid,
String campaign,
String form,
Object formValues,
String area,
String region,
String district,
String community,
Date formDate
) {
this.uuid = uuid;
this.campaign = campaign;
this.form = form;
this.formValues = (List<CampaignFormDataEntry>) formValues;
this.area = area;
this.region = region;
this.district = district;
this.community = community;
this.formDate = formDate;
}

public String getUuid() {
return uuid;
Expand Down Expand Up @@ -93,6 +123,14 @@ public void setFormValues(List<CampaignFormDataEntry> formValues) {
this.formValues = formValues;
}

public String getArea() {
return area;
}

public void setArea(String area) {
this.area = area;
}

public String getRegion() {
return region;
}
Expand Down Expand Up @@ -124,4 +162,14 @@ public Date getFormDate() {
public void setFormDate(Date formDate) {
this.formDate = formDate;
}

public String getFormType() {
return formType;
}

public void setFormType(String formType) {
this.formType = formType;
}


}
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
public interface Captions {

/*
* Hint for SonarQube issues:
* 1. java:S115: Violation of name convention for constants of this class is accepted: Close as false positive.
* Hint for SonarQube issues: 1. java:S115: Violation of name convention for
* constants of this class is accepted: Close as false positive.
*/

String about = "APMIS About";
Expand Down Expand Up @@ -211,6 +211,8 @@ public interface Captions {
String Campaign_open = "Campaign.open";
String Campaign_region = "Campaign.region";
String Campaign_startDate = "Campaign.startDate";
String Campaign_formType = "Campaign.formType";
String Campaign_campaignTypes = "Campaign.campaignTypes";
String campaignActiveCampaigns = "campaignActiveCampaigns";
String campaignAdditionalChart = "campaignAdditionalChart";
String campaignAdditionalForm = "campaignAdditionalForm";
Expand All @@ -231,6 +233,8 @@ public interface Captions {
String CampaignFormData_campaignFormMeta = "CampaignFormData.campaignFormMeta";
String CampaignFormData_edit = "CampaignFormData.edit";
String CampaignFormData_formDate = "CampaignFormData.formDate";
String CampaignFormData_formType = "CampaignFormData.formType";
String CampaignFormData_campaignTypes = "CampaignFormData.campaignTypes";
String CampaignFormData_formValuesJson = "CampaignFormData.formValuesJson";
String campaignNewCampaign = "campaignNewCampaign";
String campaignSearch = "campaignSearch";
Expand Down
Loading

0 comments on commit ddbe2cf

Please sign in to comment.