mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-31 13:15:43 +00:00 
			
		
		
		
	Check for duplicate BOM items as part of serializer validation
This commit is contained in:
		| @@ -43,6 +43,7 @@ function constructBomUploadTable(data, options={}) { | ||||
|         var field_options = { | ||||
|             hideLabels: true, | ||||
|             hideClearButton: true, | ||||
|             form_classes: 'bom-form-group', | ||||
|         }; | ||||
|  | ||||
|         function constructRowField(field_name) { | ||||
| @@ -77,7 +78,7 @@ function constructBomUploadTable(data, options={}) { | ||||
|         buttons += `</div>`; | ||||
|  | ||||
|         var html = ` | ||||
|         <tr id='bom_import_row_${idx}' class='bom-import-row' idx='${idx}'> | ||||
|         <tr id='items_${idx}' class='bom-import-row' idx='${idx}'> | ||||
|             <td id='col_sub_part_${idx}'>${sub_part}</td> | ||||
|             <td id='col_quantity_${idx}'>${quantity}</td> | ||||
|             <td id='col_reference_${idx}'>${reference}</td> | ||||
|   | ||||
| @@ -1056,6 +1056,7 @@ function handleNestedErrors(errors, field_name, options={}) { | ||||
|          | ||||
|         // Here, error_item is a map of field names to error messages | ||||
|         for (sub_field_name in error_item) { | ||||
|  | ||||
|             var errors = error_item[sub_field_name]; | ||||
|  | ||||
|             // Find the target (nested) field | ||||
| @@ -1919,12 +1920,12 @@ function constructField(name, parameters, options) { | ||||
|         options.current_group = group; | ||||
|     } | ||||
|  | ||||
|     var form_classes = 'form-group'; | ||||
|     var form_classes = options.form_classes || 'form-group'; | ||||
|  | ||||
|     if (parameters.errors) { | ||||
|         form_classes += ' form-field-error'; | ||||
|     } | ||||
|      | ||||
|  | ||||
|     // Optional content to render before the field | ||||
|     if (parameters.before) { | ||||
|         html += parameters.before; | ||||
|   | ||||
| @@ -161,7 +161,7 @@ function renderPart(name, data, parameters, options) { | ||||
|     html += ` <span>${data.full_name || data.name}</span>`; | ||||
|  | ||||
|     if (data.description) { | ||||
|         html += ` - <i>${data.description}</i>`; | ||||
|         html += ` - <i><small>${data.description}</small></i>`; | ||||
|     } | ||||
|  | ||||
|     var extra = ''; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user