Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -100,7 +100,7 @@ def create_pdf(data, filename):
|
|
100 |
|
101 |
# Tanda Tangan
|
102 |
elements.append(Paragraph("Hormat kami,", normal_style))
|
103 |
-
elements.append(Paragraph("PT.
|
104 |
|
105 |
# Build PDF
|
106 |
doc.build(elements)
|
@@ -146,7 +146,7 @@ def buat_penawaran(nama_prospek, alamat_prospek, jenis_prospek, produk_dipilih,
|
|
146 |
if not alamat_prospek:
|
147 |
missing_data.append("Alamat Prospek")
|
148 |
if not jenis_prospek:
|
149 |
-
missing_data.append("Jenis Prospek")
|
150 |
if not tanggal:
|
151 |
missing_data.append("Tanggal")
|
152 |
if not produk_dipilih or not jumlah_produk or not harga_produk:
|
@@ -181,8 +181,6 @@ if (annyang) {
|
|
181 |
const inputEvent = new Event('input', { bubbles: true, cancelable: true });
|
182 |
document.getElementById('nama_prospek').querySelector('textarea').dispatchEvent(inputEvent);
|
183 |
|
184 |
-
document.getElementById('nama_prospek').querySelector('textarea').innerHTML = value;
|
185 |
-
document.getElementById('nama_prospek').querySelector('textarea').innerText = value;
|
186 |
document.getElementById('speechStatus').innerText = 'Nama prospek diisi: ' + value;
|
187 |
},
|
188 |
'alamat *value': function(value) {
|
@@ -204,7 +202,11 @@ if (annyang) {
|
|
204 |
},
|
205 |
'tanggal *value': function(value) {
|
206 |
document.getElementById('tanggal').querySelector('textarea').value = value;
|
|
|
|
|
207 |
document.getElementById('speechStatus').innerText = 'Tanggal diisi: ' + value;
|
|
|
|
|
208 |
},
|
209 |
'produk *value': function(value) {
|
210 |
var checkboxes = document.querySelectorAll('input[name="produk_dipilih"]');
|
@@ -214,6 +216,7 @@ if (annyang) {
|
|
214 |
}
|
215 |
});
|
216 |
document.getElementById('speechStatus').querySelector('textarea').innerText = 'Produk dipilih: ' + value;
|
|
|
217 |
},
|
218 |
'jumlah *value': function(value) {
|
219 |
document.getElementById('jumlah_produk').querySelector('textarea').value = value;
|
|
|
100 |
|
101 |
# Tanda Tangan
|
102 |
elements.append(Paragraph("Hormat kami,", normal_style))
|
103 |
+
elements.append(Paragraph("PT.Arafa Asia", normal_style))
|
104 |
|
105 |
# Build PDF
|
106 |
doc.build(elements)
|
|
|
146 |
if not alamat_prospek:
|
147 |
missing_data.append("Alamat Prospek")
|
148 |
if not jenis_prospek:
|
149 |
+
# missing_data.append("Jenis Prospek")
|
150 |
if not tanggal:
|
151 |
missing_data.append("Tanggal")
|
152 |
if not produk_dipilih or not jumlah_produk or not harga_produk:
|
|
|
181 |
const inputEvent = new Event('input', { bubbles: true, cancelable: true });
|
182 |
document.getElementById('nama_prospek').querySelector('textarea').dispatchEvent(inputEvent);
|
183 |
|
|
|
|
|
184 |
document.getElementById('speechStatus').innerText = 'Nama prospek diisi: ' + value;
|
185 |
},
|
186 |
'alamat *value': function(value) {
|
|
|
202 |
},
|
203 |
'tanggal *value': function(value) {
|
204 |
document.getElementById('tanggal').querySelector('textarea').value = value;
|
205 |
+
document.getElementById('tanggal').querySelector('textarea').innerHTML = value;
|
206 |
+
document.getElementById('tanggal').querySelector('textarea').innerText = value;
|
207 |
document.getElementById('speechStatus').innerText = 'Tanggal diisi: ' + value;
|
208 |
+
const inputEvent = new Event('input', { bubbles: true, cancelable: true });
|
209 |
+
document.getElementById('tanggal').querySelector('textarea').dispatchEvent(inputEvent);
|
210 |
},
|
211 |
'produk *value': function(value) {
|
212 |
var checkboxes = document.querySelectorAll('input[name="produk_dipilih"]');
|
|
|
216 |
}
|
217 |
});
|
218 |
document.getElementById('speechStatus').querySelector('textarea').innerText = 'Produk dipilih: ' + value;
|
219 |
+
|
220 |
},
|
221 |
'jumlah *value': function(value) {
|
222 |
document.getElementById('jumlah_produk').querySelector('textarea').value = value;
|