only allowed latest template version and allowed admin to set sample number
This commit is contained in:
		@@ -59,9 +59,8 @@
 | 
			
		||||
        "color": "black",
 | 
			
		||||
        "batch": "1653000308",
 | 
			
		||||
        "condition": {
 | 
			
		||||
          "material": "hot air",
 | 
			
		||||
          "weeks": 5,
 | 
			
		||||
          "condition_template": {"$oid":"200000000000000000000001"}
 | 
			
		||||
          "p1": 44,
 | 
			
		||||
          "condition_template": {"$oid":"200000000000000000000004"}
 | 
			
		||||
        },
 | 
			
		||||
        "material_id": {"$oid":"100000000000000000000005"},
 | 
			
		||||
        "note_id": {"$oid":"500000000000000000000003"},
 | 
			
		||||
@@ -447,24 +446,37 @@
 | 
			
		||||
        "__v": 0
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        "_id": {"$oid":"200000000000000000000002"},
 | 
			
		||||
        "first_id": {"$oid":"200000000000000000000001"},
 | 
			
		||||
        "name": "heat treatment 2",
 | 
			
		||||
        "version": 2,
 | 
			
		||||
        "_id": {"$oid":"200000000000000000000003"},
 | 
			
		||||
        "first_id": {"$oid":"200000000000000000000003"},
 | 
			
		||||
        "name": "raw material",
 | 
			
		||||
        "version": 1,
 | 
			
		||||
        "parameters": [
 | 
			
		||||
        ],
 | 
			
		||||
        "__v": 0
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        "_id": {"$oid":"200000000000000000000004"},
 | 
			
		||||
        "first_id": {"$oid":"200000000000000000000004"},
 | 
			
		||||
        "name": "old condition",
 | 
			
		||||
        "version": 1,
 | 
			
		||||
        "parameters": [
 | 
			
		||||
          {
 | 
			
		||||
            "name": "material",
 | 
			
		||||
            "name": "p1",
 | 
			
		||||
            "range": {}
 | 
			
		||||
          }
 | 
			
		||||
        ],
 | 
			
		||||
        "__v": 0
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        "_id": {"$oid":"200000000000000000000003"},
 | 
			
		||||
        "first_id": {"$oid":"200000000000000000000003"},
 | 
			
		||||
        "name": "raw material",
 | 
			
		||||
        "version": 1,
 | 
			
		||||
        "_id": {"$oid":"200000000000000000000005"},
 | 
			
		||||
        "first_id": {"$oid":"200000000000000000000004"},
 | 
			
		||||
        "name": "new condition",
 | 
			
		||||
        "version": 2,
 | 
			
		||||
        "parameters": [
 | 
			
		||||
          {
 | 
			
		||||
            "name": "p11",
 | 
			
		||||
            "range": {}
 | 
			
		||||
          }
 | 
			
		||||
        ],
 | 
			
		||||
        "__v": 0
 | 
			
		||||
      }
 | 
			
		||||
@@ -487,9 +499,9 @@
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        "_id": {"$oid":"300000000000000000000002"},
 | 
			
		||||
        "first_id": {"$oid":"300000000000000000000001"},
 | 
			
		||||
        "first_id": {"$oid":"300000000000000000000002"},
 | 
			
		||||
        "name": "kf",
 | 
			
		||||
        "version": 2,
 | 
			
		||||
        "version": 1,
 | 
			
		||||
        "parameters": [
 | 
			
		||||
          {
 | 
			
		||||
            "name": "weight %",
 | 
			
		||||
@@ -522,6 +534,21 @@
 | 
			
		||||
          }
 | 
			
		||||
        ],
 | 
			
		||||
        "__v": 0
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        "_id": {"$oid":"300000000000000000000004"},
 | 
			
		||||
        "first_id": {"$oid":"300000000000000000000003"},
 | 
			
		||||
        "name": "mt 31",
 | 
			
		||||
        "version": 2,
 | 
			
		||||
        "parameters": [
 | 
			
		||||
          {
 | 
			
		||||
            "name": "val2",
 | 
			
		||||
            "range": {
 | 
			
		||||
              "values": [1,2,3,4]
 | 
			
		||||
            }
 | 
			
		||||
          }
 | 
			
		||||
        ],
 | 
			
		||||
        "__v": 0
 | 
			
		||||
      }
 | 
			
		||||
    ],
 | 
			
		||||
    "users": [
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user