mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-11-03 03:16:10 -06:00 
			
		
		
		
	Merge branch 'dev' into feature-autocolor
This commit is contained in:
		@@ -8,7 +8,7 @@ Changelog
 | 
				
			|||||||
paperless-ng 1.2.1
 | 
					paperless-ng 1.2.1
 | 
				
			||||||
##################
 | 
					##################
 | 
				
			||||||
 | 
					
 | 
				
			||||||
* `Rodrigo Avelino <https://github.com/rodavelino>`_ translated Paperless into Portuguese (Brazil).
 | 
					* `Rodrigo Avelino <https://github.com/rodavelino>`_ translated Paperless into Portuguese (Brazil)!
 | 
				
			||||||
 | 
					
 | 
				
			||||||
* The date input fields now respect the currently selected date format.
 | 
					* The date input fields now respect the currently selected date format.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -16,6 +16,8 @@ paperless-ng 1.2.1
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
* When using regular expression matching, the regular expression is now validated before saving the tag/correspondent/type.
 | 
					* When using regular expression matching, the regular expression is now validated before saving the tag/correspondent/type.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					* Regression fix: Dates on the front end did not respect date locale settings in some cases.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
paperless-ng 1.2.0
 | 
					paperless-ng 1.2.0
 | 
				
			||||||
##################
 | 
					##################
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -69,7 +69,7 @@ import { ColorComponent } from './components/common/input/color/color.component'
 | 
				
			|||||||
import localeFr from '@angular/common/locales/fr';
 | 
					import localeFr from '@angular/common/locales/fr';
 | 
				
			||||||
import localeNl from '@angular/common/locales/nl';
 | 
					import localeNl from '@angular/common/locales/nl';
 | 
				
			||||||
import localeDe from '@angular/common/locales/de';
 | 
					import localeDe from '@angular/common/locales/de';
 | 
				
			||||||
import localePt from '@angular/common/locales/pt-PT';
 | 
					import localePt from '@angular/common/locales/pt';
 | 
				
			||||||
import localeEnGb from '@angular/common/locales/en-GB';
 | 
					import localeEnGb from '@angular/common/locales/en-GB';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
registerLocaleData(localeFr)
 | 
					registerLocaleData(localeFr)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -94,7 +94,7 @@
 | 
				
			|||||||
              </svg> {{d.title | documentTitle}}
 | 
					              </svg> {{d.title | documentTitle}}
 | 
				
			||||||
            </a>
 | 
					            </a>
 | 
				
			||||||
          </li>
 | 
					          </li>
 | 
				
			||||||
          <li class="nav-item w-100" *ngIf="openDocuments.length > 1">
 | 
					          <li class="nav-item w-100" *ngIf="openDocuments.length >= 1">
 | 
				
			||||||
            <a class="nav-link text-truncate" [routerLink]="" (click)="closeAll()">
 | 
					            <a class="nav-link text-truncate" [routerLink]="" (click)="closeAll()">
 | 
				
			||||||
              <svg class="sidebaricon" fill="currentColor">
 | 
					              <svg class="sidebaricon" fill="currentColor">
 | 
				
			||||||
                <use xlink:href="assets/bootstrap-icons.svg#x"/>
 | 
					                <use xlink:href="assets/bootstrap-icons.svg#x"/>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -20,7 +20,7 @@
 | 
				
			|||||||
          </div>
 | 
					          </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          <div class="input-group input-group-sm">
 | 
					          <div class="input-group input-group-sm">
 | 
				
			||||||
            <input class="form-control" [placeholder]="datePlaceHolder" id="dateAfter" (dateSelect)="onChangeDebounce()" (change)="onChangeDebounce()"
 | 
					            <input class="form-control" [placeholder]="datePlaceHolder" (dateSelect)="onChangeDebounce()" (change)="onChangeDebounce()"
 | 
				
			||||||
                    [(ngModel)]="dateAfter" ngbDatepicker #dateAfterPicker="ngbDatepicker">
 | 
					                    [(ngModel)]="dateAfter" ngbDatepicker #dateAfterPicker="ngbDatepicker">
 | 
				
			||||||
            <div class="input-group-append">
 | 
					            <div class="input-group-append">
 | 
				
			||||||
              <button class="btn btn-outline-secondary" (click)="dateAfterPicker.toggle()" type="button">
 | 
					              <button class="btn btn-outline-secondary" (click)="dateAfterPicker.toggle()" type="button">
 | 
				
			||||||
@@ -45,7 +45,7 @@
 | 
				
			|||||||
          </div>
 | 
					          </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          <div class="input-group input-group-sm">
 | 
					          <div class="input-group input-group-sm">
 | 
				
			||||||
            <input class="form-control" [placeholder]="datePlaceHolder" id="dateBefore" (dateSelect)="onChangeDebounce()" (change)="onChangeDebounce()"
 | 
					            <input class="form-control" [placeholder]="datePlaceHolder" (dateSelect)="onChangeDebounce()" (change)="onChangeDebounce()"
 | 
				
			||||||
                    [(ngModel)]="dateBefore" ngbDatepicker #dateBeforePicker="ngbDatepicker">
 | 
					                    [(ngModel)]="dateBefore" ngbDatepicker #dateBeforePicker="ngbDatepicker">
 | 
				
			||||||
            <div class="input-group-append">
 | 
					            <div class="input-group-append">
 | 
				
			||||||
              <button class="btn btn-outline-secondary" (click)="dateBeforePicker.toggle()" type="button">
 | 
					              <button class="btn btn-outline-secondary" (click)="dateBeforePicker.toggle()" type="button">
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
<div class="form-group">
 | 
					<div class="form-group">
 | 
				
			||||||
  <label [for]="inputId">{{title}}</label>
 | 
					  <label [for]="inputId">{{title}}</label>
 | 
				
			||||||
  <div class="input-group">
 | 
					  <div class="input-group" [class.is-invalid]="error">
 | 
				
			||||||
    <input [class.is-invalid]="error" class="form-control" [placeholder]="placeholder" [id]="inputId" (dateSelect)="onChange(value)" (change)="onChange(value)"
 | 
					    <input class="form-control" [class.is-invalid]="error"  [placeholder]="placeholder" [id]="inputId" (dateSelect)="onChange(value)" (change)="onChange(value)"
 | 
				
			||||||
           name="dp" [(ngModel)]="value" ngbDatepicker #datePicker="ngbDatepicker" #datePickerContent="ngModel">
 | 
					           name="dp" [(ngModel)]="value" ngbDatepicker #datePicker="ngbDatepicker" #datePickerContent="ngModel">
 | 
				
			||||||
    <div class="input-group-append">
 | 
					    <div class="input-group-append">
 | 
				
			||||||
      <button class="btn btn-outline-secondary calendar" (click)="datePicker.toggle()" type="button">
 | 
					      <button class="btn btn-outline-secondary calendar" (click)="datePicker.toggle()" type="button">
 | 
				
			||||||
@@ -10,6 +10,7 @@
 | 
				
			|||||||
        </svg>
 | 
					        </svg>
 | 
				
			||||||
      </button>
 | 
					      </button>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
    <div class="invalid-feedback" *ngIf="error" i18n>Invalid date.</div>
 | 
					 | 
				
			||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
 | 
					  <div class="invalid-feedback" i18n>Invalid date.</div>
 | 
				
			||||||
 | 
					  <small *ngIf="hint" class="form-text text-muted">{{hint}}</small>
 | 
				
			||||||
</div>
 | 
					</div>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -13,17 +13,20 @@ const FORMAT_TO_ISO_FORMAT = {
 | 
				
			|||||||
})
 | 
					})
 | 
				
			||||||
export class CustomDatePipe extends DatePipe implements PipeTransform {
 | 
					export class CustomDatePipe extends DatePipe implements PipeTransform {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  private defaultLocale: string
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  constructor(@Inject(LOCALE_ID) locale: string, private settings: SettingsService) {
 | 
					  constructor(@Inject(LOCALE_ID) locale: string, private settings: SettingsService) {
 | 
				
			||||||
    super(locale)
 | 
					    super(locale)
 | 
				
			||||||
 | 
					    this.defaultLocale = locale
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  transform(value: any, format?: string, timezone?: string, locale?: string): string | null {
 | 
					  transform(value: any, format?: string, timezone?: string, locale?: string): string | null {
 | 
				
			||||||
    let l = locale || this.settings.get(SETTINGS_KEYS.DATE_LOCALE)
 | 
					    let l = locale || this.settings.get(SETTINGS_KEYS.DATE_LOCALE) || this.defaultLocale
 | 
				
			||||||
    let f = format || this.settings.get(SETTINGS_KEYS.DATE_FORMAT)
 | 
					    let f = format || this.settings.get(SETTINGS_KEYS.DATE_FORMAT)
 | 
				
			||||||
    if (l == "iso-8601") {
 | 
					    if (l == "iso-8601") {
 | 
				
			||||||
      return super.transform(value, FORMAT_TO_ISO_FORMAT[f], timezone)
 | 
					      return super.transform(value, FORMAT_TO_ISO_FORMAT[f], timezone)
 | 
				
			||||||
    } else {
 | 
					    } else {
 | 
				
			||||||
      return super.transform(value, format || this.settings.get(SETTINGS_KEYS.DATE_FORMAT), timezone, locale)
 | 
					      return super.transform(value, format || this.settings.get(SETTINGS_KEYS.DATE_FORMAT), timezone, l)
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1729,7 +1729,7 @@
 | 
				
			|||||||
      </trans-unit>
 | 
					      </trans-unit>
 | 
				
			||||||
      <trans-unit datatype="html" id="90917e1a0a7bb59e9d11bdde9183e9391963e17b">
 | 
					      <trans-unit datatype="html" id="90917e1a0a7bb59e9d11bdde9183e9391963e17b">
 | 
				
			||||||
        <source>{VAR_PLURAL, plural, =1 {One more document} other {<x id="INTERPOLATION"/> more documents}}</source>
 | 
					        <source>{VAR_PLURAL, plural, =1 {One more document} other {<x id="INTERPOLATION"/> more documents}}</source>
 | 
				
			||||||
        <target>{VAR_PLURAL, plural, =1 {Mais um documento} other {Mais <x id="INTERPOLATION"/> documentos}</target>
 | 
					        <target>{VAR_PLURAL, plural, =1 {Mais um documento} other {Mais <x id="INTERPOLATION"/> documentos}}</target>
 | 
				
			||||||
        <context-group purpose="location">
 | 
					        <context-group purpose="location">
 | 
				
			||||||
          <context context-type="sourcefile">src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.html</context>
 | 
					          <context context-type="sourcefile">src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.html</context>
 | 
				
			||||||
          <context context-type="linenumber">25</context>
 | 
					          <context context-type="linenumber">25</context>
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user