Repository: NVE/regObs4
Pull request #703: RO-1345: legge til himmelretning og opphavsrett under bilder
Author: login: amish1188
Created: 2025-03-14T13:01:21Z | Merged: 2025-03-25T10:10:14Z

Jeg fikk ikke til å bruker two way binding på ion-input derfor lagret jeg to metoder for å legge en ny fotografer og opphavsrett, og for oppdatering.

Template i denne komponenten har en del repetisjoner men det er ikke mulig å fikse det med mindre vi lager to separate komponenter derfor valgte jeg å la den være som den er. 

Som bestemt med Jørgen, de "ekstra" under bildet vises i en akkordion. 


Diff:
diff --git a/src/app/modules/edit-user-nickname-modal/edit-user-nickname-modal.component.ts b/src/app/modules/edit-user-nickname-modal/edit-user-nickname-modal.component.ts
index f7a384d8f..9d3fbe020 100644
--- a/src/app/modules/edit-user-nickname-modal/edit-user-nickname-modal.component.ts
+++ b/src/app/modules/edit-user-nickname-modal/edit-user-nickname-modal.component.ts
@@ -1,6 +1,6 @@
 import { Component, inject, model, signal } from '@angular/core';
 import { FormsModule } from '@angular/forms';
-import { IonButton, IonIcon, IonInput, IonItem, IonList, ModalController, IonText } from '@ionic/angular/standalone';
+import { IonButton, IonIcon, IonInput, IonItem, IonList, ModalController } from '@ionic/angular/standalone';
 import { TranslatePipe } from '@ngx-translate/core';
 import { addIcons } from 'ionicons';
 import { close } from 'ionicons/icons';
@@ -9,7 +9,7 @@ import { close } from 'ionicons/icons';
   selector: 'app-edit-user-nickname-modal',
   templateUrl: './edit-user-nickname-modal.component.html',
   styleUrls: ['./edit-user-nickname-modal.component.scss'],
-  imports: [IonText, FormsModule, IonButton, IonIcon, IonInput, IonItem, IonList, TranslatePipe],
+  imports: [FormsModule, IonButton, IonIcon, IonInput, IonItem, IonList, TranslatePipe],
 })
 export class EditUserNicknameModalComponent {
   modalController = inject(ModalController);
diff --git a/src/app/modules/registration/components/edit-images/edit-images.component.html b/src/app/modules/registration/components/edit-images/edit-images.component.html
index 2fcb65d94..d289d14a1 100644
--- a/src/app/modules/registration/components/edit-images/edit-images.component.html
+++ b/src/app/modules/registration/components/edit-images/edit-images.component.html
@@ -19,6 +19,42 @@
       [rows]="2"
       placeholder="{{ pictureCommentPlaceholder() | translate }}"
     ></app-text-comment>
+    <ion-accordion-group>
+      <ion-accordion>
+        <ion-item slot="header" class="accordion-button">
+          <ion-label>{{ "REGISTRATION.SNOW.SNOW_PROFILE.STRAT_PROFILE.SHOW_MORE" | translate }}</ion-label>
+        </ion-item>
+        <div class="ion-padding" slot="content">
+          <ion-item>
+            <app-select
+              label="REGISTRATION.IMAGE_ASPECT"
+              [(selectedValue)]="attachment.Aspect"
+              [options]="aspectOptions"
+            ></app-select>
+          </ion-item>
+          <ion-item>
+            <ion-input
+              [value]="attachment.Photographer || userSettings()?.photographer"
+              (ionChange)="updateExistingAttachmentPhotographer(attachment, $event)"
+              [label]="('MY_PROFILE.PHOTOGRAPHER' | translate).toUpperCase()"
+              labelPlacement="stacked"
+              [placeholder]="'MY_PROFILE.PHOTOGRAPHER' | translate"
+            >
+            </ion-input>
+          </ion-item>
+          <ion-item>
+            <ion-input
+              [value]="attachment.Copyright || userSettings()?.copyright || myPage()?.NickName"
+              (ionChange)="updateExistingAttachmentCopyright(attachment, $event)"
+              [label]="('MY_PROFILE.COPYRIGHT' | translate).toUpperCase()"
+              labelPlacement="stacked"
+              [placeholder]="'MY_PROFILE.COPYRIGHT' | translate"
+            >
+            </ion-input>
+          </ion-item>
+        </div>
+      </ion-accordion>
+    </ion-accordion-group>
   </div>
 
   <!-- New attachments -->
@@ -51,6 +87,43 @@
       [rows]="2"
       placeholder="{{ pictureCommentPlaceholder() | translate }}"
     ></app-text-comment>
+    <ion-accordion-group>
+      <ion-accordion>
+        <ion-item slot="header" class="accordion-button">
+          <ion-label>{{ "REGISTRATION.SNOW.SNOW_PROFILE.STRAT_PROFILE.SHOW_MORE" | translate }}</ion-label>
+        </ion-item>
+        <div class="ion-padding" slot="content">
+          <ion-item>
+            <app-select
+              label="REGISTRATION.IMAGE_ASPECT"
+              [(selectedValue)]="attachment.Aspect"
+              [options]="aspectOptions"
+              (ionChange)="addNewAttachmentAspect(attachment, $event)"
+            ></app-select>
+          </ion-item>
+          <ion-item>
+            <ion-input
+              [value]="attachment.Photographer || userSettings()?.photographer"
+              (ionChange)="addNewAttachmentPhotographer(attachment, $event)"
+              [label]="('MY_PROFILE.PHOTOGRAPHER' | translate).toUpperCase()"
+              labelPlacement="stacked"
+              [placeholder]="'MY_PROFILE.PHOTOGRAPHER' | translate"
+            >
+            </ion-input>
+          </ion-item>
+          <ion-item>
+            <ion-input
+              [value]="attachment.Copyright || userSettings()?.copyright || myPage()?.NickName"
+              (ionChange)="addNewAttachmentCopyright(attachment, $event)"
+              [label]="('MY_PROFILE.COPYRIGHT' | translate).toUpperCase()"
+              labelPlacement="stacked"
+              [placeholder]="'MY_PROFILE.COPYRIGHT' | translate"
+            >
+            </ion-input>
+          </ion-item>
+        </div>
+      </ion-accordion>
+    </ion-accordion-group>
   </div>
 </div>
 
diff --git a/src/app/modules/registration/components/edit-images/edit-images.component.scss b/src/app/modules/registration/components/edit-images/edit-images.component.scss
index 66a873e63..4e7e709ae 100644
--- a/src/app/modules/registration/components/edit-images/edit-images.component.scss
+++ b/src/app/modules/registration/components/edit-images/edit-images.component.scss
@@ -36,3 +36,12 @@
     }
   }
 }
+
+.accordion-button::part(native) {
+  background: var(--ion-background-color);
+}
+
+.accordion-button ion-label {
+  --color: var(--ion-color-primary) !important;
+  width: fit-content;
+}
diff --git a/src/app/modules/registration/components/edit-images/edit-images.component.ts b/src/app/modules/registration/components/edit-images/edit-images.component.ts
index 14fce25b2..e19f7472b 100644
--- a/src/app/modules/registration/components/edit-images/edit-images.component.ts
+++ b/src/app/modules/registration/components/edit-images/edit-images.component.ts
@@ -2,9 +2,13 @@ import { Component, OnInit, ChangeDetectionStrategy, inject, input, model } from
 import { TranslateService, TranslatePipe } from '@ngx-translate/core';
 import {
   ActionSheetController,
+  InputCustomEvent,
+  IonAccordion,
+  IonAccordionGroup,
   IonFab,
   IonFabButton,
   IonIcon,
+  IonInput,
   IonItem,
   IonLabel,
   IonProgressBar,
@@ -42,6 +46,11 @@ import { TextCommentComponent } from '../text-comment/text-comment.component';
 import { BlobImageComponent } from '../blob-image/blob-image.component';
 import { addIcons } from 'ionicons';
 import { camera, close } from 'ionicons/icons';
+import { SelectComponent } from '../../../shared/components/input/select/select.component';
+import { SelectOption } from 'src/app/modules/shared/components/input/select/select-option.model';
+import { toSignal } from '@angular/core/rxjs-interop';
+import { UserSettingService } from 'src/app/core/services/user-setting/user-setting.service';
+import { RegobsAuthService } from 'src/app/modules/auth/services/regobs-auth.service';
 
 const DEBUG_TAG = 'AddPictureItemComponent';
 const MIME_TYPE = 'image/jpeg';
@@ -65,9 +74,12 @@ interface NewAttachment extends AttachmentUploadEditModelWithBlob, AddAttachment
     AsyncPipe,
     BlobImageComponent,
     IonFab,
+    IonAccordion,
+    IonAccordionGroup,
     IonFabButton,
     IonIcon,
     IonItem,
+    IonInput,
     IonLabel,
     IonProgressBar,
     NgClass,
@@ -77,10 +89,12 @@ interface NewAttachment extends AttachmentUploadEditModelWithBlob, AddAttachment
     RemoteImageComponent,
     TextCommentComponent,
     TranslatePipe,
+    SelectComponent,
   ],
 })
 export class EditImagesComponent implements OnInit {
   newAttachmentService = inject(NewAttachmentService);
+  private regobsAuthService = inject(RegobsAuthService);
   private translateService = inject(TranslateService);
   private platform = inject(Platform);
   private file = inject(File);
@@ -88,6 +102,7 @@ export class EditImagesComponent implements OnInit {
   private toastController = inject(ToastController);
   private actionSheetController = inject(ActionSheetController);
   private dropZoneService = inject(DropZoneService);
+  private userSettingService = inject(UserSettingService);
 
   readonly draftUuid = input.required<string>();
   readonly existingAttachments = model<RemoteOrLocalAttachmentEditModel[]>();
@@ -102,6 +117,20 @@ export class EditImagesComponent implements OnInit {
   readonly onBeforeAdd = input<() => Promise<void> | void>();
   readonly attachmentType = input<AttachmentType>('Attachment');
   readonly ref = input<string>();
+  userSettings = toSignal(this.userSettingService.userSetting$);
+  myPage = toSignal(this.regobsAuthService.myPageData$);
+  selectedAspect = model<number | undefined>(undefined);
+
+  aspectOptions: SelectOption[] = [
+    { id: 0, text: this.translateService.instant('DIRECTION.N') },
+    { id: 45, text: this.translateService.instant('DIRECTION.NE') },
+    { id: 90, text: this.translateService.instant('DIRECTION.E') },
+    { id: 135, text: this.translateService.instant('DIRECTION.SE') },
+    { id: 180, text: this.translateService.instant('DIRECTION.S') },
+    { id: 225, text: this.translateService.instant('DIRECTION.SW') },
+    { id: 270, text: this.translateService.instant('DIRECTION.W') },
+    { id: 315, text: this.translateService.instant('DIRECTION.NW') },
+  ];
 
   isHybrid?: boolean;
   accept = ALLOWED_ATTACHMENT_FILE_TYPES;
@@ -154,6 +183,42 @@ export class EditImagesComponent implements OnInit {
     this.newAttachmentService.saveAttachmentMeta$(this.draftUuid(), { ...attachment, Comment: comment });
   }
 
+  addNewAttachmentAspect(attachment: AttachmentUploadEditModel, event: Event) {
+    const aspect = (event.target as HTMLSelectElement).value;
+    if (aspect == null || aspect == undefined) return;
+    this.newAttachmentService.saveAttachmentMeta$(this.draftUuid(), { ...attachment, Aspect: +aspect });
+  }
+
+  addNewAttachmentPhotographer(attachment: AttachmentUploadEditModel, event: InputCustomEvent) {
+    const photographer = event.detail.value;
+    if (photographer == null || photographer == undefined) return;
+    this.newAttachmentService.saveAttachmentMeta$(this.draftUuid(), { ...attachment, Photographer: photographer });
+  }
+
+  updateExistingAttachmentPhotographer(attachment: RemoteOrLocalAttachmentEditModel, event: InputCustomEvent) {
+    const photographer = event.detail.value;
+    if (photographer == null || photographer == undefined) return;
+    this.existingAttachments.update((attachments) =>
+      (attachments || []).map((a) =>
+        a.AttachmentId === attachment.AttachmentId ? { ...a, Photographer: photographer } : a
+      )
+    );
+  }
+
+  addNewAttachmentCopyright(attachment: AttachmentUploadEditModel, event: InputCustomEvent) {
+    const copyRight = event.detail.value;
+    if (copyRight == null || copyRight == undefined) return;
+    this.newAttachmentService.saveAttachmentMeta$(this.draftUuid(), { ...attachment, Copyright: copyRight });
+  }
+
+  updateExistingAttachmentCopyright(attachment: RemoteOrLocalAttachmentEditModel, event: InputCustomEvent) {
+    const copyRight = event.detail.value;
+    if (copyRight == null || copyRight == undefined) return;
+    this.existingAttachments.update((attachments) =>
+      (attachments || []).map((a) => (a.AttachmentId === attachment.AttachmentId ? { ...a, Copyright: copyRight } : a))
+    );
+  }
+
   async addClick() {
     const onBeforeAdd = this.onBeforeAdd();
     if (onBeforeAdd !== undefined) {
diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json
index cd6a674ab..53c057ce1 100644
--- a/src/assets/i18n/en.json
+++ b/src/assets/i18n/en.json
@@ -516,6 +516,7 @@
       }
     },
     "IMAGES": "Images",
+    "IMAGE_ASPECT": "Orientation",
     "IMAGE_DESCRIPTION": "Image description",
     "IMAGE_DESCRIPTION_PLACEHOLDER": "Add a description to the image",
     "IMAGE_ERROR": {
diff --git a/src/assets/i18n/nb.json b/src/assets/i18n/nb.json
index 4a6243613..8a12a86ae 100644
--- a/src/assets/i18n/nb.json
+++ b/src/assets/i18n/nb.json
@@ -243,7 +243,7 @@
   },
   "MY_PROFILE": {
     "COMPETENCE": "<a href=\"https://varsom.no/om-varsom/regobs/kompetanse/\">Les mer om kompetanse</a>",
-    "COPYRIGHT": "Opphavsrett",
+    "COPYRIGHT": "Kilde/rettighetshaver",
     "EDIT": "Rediger",
     "MY_COMPETENCE": "Min kompetanse",
     "MY_GROUPS": "Mine grupper",
@@ -516,6 +516,7 @@
       }
     },
     "IMAGES": "Bilder",
+    "IMAGE_ASPECT": "Himmelretning",
     "IMAGE_DESCRIPTION": "Beskrivelse av bildet",
     "IMAGE_DESCRIPTION_PLACEHOLDER": "Her kan du gi en beskrivelse av bildet",
     "IMAGE_ERROR": {


Reviews:
user: login: jorgkv
body: Ser veldig bra ut syns jeg. Bra løst. Litt småpirk gjenstår.
state: DISMISSED
author_association: CONTRIBUTOR
submitted_at: 2025-03-14T14:39:39Z
user: login: jorgkv
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-14T14:40:39Z
user: login: amish1188
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-17T08:41:39Z
user: login: amish1188
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-17T10:10:17Z
user: login: amish1188
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-17T10:29:30Z
user: login: gruble
body: Har bekreftet endringene etter Jørgens kommentarer, men det er noe smårusk fortsatt.
state: CHANGES_REQUESTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-21T13:30:58Z
user: login: amish1188
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-21T15:26:45Z
user: login: amish1188
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-21T15:30:06Z
user: login: amish1188
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-21T15:32:46Z
user: login: gruble
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-24T11:28:53Z
user: login: gruble
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-24T13:26:01Z
user: login: gruble
body: Nå mangler du bare å vise kallenavn også for rettighetshaver for nytt bilde
state: CHANGES_REQUESTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-24T13:38:25Z
user: login: gruble
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-03-24T15:07:17Z

Review comments:
diff_hunk: @@ -199,7 +199,7 @@ export class RegobsAuthService {
     return undefined;
   }
 
-  private async showSetNickDialog(): Promise<string> {
+  public async showSetNickDialog(): Promise<string> {
path: src/app/modules/auth/services/regobs-auth.service.ts
user: login: jorgkv
body: Har denne sneket seg med ved en feil?
created_at: 2025-03-14T14:21:12Z
author_association: CONTRIBUTOR
diff_hunk: @@ -19,6 +19,42 @@
       [rows]="2"
       placeholder="{{ pictureCommentPlaceholder() | translate }}"
     ></app-text-comment>
+    <ion-accordion-group>
+      <ion-accordion>
+        <ion-item slot="header" class="accordion-button">
+          <ion-label>{{ "REGISTRATION.SNOW.SNOW_PROFILE.STRAT_PROFILE.SHOW_MORE" | translate }}</ion-label>
path: src/app/modules/registration/components/edit-images/edit-images.component.html
user: login: jorgkv
body: Det kan hende vi burde laget en egen oversettelse for dette, men enn så lenge går det sikkert greit. Enten laget en egen eller flytta den vi har nå ut fra snow profile for å vise at den brukes flere steder.
Men som sagt, går greit for meg å ta det inn sånn her også.
created_at: 2025-03-14T14:22:59Z
author_association: CONTRIBUTOR
diff_hunk: @@ -19,6 +19,42 @@
       [rows]="2"
       placeholder="{{ pictureCommentPlaceholder() | translate }}"
     ></app-text-comment>
+    <ion-accordion-group>
+      <ion-accordion>
+        <ion-item slot="header" class="accordion-button">
+          <ion-label>{{ "REGISTRATION.SNOW.SNOW_PROFILE.STRAT_PROFILE.SHOW_MORE" | translate }}</ion-label>
+        </ion-item>
+        <div class="ion-padding" slot="content">
+          <ion-item>
+            <app-select
+              label="REGISTRATION.IMAGE_ASPECT"
+              [(selectedValue)]="attachment.Aspect"
+              [options]="aspectOptions()"
+            ></app-select>
+          </ion-item>
+          <ion-item>
+            <ion-input
+              [value]="attachment.Photographer"
+              (ionChange)="updateExistingAttachmentPhotographer(attachment, $event)"
path: src/app/modules/registration/components/edit-images/edit-images.component.html
user: login: jorgkv
body: Attachmenten kan vel enten være "existing" (hvis den er sendt inn) eller ikke (foreløpig bare på telefonen). Kanskje metodene bare bør hete updateAttachment... ?
created_at: 2025-03-14T14:24:55Z
author_association: CONTRIBUTOR
diff_hunk: @@ -19,6 +19,42 @@
       [rows]="2"
       placeholder="{{ pictureCommentPlaceholder() | translate }}"
     ></app-text-comment>
+    <ion-accordion-group>
+      <ion-accordion>
+        <ion-item slot="header" class="accordion-button">
+          <ion-label>{{ "REGISTRATION.SNOW.SNOW_PROFILE.STRAT_PROFILE.SHOW_MORE" | translate }}</ion-label>
+        </ion-item>
+        <div class="ion-padding" slot="content">
+          <ion-item>
+            <app-select
+              label="REGISTRATION.IMAGE_ASPECT"
+              [(selectedValue)]="attachment.Aspect"
+              [options]="aspectOptions()"
+            ></app-select>
+          </ion-item>
+          <ion-item>
+            <ion-input
+              [value]="attachment.Photographer"
+              (ionChange)="updateExistingAttachmentPhotographer(attachment, $event)"
+              [label]="'MY_PROFILE.PHOTOGRAPHER' | translate"
path: src/app/modules/registration/components/edit-images/edit-images.component.html
user: login: jorgkv
body: Andre labels i appen vises upper case. Sikkert lurt å gå for det samme her. Du kan bruke en "uppercase" pipe tror jeg. Søk på `| uppercase` i prosjektet, så finner du andre steder den er brukt.
created_at: 2025-03-14T14:28:01Z
author_association: CONTRIBUTOR
diff_hunk: @@ -102,6 +114,32 @@ export class EditImagesComponent implements OnInit {
   readonly onBeforeAdd = input<() => Promise<void> | void>();
   readonly attachmentType = input<AttachmentType>('Attachment');
   readonly ref = input<string>();
+  userSettings = toSignal(this.userSettingService.userSetting$);
+  selectedAspect = model<number | undefined>(undefined);
+
+  aspectOptions = computed((): SelectOption[] => {
path: src/app/modules/registration/components/edit-images/edit-images.component.ts
user: login: jorgkv
body: Dette er pirkete, men:
Dette kunne kanskje like gjerne vært properties rett på klassen? Eventuelt lag en liten hjelpefunksjon som tar inn translateService og gir tilbake SelectOption[]. 
Når det er en computed forventer jeg at den beregnes fra noe, men denne vil jo alltid returnere det samme.

created_at: 2025-03-14T14:33:33Z
author_association: CONTRIBUTOR
diff_hunk: @@ -154,6 +192,37 @@ export class EditImagesComponent implements OnInit {
     this.newAttachmentService.saveAttachmentMeta$(this.draftUuid(), { ...attachment, Comment: comment });
   }
 
+  addNewAttachmentAspect(attachment: AttachmentUploadEditModel, event: Event) {
path: src/app/modules/registration/components/edit-images/edit-images.component.ts
user: login: jorgkv
body: Hvis du bruker InputCustomEvent https://ionicframework.com/docs/api/input#inputcustomevent så slipper du kanskje caste typene i disse metodene?
created_at: 2025-03-14T14:35:40Z
author_association: CONTRIBUTOR
diff_hunk: @@ -154,6 +192,37 @@ export class EditImagesComponent implements OnInit {
     this.newAttachmentService.saveAttachmentMeta$(this.draftUuid(), { ...attachment, Comment: comment });
   }
 
+  addNewAttachmentAspect(attachment: AttachmentUploadEditModel, event: Event) {
path: src/app/modules/registration/components/edit-images/edit-images.component.ts
user: login: jorgkv
body: Tror også event.detail.value blir riktigere å bruke. Virker som det er der ionic putter verdien. Selv om target.value også fungerer siden eventen baserer seg på en native event.
created_at: 2025-03-14T14:37:33Z
author_association: CONTRIBUTOR
diff_hunk: @@ -19,6 +19,42 @@
       [rows]="2"
       placeholder="{{ pictureCommentPlaceholder() | translate }}"
     ></app-text-comment>
+    <ion-accordion-group>
+      <ion-accordion>
+        <ion-item slot="header" class="accordion-button">
+          <ion-label>{{ "REGISTRATION.SNOW.SNOW_PROFILE.STRAT_PROFILE.SHOW_MORE" | translate }}</ion-label>
+        </ion-item>
+        <div class="ion-padding" slot="content">
+          <ion-item>
+            <app-select
+              label="REGISTRATION.IMAGE_ASPECT"
+              [(selectedValue)]="attachment.Aspect"
+              [options]="aspectOptions()"
+            ></app-select>
+          </ion-item>
+          <ion-item>
+            <ion-input
+              [value]="attachment.Photographer"
+              (ionChange)="updateExistingAttachmentPhotographer(attachment, $event)"
path: src/app/modules/registration/components/edit-images/edit-images.component.html
user: login: jorgkv
body: Glem denne, skjønner hvorfor det trengs separate metoder..
created_at: 2025-03-14T14:40:39Z
author_association: CONTRIBUTOR
diff_hunk: @@ -199,7 +199,7 @@ export class RegobsAuthService {
     return undefined;
   }
 
-  private async showSetNickDialog(): Promise<string> {
+  public async showSetNickDialog(): Promise<string> {
path: src/app/modules/auth/services/regobs-auth.service.ts
user: login: amish1188
body: ja, tenkte å bruke den først faktisk i en annen komponent. glemte å sette tilbake til private
created_at: 2025-03-17T08:41:39Z
author_association: CONTRIBUTOR
diff_hunk: @@ -102,6 +114,32 @@ export class EditImagesComponent implements OnInit {
   readonly onBeforeAdd = input<() => Promise<void> | void>();
   readonly attachmentType = input<AttachmentType>('Attachment');
   readonly ref = input<string>();
+  userSettings = toSignal(this.userSettingService.userSetting$);
+  selectedAspect = model<number | undefined>(undefined);
+
+  aspectOptions = computed((): SelectOption[] => {
path: src/app/modules/registration/components/edit-images/edit-images.component.ts
user: login: amish1188
body: jeg lagde et objekt med alternativer. tror det burde holde. 
created_at: 2025-03-17T10:10:17Z
author_association: CONTRIBUTOR
diff_hunk: @@ -154,6 +192,37 @@ export class EditImagesComponent implements OnInit {
     this.newAttachmentService.saveAttachmentMeta$(this.draftUuid(), { ...attachment, Comment: comment });
   }
 
+  addNewAttachmentAspect(attachment: AttachmentUploadEditModel, event: Event) {
path: src/app/modules/registration/components/edit-images/edit-images.component.ts
user: login: amish1188
body: aner ikke hvordan jeg kan få det å fungere med app-select da. Ser ut at den støtter ikke SelectCustomEvent, kun Event. 
created_at: 2025-03-17T10:29:30Z
author_association: CONTRIBUTOR
diff_hunk: @@ -495,6 +495,7 @@
       }
     },
     "IMAGES": "Bilder",
+    "IMAGE_ASPECT": "Himmelretning",
path: src/assets/i18n/nb.json
user: login: gruble
body: Det mangler tekster for fotograf og opphavsrett på norsk. Se også https://nveprojects.atlassian.net/browse/RO-1150 så slipper vi å endre det seinere:)
![image](https://github.com/user-attachments/assets/d71d8483-d831-4fb1-ab0d-811b24e2f8c5)


created_at: 2025-03-21T12:52:07Z
author_association: CONTRIBUTOR
diff_hunk: @@ -19,6 +19,42 @@
       [rows]="2"
       placeholder="{{ pictureCommentPlaceholder() | translate }}"
     ></app-text-comment>
+    <ion-accordion-group>
+      <ion-accordion>
+        <ion-item slot="header" class="accordion-button">
+          <ion-label>{{ "REGISTRATION.SNOW.SNOW_PROFILE.STRAT_PROFILE.SHOW_MORE" | translate }}</ion-label>
+        </ion-item>
+        <div class="ion-padding" slot="content">
+          <ion-item>
+            <app-select
+              label="REGISTRATION.IMAGE_ASPECT"
+              [(selectedValue)]="attachment.Aspect"
+              [options]="aspectOptions"
+            ></app-select>
+          </ion-item>
+          <ion-item>
+            <ion-input
+              [value]="attachment.Photographer"
path: src/app/modules/registration/components/edit-images/edit-images.component.html
user: login: gruble
body: Jeg tror du også som utgangspunkt bør vise standard fotograf fra innstillinger om dette er satt, selv om ikke dette står i "spek'en" fra Rune.
Årsaken er at dette blir satt automatisk når du sender inn observasjonen, muligens i API'et. Jeg så det da jeg skulle redigere observasjonen etter jeg hadde sendt den inn.
created_at: 2025-03-21T13:12:49Z
author_association: CONTRIBUTOR
diff_hunk: @@ -102,6 +116,19 @@ export class EditImagesComponent implements OnInit {
   readonly onBeforeAdd = input<() => Promise<void> | void>();
   readonly attachmentType = input<AttachmentType>('Attachment');
   readonly ref = input<string>();
+  userSettings = toSignal(this.userSettingService.userSetting$);
+  selectedAspect = model<number | undefined>(undefined);
+
+  aspectOptions: SelectOption[] = [
path: src/app/modules/registration/components/edit-images/edit-images.component.ts
user: login: gruble
body: Jeg tror du vil finne nøyaktig samme kode andre steder i appen, se f.eks. for snøprofil:
![image](https://github.com/user-attachments/assets/6ab20bbc-bd8f-4194-800f-999e9d9b3c20)
Jeg tror du kan bruke "himmelretning" som ledetekst begge steder. Synes ikke "eksposisjon" er noe bra begrep på norsk.

created_at: 2025-03-21T13:15:21Z
author_association: CONTRIBUTOR
diff_hunk: @@ -51,6 +87,43 @@
       [rows]="2"
       placeholder="{{ pictureCommentPlaceholder() | translate }}"
     ></app-text-comment>
+    <ion-accordion-group>
+      <ion-accordion>
+        <ion-item slot="header" class="accordion-button">
+          <ion-label>{{ "REGISTRATION.SNOW.SNOW_PROFILE.STRAT_PROFILE.SHOW_MORE" | translate }}</ion-label>
+        </ion-item>
+        <div class="ion-padding" slot="content">
+          <ion-item>
+            <app-select
+              label="REGISTRATION.IMAGE_ASPECT"
+              [(selectedValue)]="attachment.Aspect"
+              [options]="aspectOptions"
+              (ionChange)="addNewAttachmentAspect(attachment, $event)"
+            ></app-select>
+          </ion-item>
+          <ion-item>
+            <ion-input
+              [value]="attachment.Photographer"
+              (ionChange)="addNewAttachmentPhotographer(attachment, $event)"
+              label="PHOTOGRAPHER"
+              labelPlacement="stacked"
+              placeholder="Photographer"
+            >
+            </ion-input>
+          </ion-item>
+          <ion-item>
+            <ion-input
+              [value]="attachment.Copyright || userSettings()?.copyright"
path: src/app/modules/registration/components/edit-images/edit-images.component.html
user: login: gruble
body: Hvis verken attachment.Copyright eller userSettings()?.copyright er satt, skal du vise kallenavnet.
Nå vises ingenting. 
created_at: 2025-03-21T13:22:51Z
author_association: CONTRIBUTOR
diff_hunk: @@ -19,6 +19,42 @@
       [rows]="2"
       placeholder="{{ pictureCommentPlaceholder() | translate }}"
     ></app-text-comment>
+    <ion-accordion-group>
+      <ion-accordion>
+        <ion-item slot="header" class="accordion-button">
+          <ion-label>{{ "REGISTRATION.SNOW.SNOW_PROFILE.STRAT_PROFILE.SHOW_MORE" | translate }}</ion-label>
+        </ion-item>
+        <div class="ion-padding" slot="content">
+          <ion-item>
+            <app-select
+              label="REGISTRATION.IMAGE_ASPECT"
+              [(selectedValue)]="attachment.Aspect"
+              [options]="aspectOptions"
+            ></app-select>
+          </ion-item>
+          <ion-item>
+            <ion-input
+              [value]="attachment.Photographer"
path: src/app/modules/registration/components/edit-images/edit-images.component.html
user: login: amish1188
body: okei
created_at: 2025-03-21T15:26:45Z
author_association: CONTRIBUTOR
diff_hunk: @@ -102,6 +116,19 @@ export class EditImagesComponent implements OnInit {
   readonly onBeforeAdd = input<() => Promise<void> | void>();
   readonly attachmentType = input<AttachmentType>('Attachment');
   readonly ref = input<string>();
+  userSettings = toSignal(this.userSettingService.userSetting$);
+  selectedAspect = model<number | undefined>(undefined);
+
+  aspectOptions: SelectOption[] = [
path: src/app/modules/registration/components/edit-images/edit-images.component.ts
user: login: amish1188
body: der brukes andre id-er. jeg må sende riktig id for himmelretning ikke tall fra 0-9. Sånn var det i den gamle løsningen så jeg tipper det er viktig at id er som en faktisk vindretning i grader (id)?
created_at: 2025-03-21T15:30:05Z
author_association: CONTRIBUTOR
diff_hunk: @@ -51,6 +87,43 @@
       [rows]="2"
       placeholder="{{ pictureCommentPlaceholder() | translate }}"
     ></app-text-comment>
+    <ion-accordion-group>
+      <ion-accordion>
+        <ion-item slot="header" class="accordion-button">
+          <ion-label>{{ "REGISTRATION.SNOW.SNOW_PROFILE.STRAT_PROFILE.SHOW_MORE" | translate }}</ion-label>
+        </ion-item>
+        <div class="ion-padding" slot="content">
+          <ion-item>
+            <app-select
+              label="REGISTRATION.IMAGE_ASPECT"
+              [(selectedValue)]="attachment.Aspect"
+              [options]="aspectOptions"
+              (ionChange)="addNewAttachmentAspect(attachment, $event)"
+            ></app-select>
+          </ion-item>
+          <ion-item>
+            <ion-input
+              [value]="attachment.Photographer"
+              (ionChange)="addNewAttachmentPhotographer(attachment, $event)"
+              label="PHOTOGRAPHER"
+              labelPlacement="stacked"
+              placeholder="Photographer"
+            >
+            </ion-input>
+          </ion-item>
+          <ion-item>
+            <ion-input
+              [value]="attachment.Copyright || userSettings()?.copyright"
path: src/app/modules/registration/components/edit-images/edit-images.component.html
user: login: amish1188
body: da må vi først få kallenavn redigering til develop. Jeg endrer hvordan vi får tak i kallenavnt. Nesten umulig å få den i nåværende oppsetting. 
created_at: 2025-03-21T15:32:46Z
author_association: CONTRIBUTOR
diff_hunk: @@ -102,6 +116,19 @@ export class EditImagesComponent implements OnInit {
   readonly onBeforeAdd = input<() => Promise<void> | void>();
   readonly attachmentType = input<AttachmentType>('Attachment');
   readonly ref = input<string>();
+  userSettings = toSignal(this.userSettingService.userSetting$);
+  selectedAspect = model<number | undefined>(undefined);
+
+  aspectOptions: SelectOption[] = [
path: src/app/modules/registration/components/edit-images/edit-images.component.ts
user: login: gruble
body: Stemmer, det tenkte jeg ikke på. Da burde vi kanskje hatt en felles komponent som kunne gi oss både ID og grader, kanskje.
created_at: 2025-03-24T11:28:53Z
author_association: CONTRIBUTOR
diff_hunk: @@ -51,6 +87,43 @@
       [rows]="2"
       placeholder="{{ pictureCommentPlaceholder() | translate }}"
     ></app-text-comment>
+    <ion-accordion-group>
+      <ion-accordion>
+        <ion-item slot="header" class="accordion-button">
+          <ion-label>{{ "REGISTRATION.SNOW.SNOW_PROFILE.STRAT_PROFILE.SHOW_MORE" | translate }}</ion-label>
+        </ion-item>
+        <div class="ion-padding" slot="content">
+          <ion-item>
+            <app-select
+              label="REGISTRATION.IMAGE_ASPECT"
+              [(selectedValue)]="attachment.Aspect"
+              [options]="aspectOptions"
+              (ionChange)="addNewAttachmentAspect(attachment, $event)"
+            ></app-select>
+          </ion-item>
+          <ion-item>
+            <ion-input
+              [value]="attachment.Photographer"
+              (ionChange)="addNewAttachmentPhotographer(attachment, $event)"
+              label="PHOTOGRAPHER"
+              labelPlacement="stacked"
+              placeholder="Photographer"
+            >
+            </ion-input>
+          </ion-item>
+          <ion-item>
+            <ion-input
+              [value]="attachment.Copyright || userSettings()?.copyright"
path: src/app/modules/registration/components/edit-images/edit-images.component.html
user: login: gruble
body: Fint. Nå virker det for redigering av bilde, men ikke for nytt bilde. Tar du nytt bilde også?
created_at: 2025-03-24T13:26:01Z
author_association: CONTRIBUTOR

PR comments:
user: login: github-actions[bot]
created_at: 2025-03-14T13:03:50Z
body: Azure Static Web Apps: Your stage site is ready! Visit it here: https://victorious-water-056410803-703.westeurope.azurestaticapps.net
author_association: NONE
user: login: github-actions[bot]
created_at: 2025-03-17T10:33:48Z
body: Azure Static Web Apps: Your stage site is ready! Visit it here: https://victorious-water-056410803-703.westeurope.azurestaticapps.net
author_association: NONE
user: login: github-actions[bot]
created_at: 2025-03-21T15:35:58Z
body: Azure Static Web Apps: Your stage site is ready! Visit it here: https://victorious-water-056410803-703.westeurope.azurestaticapps.net
author_association: NONE
user: login: github-actions[bot]
created_at: 2025-03-24T10:26:19Z
body: Azure Static Web Apps: Your stage site is ready! Visit it here: https://victorious-water-056410803-703.westeurope.azurestaticapps.net
author_association: NONE
user: login: github-actions[bot]
created_at: 2025-03-24T14:58:23Z
body: Azure Static Web Apps: Your stage site is ready! Visit it here: https://victorious-water-056410803-703.westeurope.azurestaticapps.net
author_association: NONE