summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiqdad <ahmadmiqdad27@gmail.com>2025-10-10 09:50:49 +0700
committerMiqdad <ahmadmiqdad27@gmail.com>2025-10-10 09:50:49 +0700
commit137e812a5d96e1d5a82ceffbdf6a0938358e4d07 (patch)
tree02d712412dcc42565a87ba55f71784c8b889cc6d
parentb25d39b4d5dd456ef2e40a25ce3608e5c9b6694d (diff)
<Miqdad> add lampiran ke xx/xx to sj tele
-rw-r--r--indoteknik_custom/models/sj_tele.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/indoteknik_custom/models/sj_tele.py b/indoteknik_custom/models/sj_tele.py
index 5ea08340..3ef4b877 100644
--- a/indoteknik_custom/models/sj_tele.py
+++ b/indoteknik_custom/models/sj_tele.py
@@ -66,10 +66,12 @@ class SjTele(models.Model):
header = "Berikut merupakan nomor BU/OUT yang belum ada di Logbook SJ report:\n"
BUB = 20 # jumlah baris per bubble
+ total = (len(lines) + BUB - 1) // BUB # total bubble
for i in range(0, len(lines), BUB):
body = "\n".join(lines[i:i + BUB])
- text = header + body
+ bagian = (i // BUB) + 1
+ text = f"{header}Lampiran ke {bagian}/{total}\n{body}"
try:
r = requests.post(
api_base + "/sendMessage",