Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
- Mark Country ID as mandatory in the area search filters.
  • Loading branch information
dragospodariu96 committed Nov 18, 2020
1 parent 603c7c1 commit b853073
Showing 1 changed file with 12 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -1,20 +1,6 @@
package de.metas.ui.web.document.geo_location;

import java.util.Collection;
import java.util.Set;

import javax.annotation.Nullable;

import org.adempiere.ad.element.api.AdTabId;
import org.adempiere.exceptions.AdempiereException;
import org.adempiere.service.ISysConfigBL;
import org.compiere.model.I_C_BPartner_Location;
import org.compiere.model.I_C_Country;
import org.compiere.model.I_C_Location;
import org.springframework.stereotype.Component;

import com.google.common.collect.ImmutableSet;

import de.metas.document.archive.model.I_C_BPartner;
import de.metas.i18n.AdMessageKey;
import de.metas.i18n.IMsgBL;
Expand All @@ -35,6 +21,17 @@
import de.metas.ui.web.window.descriptor.sql.SqlLookupDescriptor;
import de.metas.util.Services;
import lombok.NonNull;
import org.adempiere.ad.element.api.AdTabId;
import org.adempiere.exceptions.AdempiereException;
import org.adempiere.service.ISysConfigBL;
import org.compiere.model.I_C_BPartner_Location;
import org.compiere.model.I_C_Country;
import org.compiere.model.I_C_Location;
import org.springframework.stereotype.Component;

import javax.annotation.Nullable;
import java.util.Collection;
import java.util.Set;

/*
* #%L
Expand Down Expand Up @@ -185,6 +182,7 @@ private DocumentFilterDescriptor createDocumentFilterDescriptor(final GeoLocatio
.addParameter(DocumentFilterParamDescriptor.builder()
.setFieldName(GeoLocationFilterConverter.PARAM_CountryId)
.setDisplayName(msgBL.translatable(GeoLocationFilterConverter.PARAM_CountryId))
.setMandatory(true)
.setWidgetType(DocumentFieldWidgetType.Lookup)
.setLookupDescriptor(SqlLookupDescriptor.searchInTable(I_C_Country.Table_Name).provideForFilter()))
.addParameter(DocumentFilterParamDescriptor.builder()
Expand Down

0 comments on commit b853073

Please sign in to comment.