feat: UV is 27 cm wide (Dropstar, 2026-10-28)
All checks were successful
Build and deploy / Validate source (push) Successful in 5s
Build and deploy / Integration suite on a real stack (push) Successful in 3m27s
Build and deploy / Secret scan and release gate (push) Successful in 5s
Build and deploy / Publish images (push) Successful in 1m0s
All checks were successful
Build and deploy / Validate source (push) Successful in 5s
Build and deploy / Integration suite on a real stack (push) Successful in 3m27s
Build and deploy / Secret scan and release gate (push) Successful in 5s
Build and deploy / Publish images (push) Successful in 1m0s
It was 28,5 cm. The Site's UV products, ready-sheet check, layout and size shortcuts, the server's film-width check, the print file and the Tiny item names follow; two pieces of up to 13,2 cm share a UV row. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -164,7 +164,8 @@ class Item(StrictModel):
|
||||
if [source.upload_id for source in self.production.sources] != self.uploads:
|
||||
raise ValueError('Production sources must match uploaded files in order')
|
||||
is_sheet = self.mode in ('file', 'uvfile')
|
||||
film_width = Decimal('28.5') if self.mode in ('uvfile', 'uv') else Decimal('57')
|
||||
# UV is 27 cm wide (Dropstar, 2026-10-28; it was 28,5).
|
||||
film_width = Decimal('27') if self.mode in ('uvfile', 'uv') else Decimal('57')
|
||||
if self.production.film_width_cm != film_width:
|
||||
raise ValueError('Production film width does not match the product')
|
||||
for source in self.production.sources:
|
||||
|
||||
@@ -77,8 +77,8 @@ STEP_DEFAULTS = {'uvfile': 'DTFIMP.UV.010CM', 'uv': 'DTFIMP.UV.010CM'}
|
||||
METRE_DEFAULTS = {'uvfile': 'DTFIMP.UV.1MT', 'uv': 'DTFIMP.UV.1MT'}
|
||||
PRODUCTS = {'file': 'DTF Têxtil 57 cm · folha montada',
|
||||
'avulsa': 'DTF Têxtil 57 cm · artes avulsas',
|
||||
'uvfile': 'DTF UV 28,5 cm · folha montada',
|
||||
'uv': 'DTF UV 28,5 cm · artes avulsas'}
|
||||
'uvfile': 'DTF UV 27 cm · folha montada',
|
||||
'uv': 'DTF UV 27 cm · artes avulsas'}
|
||||
# How far back to look for an order a previous delivery may already have made.
|
||||
SEARCH_DAYS = 7
|
||||
# A "ready" event can come after corrections; it normally knows the Tiny id.
|
||||
|
||||
@@ -155,7 +155,7 @@ for loose artwork:
|
||||
| Product | Ready sheet | Loose artwork |
|
||||
|---|---:|---:|
|
||||
| DTF textile, 57 cm | R$ 19,90 | R$ 21,90 |
|
||||
| UV sticker, 28,5 cm | R$ 79,90 | R$ 89,90 |
|
||||
| UV sticker, 27 cm (Dropstar, 2026-10-28; was 28,5) | R$ 79,90 | R$ 89,90 |
|
||||
|
||||
The grade (nota) is still computed and shown, to the customer, on the Kanban
|
||||
and in Tiny's item note: it explains the file and no longer changes the price.
|
||||
|
||||
@@ -259,9 +259,9 @@ try{
|
||||
return {altura:+r.altura.toFixed(2),folga:+r.folga.toFixed(3),
|
||||
xs:[...new Set(r.pos.map(p=>+p.x.toFixed(2)))],ys:[...new Set(r.pos.map(p=>+p.y.toFixed(2)))]};})()`),
|
||||
{altura:89.42,folga:0.2,xs:[0.2,28.6],ys:[0.5,30.14,59.78]});
|
||||
// UV, 28,5 cm: two 14 cm pieces still share a row, 1,67 mm apart.
|
||||
assert.equal(await evaluate(`(()=>{const a={};const r=encaixar([{w:14,h:10,img:null,a},{w:14,h:10,img:null,a}],28.5);
|
||||
return new Set(r.pos.map(p=>p.y)).size===1 && Math.abs(r.folga-0.5/3)<1e-9})()`),true);
|
||||
// UV, 27 cm: two 13,2 cm pieces still share a row, 2 mm apart.
|
||||
assert.equal(await evaluate(`(()=>{const a={};const r=encaixar([{w:13.2,h:10,img:null,a},{w:13.2,h:10,img:null,a}],27);
|
||||
return new Set(r.pos.map(p=>p.y)).size===1 && Math.abs(r.folga-0.6/3)<1e-9})()`),true);
|
||||
// A long piece stands up when that shortens the sheet: 30 x 10 cm, eight copies,
|
||||
// five to a row turned instead of one to a row as sent.
|
||||
assert.deepEqual(await evaluate(`(()=>{const a={};const r=encaixar(Array.from({length:8},()=>({w:30,h:10,img:null,a})),57);
|
||||
|
||||
@@ -93,7 +93,7 @@ def upload_bytes(client, content, name='LOCAL-TEST.cdr', order_id=None, expected
|
||||
return uid
|
||||
|
||||
def item_spec(mode, metres, grade, uid):
|
||||
film_width=28.5 if mode in ('uvfile','uv') else 57
|
||||
film_width=27 if mode in ('uvfile','uv') else 57
|
||||
length_cm=float(metres)*100
|
||||
return {'mode':mode,'metres':str(metres),'grade':grade,'uploads':[uid],
|
||||
'production':{'version':2,'film_width_cm':film_width,'height_cm':length_cm,
|
||||
|
||||
@@ -9,7 +9,7 @@ from app.core.models import Item
|
||||
|
||||
def item(mode='avulsa', mirrored=False, version=3):
|
||||
upload = uuid4()
|
||||
film = 28.5 if mode in ('uv', 'uvfile') else 57
|
||||
film = 27 if mode in ('uv', 'uvfile') else 57
|
||||
return {'mode': mode, 'metres': '0.21', 'grade': 100, 'uploads': [str(upload)],
|
||||
'quality_status': 'ok', 'quality_acknowledged': False,
|
||||
'production': {'version': version, 'film_width_cm': film, 'height_cm': 21,
|
||||
|
||||
@@ -213,8 +213,8 @@ class TinyTests(FakeTinyCase):
|
||||
self.products['103']['situacao'] = 'I'
|
||||
with mock.patch.dict(os.environ, {'TINY_PRODUCT_UV_AVULSA': ''}):
|
||||
results = check(auth=FakeAuth(), transport=httpx.MockTransport(self.handler))
|
||||
self.assertIn('não está ativo', results['DTF UV 28,5 cm · folha montada'])
|
||||
self.assertEqual(results['DTF UV 28,5 cm · artes avulsas'], 'TINY_PRODUCT_UV_AVULSA sem id')
|
||||
self.assertIn('não está ativo', results['DTF UV 27 cm · folha montada'])
|
||||
self.assertEqual(results['DTF UV 27 cm · artes avulsas'], 'TINY_PRODUCT_UV_AVULSA sem id')
|
||||
self.assertEqual(results['pedidos'], 'ok')
|
||||
# The order list is asked by date: unfiltered, Tiny times out on a large account.
|
||||
asked = []
|
||||
@@ -528,10 +528,10 @@ class TinyStepSkuTests(FakeTinyCase):
|
||||
def test_settings_and_check_know_the_step_sku(self):
|
||||
from app.tiny import check, required_settings
|
||||
self.assertNotIn('TINY_PRODUCT_UV_FOLHA', required_settings())
|
||||
self.assertEqual(check(orders=self.tiny)['DTF UV 28,5 cm · folha montada'], 'ok')
|
||||
self.assertEqual(check(orders=self.tiny)['DTF UV 27 cm · folha montada'], 'ok')
|
||||
del self.products['300']
|
||||
self.tiny.skus.clear()
|
||||
self.assertIn('DTFIMP.UV.010CM', check(orders=self.tiny)['DTF UV 28,5 cm · folha montada'])
|
||||
self.assertIn('DTFIMP.UV.010CM', check(orders=self.tiny)['DTF UV 27 cm · folha montada'])
|
||||
|
||||
|
||||
@product_ids
|
||||
@@ -555,10 +555,10 @@ class TinyMetreAndStepSkuTests(FakeTinyCase):
|
||||
def test_whole_metres_alone_and_the_check(self):
|
||||
from app.tiny import check, step_lines
|
||||
self.assertEqual(step_lines({'billed_metres': '2', 'unit_cents': 6990}, 'C', 'M'), [('M', 2, 6990)])
|
||||
self.assertEqual(check(orders=self.tiny)['DTF UV 28,5 cm · folha montada'], 'ok')
|
||||
self.assertEqual(check(orders=self.tiny)['DTF UV 27 cm · folha montada'], 'ok')
|
||||
del self.products['301']
|
||||
self.tiny.skus.clear()
|
||||
self.assertIn('DTFIMP.UV.1MT', check(orders=self.tiny)['DTF UV 28,5 cm · folha montada'])
|
||||
self.assertIn('DTFIMP.UV.1MT', check(orders=self.tiny)['DTF UV 27 cm · folha montada'])
|
||||
|
||||
|
||||
@product_ids
|
||||
@@ -578,7 +578,7 @@ class TinyProbeTests(FakeTinyCase):
|
||||
self.assertIn('101\tDTF-101\tProduto 101', text)
|
||||
code, text = self.probe('conferir')
|
||||
self.assertEqual(code, 0)
|
||||
self.assertIn('TINY_PRODUCT_UV_AVULSA (DTF UV 28,5 cm · artes avulsas): ok DTF-104', text)
|
||||
self.assertIn('TINY_PRODUCT_UV_AVULSA (DTF UV 27 cm · artes avulsas): ok DTF-104', text)
|
||||
self.assertIn('TINY_FORMA_ENVIO_RETIRADA (retirada): ok Retirar pessoalmente', text)
|
||||
code, text = self.probe('formas-envio')
|
||||
self.assertIn('77\t6\tRetirar pessoalmente', text)
|
||||
|
||||
@@ -676,7 +676,7 @@ h2 em{font-style:normal;color:var(--laranja)}
|
||||
<a href="/#envio">Impressão DTF</a>
|
||||
<div class="sub">
|
||||
<a href="/#envio">DTF Têxtil · 57 cm</a>
|
||||
<a href="/#envio">DTF UV · 28,5 cm</a>
|
||||
<a href="/#envio">DTF UV · 27 cm</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mi">
|
||||
@@ -789,7 +789,7 @@ h2 em{font-style:normal;color:var(--laranja)}
|
||||
</div>
|
||||
</button>
|
||||
<button class="ec u" data-modo="uvfile">
|
||||
<div class="ec-top"><span class="ec-kind">ADESIVO UV · 28,5 CM</span></div>
|
||||
<div class="ec-top"><span class="ec-kind">ADESIVO UV · 27 CM</span></div>
|
||||
<h3>Arquivo por metro · UV</h3>
|
||||
<p>Sua folha de UV montada. Para rígidos: caneca, garrafa, case. Não precisa de prensa.</p>
|
||||
<div class="ec-pe">
|
||||
@@ -798,7 +798,7 @@ h2 em{font-style:normal;color:var(--laranja)}
|
||||
</div>
|
||||
</button>
|
||||
<button class="ec u" data-modo="uv">
|
||||
<div class="ec-top"><span class="ec-kind">ADESIVO UV · 28,5 CM</span></div>
|
||||
<div class="ec-top"><span class="ec-kind">ADESIVO UV · 27 CM</span></div>
|
||||
<h3>Artes avulsas · UV</h3>
|
||||
<p>Cada arte num arquivo. Montamos a folha de UV com o melhor encaixe. Montagem inclusa no preço.</p>
|
||||
<div class="ec-pe">
|
||||
@@ -1126,7 +1126,7 @@ h2 em{font-style:normal;color:var(--laranja)}
|
||||
<h2>Preço único por produto</h2>
|
||||
<p>A nota da arte aparece na tela antes de você pagar, para você entender o seu arquivo. Ela não muda o preço. Preço do metro:</p>
|
||||
<table>
|
||||
<thead><tr><th scope="col">Produto</th><th scope="col">Têxtil 57 cm</th><th scope="col">UV 28,5 cm</th></tr></thead>
|
||||
<thead><tr><th scope="col">Produto</th><th scope="col">Têxtil 57 cm</th><th scope="col">UV 27 cm</th></tr></thead>
|
||||
<tbody>
|
||||
<tr><td>Folha pronta</td><td data-preco="file">R$ 19,90</td><td data-preco="uvfile">R$ 79,90</td></tr>
|
||||
<tr><td>Artes avulsas</td><td data-preco="avulsa">R$ 21,90</td><td data-preco="uv">R$ 89,90</td></tr>
|
||||
@@ -1167,7 +1167,7 @@ h2 em{font-style:normal;color:var(--laranja)}
|
||||
<div class="fbase">
|
||||
<span>© Dropstar Atacado · CNPJ 55.786.635/0001-58 · Franca-SP</span>
|
||||
<span>Cartão de crédito (Visa · Master · Elo · Amex) · PIX</span>
|
||||
<span>têxtil 57 cm · UV 28,5 cm</span>
|
||||
<span>têxtil 57 cm · UV 27 cm</span>
|
||||
</div>
|
||||
</div></footer>
|
||||
|
||||
|
||||
@@ -215,7 +215,7 @@
|
||||
<div class="fbase">
|
||||
<span>© Dropstar Atacado · CNPJ 55.786.635/0001-58 · Franca-SP</span>
|
||||
<span>Cartão de crédito (Visa · Master · Elo · Amex) · PIX</span>
|
||||
<span>têxtil 57 cm · UV 28,5 cm</span>
|
||||
<span>têxtil 57 cm · UV 27 cm</span>
|
||||
</div>
|
||||
</div></footer>
|
||||
|
||||
|
||||
@@ -39,9 +39,9 @@ const MODOS={
|
||||
avulsa:{tit:'Artes avulsas', lg:'DTF têxtil · 57 cm', larg:57, multi:true,
|
||||
zt:'Arraste suas artes aqui',
|
||||
zs:'PNG com fundo transparente · informe a largura de cada uma'},
|
||||
uvfile:{tit:'Arquivo por metro · UV', lg:'Adesivo UV · 28,5 cm', larg:28.5, multi:true, folha:true,
|
||||
zt:'Arraste sua folha de UV aqui', zs:'PNG ou PDF com fundo transparente · 28,5 cm de largura'},
|
||||
uv: {tit:'Artes avulsas · UV', lg:'Adesivo UV · 28,5 cm', larg:28.5, multi:true,
|
||||
uvfile:{tit:'Arquivo por metro · UV', lg:'Adesivo UV · 27 cm', larg:27, multi:true, folha:true,
|
||||
zt:'Arraste sua folha de UV aqui', zs:'PNG ou PDF com fundo transparente · 27 cm de largura'},
|
||||
uv: {tit:'Artes avulsas · UV', lg:'Adesivo UV · 27 cm', larg:27, multi:true,
|
||||
zt:'Arraste suas artes de UV',
|
||||
zs:'PNG com fundo transparente · informe a largura de cada arte'}
|
||||
};
|
||||
@@ -160,4 +160,4 @@ const cls=n=>n>=85?'ok':n>=50?'av':'er';
|
||||
const dpiDe=a=>a.cm>0? (a.giro?a.py:a.px)/(a.cm/2.54) : 0;
|
||||
// girar 90° inverte a proporção · espelhar não muda medida, só o desenho
|
||||
const propDe=a=>{ const p=a.prop||1; return a.giro? 1/p : p; };
|
||||
const TAMANHOS={57:[10,15,20,25,28.2], 28.5:[5,8,10,14,28.2]};
|
||||
const TAMANHOS={57:[10,15,20,25,28.2], 27:[5,8,10,13,26.7]};
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
<div class="fbase">
|
||||
<span>© Dropstar Atacado · CNPJ 55.786.635/0001-58 · Franca-SP</span>
|
||||
<span>Cartão de crédito (Visa · Master · Elo · Amex) · PIX</span>
|
||||
<span>têxtil 57 cm · UV 28,5 cm</span>
|
||||
<span>têxtil 57 cm · UV 27 cm</span>
|
||||
</div>
|
||||
</div></footer>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user