|
@@ -9,6 +9,7 @@ using System.Collections.Generic;
|
|
|
using System.Linq;
|
|
|
using System.Text;
|
|
|
using System.Threading.Tasks;
|
|
|
+using System.Windows.Controls;
|
|
|
|
|
|
namespace PRSDesktop;
|
|
|
|
|
@@ -53,6 +54,16 @@ public class JobProductMappingsGrid : DynamicDataGrid<JobProductMapping>, IMaste
|
|
|
return columns;
|
|
|
}
|
|
|
|
|
|
+ protected override void CustomiseEditor(JobProductMapping[] items, DynamicGridColumn column, BaseEditor editor)
|
|
|
+ {
|
|
|
+ base.CustomiseEditor(items, column, editor);
|
|
|
+
|
|
|
+ if(new Column<JobProductMapping>(x => x.Product.ID).IsEqualTo(column.ColumnName) && editor is CodePopupEditor popup)
|
|
|
+ {
|
|
|
+ popup.CanAdd = Security.CanEdit<Product>();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
private void BuildMenu(DynamicMenuColumn column, CoreRow? row)
|
|
|
{
|
|
|
if (row is not null)
|