Added ann details button Added modal shown on its click Moved trashbox selection there Added trashboxes mock while testing in restricted area
20 lines
469 B
TypeScript
20 lines
469 B
TypeScript
import { API_URL } from '../../config'
|
|
import { TrashboxDispose, DisposeResponse } from './types'
|
|
|
|
const composeDisposeURL = () => (
|
|
API_URL + '/announcement/dispose?'
|
|
)
|
|
|
|
const composeDisposeBody = (ann_id: number, trashbox: TrashboxDispose) => (
|
|
JSON.stringify({
|
|
ann_id,
|
|
trashbox,
|
|
})
|
|
)
|
|
|
|
const processDispose = (data: DisposeResponse): boolean => {
|
|
return data.Success
|
|
}
|
|
|
|
export { composeDisposeURL, composeDisposeBody, processDispose }
|