mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	fix #238
This commit is contained in:
		| @@ -653,8 +653,8 @@ | |||||||
|           <context context-type="linenumber">11</context> |           <context context-type="linenumber">11</context> | ||||||
|         </context-group> |         </context-group> | ||||||
|       </trans-unit> |       </trans-unit> | ||||||
|       <trans-unit id="180092a6b8a6151a05f4a7552a2fb75fd159dfa8" datatype="html"> |       <trans-unit id="eab7fc7cf2d663e54de934b779fce4275a303f0f" datatype="html"> | ||||||
|         <source>Match</source> |         <source>Matching pattern</source> | ||||||
|         <context-group purpose="location"> |         <context-group purpose="location"> | ||||||
|           <context context-type="sourcefile">src/app/components/manage/correspondent-list/correspondent-edit-dialog/correspondent-edit-dialog.component.html</context> |           <context context-type="sourcefile">src/app/components/manage/correspondent-list/correspondent-edit-dialog/correspondent-edit-dialog.component.html</context> | ||||||
|           <context context-type="linenumber">12</context> |           <context context-type="linenumber">12</context> | ||||||
| @@ -875,21 +875,42 @@ | |||||||
|         <source>Correspondent: <x id="PH" equiv-text="this.correspondents.find(c => c.id == +rule.value)?.name"/></source> |         <source>Correspondent: <x id="PH" equiv-text="this.correspondents.find(c => c.id == +rule.value)?.name"/></source> | ||||||
|         <context-group purpose="location"> |         <context-group purpose="location"> | ||||||
|           <context context-type="sourcefile">src/app/components/document-list/filter-editor/filter-editor.component.ts</context> |           <context context-type="sourcefile">src/app/components/document-list/filter-editor/filter-editor.component.ts</context> | ||||||
|           <context context-type="linenumber">28</context> |           <context context-type="linenumber">29</context> | ||||||
|  |         </context-group> | ||||||
|  |       </trans-unit> | ||||||
|  |       <trans-unit id="8170755470576301659" datatype="html"> | ||||||
|  |         <source>Without correspondent</source> | ||||||
|  |         <context-group purpose="location"> | ||||||
|  |           <context context-type="sourcefile">src/app/components/document-list/filter-editor/filter-editor.component.ts</context> | ||||||
|  |           <context context-type="linenumber">31</context> | ||||||
|         </context-group> |         </context-group> | ||||||
|       </trans-unit> |       </trans-unit> | ||||||
|       <trans-unit id="8705701325879965907" datatype="html"> |       <trans-unit id="8705701325879965907" datatype="html"> | ||||||
|         <source>Type: <x id="PH" equiv-text="this.documentTypes.find(dt => dt.id == +rule.value)?.name"/></source> |         <source>Type: <x id="PH" equiv-text="this.documentTypes.find(dt => dt.id == +rule.value)?.name"/></source> | ||||||
|         <context-group purpose="location"> |         <context-group purpose="location"> | ||||||
|           <context context-type="sourcefile">src/app/components/document-list/filter-editor/filter-editor.component.ts</context> |           <context context-type="sourcefile">src/app/components/document-list/filter-editor/filter-editor.component.ts</context> | ||||||
|           <context context-type="linenumber">31</context> |           <context context-type="linenumber">36</context> | ||||||
|  |         </context-group> | ||||||
|  |       </trans-unit> | ||||||
|  |       <trans-unit id="4362173610367509215" datatype="html"> | ||||||
|  |         <source>Without document type</source> | ||||||
|  |         <context-group purpose="location"> | ||||||
|  |           <context context-type="sourcefile">src/app/components/document-list/filter-editor/filter-editor.component.ts</context> | ||||||
|  |           <context context-type="linenumber">38</context> | ||||||
|         </context-group> |         </context-group> | ||||||
|       </trans-unit> |       </trans-unit> | ||||||
|       <trans-unit id="8180755793012580465" datatype="html"> |       <trans-unit id="8180755793012580465" datatype="html"> | ||||||
|         <source>Tag: <x id="PH" equiv-text="this.tags.find(t => t.id == +rule.value)?.name"/></source> |         <source>Tag: <x id="PH" equiv-text="this.tags.find(t => t.id == +rule.value)?.name"/></source> | ||||||
|         <context-group purpose="location"> |         <context-group purpose="location"> | ||||||
|           <context context-type="sourcefile">src/app/components/document-list/filter-editor/filter-editor.component.ts</context> |           <context context-type="sourcefile">src/app/components/document-list/filter-editor/filter-editor.component.ts</context> | ||||||
|           <context context-type="linenumber">34</context> |           <context context-type="linenumber">42</context> | ||||||
|  |         </context-group> | ||||||
|  |       </trans-unit> | ||||||
|  |       <trans-unit id="6494566478302448576" datatype="html"> | ||||||
|  |         <source>Without any tag</source> | ||||||
|  |         <context-group purpose="location"> | ||||||
|  |           <context context-type="sourcefile">src/app/components/document-list/filter-editor/filter-editor.component.ts</context> | ||||||
|  |           <context context-type="linenumber">46</context> | ||||||
|         </context-group> |         </context-group> | ||||||
|       </trans-unit> |       </trans-unit> | ||||||
|       <trans-unit id="ddb40946e790522301687ecddb9ce1cb8ad40dd1" datatype="html"> |       <trans-unit id="ddb40946e790522301687ecddb9ce1cb8ad40dd1" datatype="html"> | ||||||
| @@ -1582,22 +1603,43 @@ | |||||||
|           <context context-type="linenumber">97</context> |           <context context-type="linenumber">97</context> | ||||||
|         </context-group> |         </context-group> | ||||||
|       </trans-unit> |       </trans-unit> | ||||||
|       <trans-unit id="3184700926171002527" datatype="html"> |       <trans-unit id="5851669019930456395" datatype="html"> | ||||||
|         <source>Any</source> |         <source>Any word</source> | ||||||
|         <context-group purpose="location"> |         <context-group purpose="location"> | ||||||
|           <context context-type="sourcefile">src/app/data/matching-model.ts</context> |           <context context-type="sourcefile">src/app/data/matching-model.ts</context> | ||||||
|           <context context-type="linenumber">12</context> |           <context context-type="linenumber">12</context> | ||||||
|         </context-group> |         </context-group> | ||||||
|       </trans-unit> |       </trans-unit> | ||||||
|       <trans-unit id="1616102757855967475" datatype="html"> |       <trans-unit id="7517655726614958140" datatype="html"> | ||||||
|         <source>All</source> |         <source>Any: Document contains any of these words (space separated)</source> | ||||||
|  |         <context-group purpose="location"> | ||||||
|  |           <context context-type="sourcefile">src/app/data/matching-model.ts</context> | ||||||
|  |           <context context-type="linenumber">12</context> | ||||||
|  |         </context-group> | ||||||
|  |       </trans-unit> | ||||||
|  |       <trans-unit id="700315718208181326" datatype="html"> | ||||||
|  |         <source>All words</source> | ||||||
|         <context-group purpose="location"> |         <context-group purpose="location"> | ||||||
|           <context context-type="sourcefile">src/app/data/matching-model.ts</context> |           <context context-type="sourcefile">src/app/data/matching-model.ts</context> | ||||||
|           <context context-type="linenumber">13</context> |           <context context-type="linenumber">13</context> | ||||||
|         </context-group> |         </context-group> | ||||||
|       </trans-unit> |       </trans-unit> | ||||||
|       <trans-unit id="1968183742008490888" datatype="html"> |       <trans-unit id="111914402588955480" datatype="html"> | ||||||
|         <source>Literal</source> |         <source>All: Document contains all of these words (space separated)</source> | ||||||
|  |         <context-group purpose="location"> | ||||||
|  |           <context context-type="sourcefile">src/app/data/matching-model.ts</context> | ||||||
|  |           <context context-type="linenumber">13</context> | ||||||
|  |         </context-group> | ||||||
|  |       </trans-unit> | ||||||
|  |       <trans-unit id="9180173992399180575" datatype="html"> | ||||||
|  |         <source>Exact match</source> | ||||||
|  |         <context-group purpose="location"> | ||||||
|  |           <context context-type="sourcefile">src/app/data/matching-model.ts</context> | ||||||
|  |           <context context-type="linenumber">14</context> | ||||||
|  |         </context-group> | ||||||
|  |       </trans-unit> | ||||||
|  |       <trans-unit id="7109184332944610787" datatype="html"> | ||||||
|  |         <source>Exact: Document contains this string</source> | ||||||
|         <context-group purpose="location"> |         <context-group purpose="location"> | ||||||
|           <context context-type="sourcefile">src/app/data/matching-model.ts</context> |           <context context-type="sourcefile">src/app/data/matching-model.ts</context> | ||||||
|           <context context-type="linenumber">14</context> |           <context context-type="linenumber">14</context> | ||||||
| @@ -1610,15 +1652,29 @@ | |||||||
|           <context context-type="linenumber">15</context> |           <context context-type="linenumber">15</context> | ||||||
|         </context-group> |         </context-group> | ||||||
|       </trans-unit> |       </trans-unit> | ||||||
|       <trans-unit id="701356546322112069" datatype="html"> |       <trans-unit id="7548151332424148033" datatype="html"> | ||||||
|         <source>Fuzzy match</source> |         <source>Regular expression: Document matches this regular expression</source> | ||||||
|  |         <context-group purpose="location"> | ||||||
|  |           <context context-type="sourcefile">src/app/data/matching-model.ts</context> | ||||||
|  |           <context context-type="linenumber">15</context> | ||||||
|  |         </context-group> | ||||||
|  |       </trans-unit> | ||||||
|  |       <trans-unit id="1856513373880048959" datatype="html"> | ||||||
|  |         <source>Fuzzy word</source> | ||||||
|         <context-group purpose="location"> |         <context-group purpose="location"> | ||||||
|           <context context-type="sourcefile">src/app/data/matching-model.ts</context> |           <context context-type="sourcefile">src/app/data/matching-model.ts</context> | ||||||
|           <context context-type="linenumber">16</context> |           <context context-type="linenumber">16</context> | ||||||
|         </context-group> |         </context-group> | ||||||
|       </trans-unit> |       </trans-unit> | ||||||
|       <trans-unit id="616064537937996961" datatype="html"> |       <trans-unit id="8419167206585286450" datatype="html"> | ||||||
|         <source>Auto</source> |         <source>Fuzzy: Document contains a word similar to this word</source> | ||||||
|  |         <context-group purpose="location"> | ||||||
|  |           <context context-type="sourcefile">src/app/data/matching-model.ts</context> | ||||||
|  |           <context context-type="linenumber">16</context> | ||||||
|  |         </context-group> | ||||||
|  |       </trans-unit> | ||||||
|  |       <trans-unit id="2147958104253035821" datatype="html"> | ||||||
|  |         <source>Auto: Learn matching automatically.</source> | ||||||
|         <context-group purpose="location"> |         <context-group purpose="location"> | ||||||
|           <context context-type="sourcefile">src/app/data/matching-model.ts</context> |           <context context-type="sourcefile">src/app/data/matching-model.ts</context> | ||||||
|           <context context-type="linenumber">17</context> |           <context context-type="linenumber">17</context> | ||||||
|   | |||||||
| @@ -25,14 +25,27 @@ export class FilterEditorComponent implements OnInit, OnDestroy { | |||||||
|       switch(this.filterRules[0].rule_type) { |       switch(this.filterRules[0].rule_type) { | ||||||
|  |  | ||||||
|         case FILTER_CORRESPONDENT: |         case FILTER_CORRESPONDENT: | ||||||
|  |           if (rule.value) { | ||||||
|             return $localize`Correspondent: ${this.correspondents.find(c => c.id == +rule.value)?.name}` |             return $localize`Correspondent: ${this.correspondents.find(c => c.id == +rule.value)?.name}` | ||||||
|  |           } else { | ||||||
|  |             return $localize`Without correspondent` | ||||||
|  |           } | ||||||
|  |  | ||||||
|         case FILTER_DOCUMENT_TYPE: |         case FILTER_DOCUMENT_TYPE: | ||||||
|  |           if (rule.value) { | ||||||
|             return $localize`Type: ${this.documentTypes.find(dt => dt.id == +rule.value)?.name}` |             return $localize`Type: ${this.documentTypes.find(dt => dt.id == +rule.value)?.name}` | ||||||
|  |           } else { | ||||||
|  |             return $localize`Without document type` | ||||||
|  |           } | ||||||
|  |  | ||||||
|         case FILTER_HAS_TAG: |         case FILTER_HAS_TAG: | ||||||
|           return $localize`Tag: ${this.tags.find(t => t.id == +rule.value)?.name}` |           return $localize`Tag: ${this.tags.find(t => t.id == +rule.value)?.name}` | ||||||
|          |          | ||||||
|  |         case FILTER_HAS_ANY_TAG: | ||||||
|  |           if (rule.value == "false") { | ||||||
|  |             return $localize`Without any tag` | ||||||
|  |           } | ||||||
|  |  | ||||||
|       } |       } | ||||||
|     } |     } | ||||||
|  |  | ||||||
|   | |||||||
							
								
								
									
										18
									
								
								src/documents/migrations/1010_auto_20210101_2159.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								src/documents/migrations/1010_auto_20210101_2159.py
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,18 @@ | |||||||
|  | # Generated by Django 3.1.4 on 2021-01-01 21:59 | ||||||
|  |  | ||||||
|  | from django.db import migrations, models | ||||||
|  |  | ||||||
|  |  | ||||||
|  | class Migration(migrations.Migration): | ||||||
|  |  | ||||||
|  |     dependencies = [ | ||||||
|  |         ('documents', '1009_auto_20201216_2005'), | ||||||
|  |     ] | ||||||
|  |  | ||||||
|  |     operations = [ | ||||||
|  |         migrations.AlterField( | ||||||
|  |             model_name='savedviewfilterrule', | ||||||
|  |             name='value', | ||||||
|  |             field=models.CharField(blank=True, max_length=128, null=True), | ||||||
|  |         ), | ||||||
|  |     ] | ||||||
| @@ -351,7 +351,10 @@ class SavedViewFilterRule(models.Model): | |||||||
|  |  | ||||||
|     rule_type = models.PositiveIntegerField(choices=RULE_TYPES) |     rule_type = models.PositiveIntegerField(choices=RULE_TYPES) | ||||||
|  |  | ||||||
|     value = models.CharField(max_length=128) |     value = models.CharField( | ||||||
|  |         max_length=128, | ||||||
|  |         blank=True, | ||||||
|  |         null=True) | ||||||
|  |  | ||||||
|  |  | ||||||
| # TODO: why is this in the models file? | # TODO: why is this in the models file? | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 jonaswinkler
					jonaswinkler