Skip to content

Commit

Permalink
fix upload doc in submit report before wtn issued
Browse files Browse the repository at this point in the history
  • Loading branch information
davidclaveau committed Nov 7, 2023
1 parent 1ae6ffe commit 39abae9
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -303,11 +303,12 @@ export default {
setFileName(index) {
try {
let file_name = null
let WTN = this.wellTagNumber ? `WTN ${this.wellTagNumber}_` : ''
let entry = this.attachmentsData[index];
if (entry.document_label_code &&
entry.upload_date &&
entry.file){
file_name = `WTN ${entry.well_tag_number}_${entry.document_label_code}_${(entry.upload_date.getTime() + Math.floor(Math.random() * 999999))}.${entry.file.name.split('.')[1]}`;
file_name = `${WTN}${entry.document_label_code}_${(entry.upload_date.getTime() + Math.floor(Math.random() * 999999))}.${entry.file.name.split('.')[1]}`;
}
this.attachmentsData[index].file_name = file_name;
if(this.attachmentsData[index].file_name !== null){ this.$emit('setFormValueChanged'); }
Expand Down

0 comments on commit 39abae9

Please sign in to comment.